Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_arrival_ist
Conflicts: lib/client/base_app_client.dart lib/config/config.dart lib/core/service/patient_service.dart lib/core/viewModel/patient_view_model.dart lib/lookups/patient_lookup.dart lib/models/patient/patiant_info_model.dart lib/screens/patients/patients_screen.dartipd-changes-for-vida-plus
commit
dccf474e70
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@ -1,10 +1,12 @@
|
|||||||
final TOKEN = 'token';
|
final TOKEN = 'token';
|
||||||
final PROJECT_ID = 'projectID';
|
final PROJECT_ID = 'projectID';
|
||||||
//===========amjad============
|
final VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID';
|
||||||
|
final VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID';
|
||||||
|
final LOGIN_TOKEN_ID = 'LogInToken';
|
||||||
final DOCTOR_ID = 'doctorID';
|
final DOCTOR_ID = 'doctorID';
|
||||||
//=======================
|
|
||||||
final SLECTED_PATIENT_TYPE = 'slectedPatientType';
|
final SLECTED_PATIENT_TYPE = 'slectedPatientType';
|
||||||
final APP_Language = 'language';
|
final APP_Language = 'language';
|
||||||
final DOCTOR_PROFILE = 'doctorProfile';
|
final DOCTOR_PROFILE = 'doctorProfile';
|
||||||
final LIVE_CARE_PATIENT = 'livecare-patient-profile';
|
final LIVE_CARE_PATIENT = 'livecare-patient-profile';
|
||||||
final LOGGED_IN_USER = 'loggedUser';
|
final LOGGED_IN_USER = 'loggedUser';
|
||||||
|
final DASHBOARD_DATA = 'dashboard-data';
|
||||||
|
|||||||
@ -0,0 +1,57 @@
|
|||||||
|
enum MasterKeysService {
|
||||||
|
Allergies,
|
||||||
|
HistoryFamily,
|
||||||
|
HistoryMedical,
|
||||||
|
HistorySocial,
|
||||||
|
HistorySports,
|
||||||
|
HistorySurgical,
|
||||||
|
PhysicalExamination,
|
||||||
|
AllergySeverity,
|
||||||
|
physiotherapyGoals,
|
||||||
|
DiagnosisCondition,
|
||||||
|
DiagnosisType,
|
||||||
|
ICD10
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SelectedMasterKeysService on MasterKeysService {
|
||||||
|
// ignore: missing_return
|
||||||
|
int getMasterKeyService() {
|
||||||
|
switch (this) {
|
||||||
|
case MasterKeysService.Allergies:
|
||||||
|
return 11;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryFamily:
|
||||||
|
return 36;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryMedical:
|
||||||
|
return 37;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySocial:
|
||||||
|
return 38;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySports:
|
||||||
|
return 39;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySurgical:
|
||||||
|
return 66;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.PhysicalExamination:
|
||||||
|
return 59;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.AllergySeverity:
|
||||||
|
return 55;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.physiotherapyGoals:
|
||||||
|
return 117;
|
||||||
|
break;case MasterKeysService.DiagnosisCondition:
|
||||||
|
return 34;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.DiagnosisType:
|
||||||
|
return 35;
|
||||||
|
break;
|
||||||
|
case MasterKeysService.ICD10:
|
||||||
|
return 2500;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
class PostPrescriptionReqModel {
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
int clinicID;
|
||||||
|
int episodeID;
|
||||||
|
int appointmentNo;
|
||||||
|
int patientMRN;
|
||||||
|
List<PrescriptionRequestModel> prescriptionRequestModel;
|
||||||
|
|
||||||
|
PostPrescriptionReqModel(
|
||||||
|
{this.vidaAuthTokenID =
|
||||||
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiYTYxZjAyZjItNzUwZS00MTZkLWEzOTQtZTRjZmViZGVjMDE5IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUzNTIiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODUzMDAyNywiZXhwIjoxNjA5Mzk0MDI3LCJpYXQiOjE2MDg1MzAwMjd9.M1NTREPgz5vQH_GTZ_KGb0xQW5HEDs47AtNR3jbqnms",
|
||||||
|
this.clinicID = 1,
|
||||||
|
this.episodeID = 200012117,
|
||||||
|
this.appointmentNo = 2016054573,
|
||||||
|
this.patientMRN = 3120690,
|
||||||
|
this.prescriptionRequestModel});
|
||||||
|
|
||||||
|
PostPrescriptionReqModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
episodeID = json['EpisodeID'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
if (json['prescriptionRequestModel'] != null) {
|
||||||
|
prescriptionRequestModel = new List<PrescriptionRequestModel>();
|
||||||
|
json['prescriptionRequestModel'].forEach((v) {
|
||||||
|
prescriptionRequestModel.add(new PrescriptionRequestModel.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['EpisodeID'] = this.episodeID;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
if (this.prescriptionRequestModel != null) {
|
||||||
|
data['prescriptionRequestModel'] =
|
||||||
|
this.prescriptionRequestModel.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PrescriptionRequestModel {
|
||||||
|
int itemId;
|
||||||
|
String doseStartDate;
|
||||||
|
int duration;
|
||||||
|
int dose;
|
||||||
|
int doseUnitId;
|
||||||
|
int route;
|
||||||
|
int frequency;
|
||||||
|
int doseTime;
|
||||||
|
bool covered;
|
||||||
|
bool approvalRequired;
|
||||||
|
String remarks;
|
||||||
|
String icdcode10Id;
|
||||||
|
|
||||||
|
PrescriptionRequestModel(
|
||||||
|
{this.itemId = 4,
|
||||||
|
this.doseStartDate = "2020-12-20T13:07:41.769Z",
|
||||||
|
this.duration = 2,
|
||||||
|
this.dose = 1,
|
||||||
|
this.doseUnitId = 1,
|
||||||
|
this.route = 1,
|
||||||
|
this.frequency = 1,
|
||||||
|
this.doseTime = 1,
|
||||||
|
this.covered = true,
|
||||||
|
this.approvalRequired = true,
|
||||||
|
this.remarks = "test1",
|
||||||
|
this.icdcode10Id = "test3"});
|
||||||
|
|
||||||
|
PrescriptionRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
itemId = json['itemId'];
|
||||||
|
doseStartDate = json['doseStartDate'];
|
||||||
|
duration = json['duration'];
|
||||||
|
dose = json['dose'];
|
||||||
|
doseUnitId = json['doseUnitId'];
|
||||||
|
route = json['route'];
|
||||||
|
frequency = json['frequency'];
|
||||||
|
doseTime = json['doseTime'];
|
||||||
|
covered = json['covered'];
|
||||||
|
approvalRequired = json['approvalRequired'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
icdcode10Id = json['icdcode10Id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['itemId'] = this.itemId;
|
||||||
|
data['doseStartDate'] = this.doseStartDate;
|
||||||
|
data['duration'] = this.duration;
|
||||||
|
data['dose'] = this.dose;
|
||||||
|
data['doseUnitId'] = this.doseUnitId;
|
||||||
|
data['route'] = this.route;
|
||||||
|
data['frequency'] = this.frequency;
|
||||||
|
data['doseTime'] = this.doseTime;
|
||||||
|
data['covered'] = this.covered;
|
||||||
|
data['approvalRequired'] = this.approvalRequired;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['icdcode10Id'] = this.icdcode10Id;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,157 @@
|
|||||||
|
class PrescriptionModel {
|
||||||
|
List<EntityList> entityList;
|
||||||
|
dynamic rowcount;
|
||||||
|
dynamic statusMessage;
|
||||||
|
|
||||||
|
PrescriptionModel({this.entityList, this.rowcount, this.statusMessage});
|
||||||
|
|
||||||
|
PrescriptionModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['entityList'] != null) {
|
||||||
|
entityList = new List<EntityList>();
|
||||||
|
json['entityList'].forEach((v) {
|
||||||
|
entityList.add(new EntityList.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rowcount = json['rowcount'];
|
||||||
|
statusMessage = json['statusMessage'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.entityList != null) {
|
||||||
|
data['entityList'] = this.entityList.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['rowcount'] = this.rowcount;
|
||||||
|
data['statusMessage'] = this.statusMessage;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EntityList {
|
||||||
|
dynamic appointmentNo;
|
||||||
|
dynamic clinicName;
|
||||||
|
dynamic createdBy;
|
||||||
|
dynamic createdOn;
|
||||||
|
dynamic doctorName;
|
||||||
|
dynamic doseDailyQuantity;
|
||||||
|
dynamic doseDailyUnitID;
|
||||||
|
dynamic doseDetail;
|
||||||
|
dynamic doseDurationDays;
|
||||||
|
dynamic doseTimingID;
|
||||||
|
dynamic episodeID;
|
||||||
|
dynamic frequencyID;
|
||||||
|
dynamic icdCode10ID;
|
||||||
|
dynamic indication;
|
||||||
|
dynamic isDispensed;
|
||||||
|
dynamic isMedicineCovered;
|
||||||
|
dynamic isSIG;
|
||||||
|
dynamic medicationName;
|
||||||
|
dynamic medicationPrice;
|
||||||
|
dynamic medicineCode;
|
||||||
|
dynamic orderTypeDescription;
|
||||||
|
dynamic qty;
|
||||||
|
dynamic quantity;
|
||||||
|
dynamic remarks;
|
||||||
|
dynamic routeID;
|
||||||
|
dynamic startDate;
|
||||||
|
dynamic status;
|
||||||
|
dynamic stopDate;
|
||||||
|
dynamic uom;
|
||||||
|
|
||||||
|
EntityList(
|
||||||
|
{this.appointmentNo,
|
||||||
|
this.clinicName,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdOn,
|
||||||
|
this.doctorName,
|
||||||
|
this.doseDailyQuantity,
|
||||||
|
this.doseDailyUnitID,
|
||||||
|
this.doseDetail,
|
||||||
|
this.doseDurationDays,
|
||||||
|
this.doseTimingID,
|
||||||
|
this.episodeID,
|
||||||
|
this.frequencyID,
|
||||||
|
this.icdCode10ID,
|
||||||
|
this.indication,
|
||||||
|
this.isDispensed,
|
||||||
|
this.isMedicineCovered,
|
||||||
|
this.isSIG,
|
||||||
|
this.medicationName,
|
||||||
|
this.medicationPrice,
|
||||||
|
this.medicineCode,
|
||||||
|
this.orderTypeDescription,
|
||||||
|
this.qty,
|
||||||
|
this.quantity,
|
||||||
|
this.remarks,
|
||||||
|
this.routeID,
|
||||||
|
this.startDate,
|
||||||
|
this.status,
|
||||||
|
this.stopDate,
|
||||||
|
this.uom});
|
||||||
|
|
||||||
|
EntityList.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
clinicName = json['clinicName'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
doctorName = json['doctorName'];
|
||||||
|
doseDailyQuantity = json['doseDailyQuantity'];
|
||||||
|
doseDailyUnitID = json['doseDailyUnitID'];
|
||||||
|
doseDetail = json['doseDetail'];
|
||||||
|
doseDurationDays = json['doseDurationDays'];
|
||||||
|
doseTimingID = json['doseTimingID'];
|
||||||
|
episodeID = json['episodeID'];
|
||||||
|
frequencyID = json['frequencyID'];
|
||||||
|
icdCode10ID = json['icdCode10ID'];
|
||||||
|
indication = json['indication'];
|
||||||
|
isDispensed = json['isDispensed'];
|
||||||
|
isMedicineCovered = json['isMedicineCovered'];
|
||||||
|
isSIG = json['isSIG'];
|
||||||
|
medicationName = json['medicationName'];
|
||||||
|
medicationPrice = json['medicationPrice'];
|
||||||
|
medicineCode = json['medicineCode'];
|
||||||
|
orderTypeDescription = json['orderTypeDescription'];
|
||||||
|
qty = json['qty'];
|
||||||
|
quantity = json['quantity'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
routeID = json['routeID'];
|
||||||
|
startDate = json['startDate'];
|
||||||
|
status = json['status'];
|
||||||
|
stopDate = json['stopDate'];
|
||||||
|
uom = json['uom'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['clinicName'] = this.clinicName;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['doctorName'] = this.doctorName;
|
||||||
|
data['doseDailyQuantity'] = this.doseDailyQuantity;
|
||||||
|
data['doseDailyUnitID'] = this.doseDailyUnitID;
|
||||||
|
data['doseDetail'] = this.doseDetail;
|
||||||
|
data['doseDurationDays'] = this.doseDurationDays;
|
||||||
|
data['doseTimingID'] = this.doseTimingID;
|
||||||
|
data['episodeID'] = this.episodeID;
|
||||||
|
data['frequencyID'] = this.frequencyID;
|
||||||
|
data['icdCode10ID'] = this.icdCode10ID;
|
||||||
|
data['indication'] = this.indication;
|
||||||
|
data['isDispensed'] = this.isDispensed;
|
||||||
|
data['isMedicineCovered'] = this.isMedicineCovered;
|
||||||
|
data['isSIG'] = this.isSIG;
|
||||||
|
data['medicationName'] = this.medicationName;
|
||||||
|
data['medicationPrice'] = this.medicationPrice;
|
||||||
|
data['medicineCode'] = this.medicineCode;
|
||||||
|
data['orderTypeDescription'] = this.orderTypeDescription;
|
||||||
|
data['qty'] = this.qty;
|
||||||
|
data['quantity'] = this.quantity;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['routeID'] = this.routeID;
|
||||||
|
data['startDate'] = this.startDate;
|
||||||
|
data['status'] = this.status;
|
||||||
|
data['stopDate'] = this.stopDate;
|
||||||
|
data['uom'] = this.uom;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
class PrescriptionReqModel {
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
dynamic patientMRN;
|
||||||
|
|
||||||
|
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN});
|
||||||
|
|
||||||
|
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
class CategoriseProcedureModel {
|
||||||
|
String categoryID;
|
||||||
|
String categoryName;
|
||||||
|
|
||||||
|
CategoriseProcedureModel({this.categoryID, this.categoryName});
|
||||||
|
|
||||||
|
CategoriseProcedureModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
categoryID = json['CategoryID'];
|
||||||
|
categoryName = json['CategoryName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['CategoryID'] = this.categoryID;
|
||||||
|
data['CategoryName'] = this.categoryName;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
class GetProcedureModel {
|
||||||
|
List<EntityList> entityList;
|
||||||
|
int rowcount;
|
||||||
|
dynamic statusMessage;
|
||||||
|
|
||||||
|
GetProcedureModel({this.entityList, this.rowcount, this.statusMessage});
|
||||||
|
|
||||||
|
GetProcedureModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['entityList'] != null) {
|
||||||
|
entityList = new List<EntityList>();
|
||||||
|
json['entityList'].forEach((v) {
|
||||||
|
entityList.add(new EntityList.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rowcount = json['rowcount'];
|
||||||
|
statusMessage = json['statusMessage'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.entityList != null) {
|
||||||
|
data['entityList'] = this.entityList.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['rowcount'] = this.rowcount;
|
||||||
|
data['statusMessage'] = this.statusMessage;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EntityList {
|
||||||
|
bool allowedClinic;
|
||||||
|
String category;
|
||||||
|
String categoryID;
|
||||||
|
String genderValidation;
|
||||||
|
String group;
|
||||||
|
String orderedValidation;
|
||||||
|
int price;
|
||||||
|
String procedureId;
|
||||||
|
String procedureName;
|
||||||
|
String specialPermission;
|
||||||
|
String subGroup;
|
||||||
|
String template;
|
||||||
|
|
||||||
|
EntityList(
|
||||||
|
{this.allowedClinic,
|
||||||
|
this.category,
|
||||||
|
this.categoryID,
|
||||||
|
this.genderValidation,
|
||||||
|
this.group,
|
||||||
|
this.orderedValidation,
|
||||||
|
this.price,
|
||||||
|
this.procedureId,
|
||||||
|
this.procedureName,
|
||||||
|
this.specialPermission,
|
||||||
|
this.subGroup,
|
||||||
|
this.template});
|
||||||
|
|
||||||
|
EntityList.fromJson(Map<String, dynamic> json) {
|
||||||
|
allowedClinic = json['allowedClinic'];
|
||||||
|
category = json['category'];
|
||||||
|
categoryID = json['categoryID'];
|
||||||
|
genderValidation = json['genderValidation'];
|
||||||
|
group = json['group'];
|
||||||
|
orderedValidation = json['orderedValidation'];
|
||||||
|
price = json['price'];
|
||||||
|
procedureId = json['procedureId'];
|
||||||
|
procedureName = json['procedureName'];
|
||||||
|
specialPermission = json['specialPermission'];
|
||||||
|
subGroup = json['subGroup'];
|
||||||
|
template = json['template'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['allowedClinic'] = this.allowedClinic;
|
||||||
|
data['category'] = this.category;
|
||||||
|
data['categoryID'] = this.categoryID;
|
||||||
|
data['genderValidation'] = this.genderValidation;
|
||||||
|
data['group'] = this.group;
|
||||||
|
data['orderedValidation'] = this.orderedValidation;
|
||||||
|
data['price'] = this.price;
|
||||||
|
data['procedureId'] = this.procedureId;
|
||||||
|
data['procedureName'] = this.procedureName;
|
||||||
|
data['specialPermission'] = this.specialPermission;
|
||||||
|
data['subGroup'] = this.subGroup;
|
||||||
|
data['template'] = this.template;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
class GetProcedureReqModel {
|
||||||
|
int clinicId;
|
||||||
|
int patientMRN;
|
||||||
|
int pageSize;
|
||||||
|
int pageIndex;
|
||||||
|
List<String> search;
|
||||||
|
dynamic categoryId;
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
|
||||||
|
GetProcedureReqModel(
|
||||||
|
{this.clinicId,
|
||||||
|
this.patientMRN,
|
||||||
|
this.pageSize,
|
||||||
|
this.pageIndex,
|
||||||
|
this.search,
|
||||||
|
this.categoryId,
|
||||||
|
this.vidaAuthTokenID});
|
||||||
|
|
||||||
|
GetProcedureReqModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
clinicId = json['ClinicId'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
pageSize = json['PageSize'];
|
||||||
|
pageIndex = json['PageIndex'];
|
||||||
|
search = json['Search'].cast<String>();
|
||||||
|
categoryId = json['CategoryId'];
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ClinicId'] = this.clinicId;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['PageSize'] = this.pageSize;
|
||||||
|
data['PageIndex'] = this.pageIndex;
|
||||||
|
data['Search'] = this.search;
|
||||||
|
data['CategoryId'] = this.categoryId;
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
class PostProcedureReqModel {
|
||||||
|
int patientMRN;
|
||||||
|
int appointmentNo;
|
||||||
|
int episodeID;
|
||||||
|
List<Procedures> procedures;
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
|
||||||
|
PostProcedureReqModel(
|
||||||
|
{this.patientMRN,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.episodeID,
|
||||||
|
this.procedures,
|
||||||
|
this.vidaAuthTokenID});
|
||||||
|
|
||||||
|
PostProcedureReqModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
episodeID = json['EpisodeID'];
|
||||||
|
if (json['Procedures'] != null) {
|
||||||
|
procedures = new List<Procedures>();
|
||||||
|
json['Procedures'].forEach((v) {
|
||||||
|
procedures.add(new Procedures.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['EpisodeID'] = this.episodeID;
|
||||||
|
if (this.procedures != null) {
|
||||||
|
data['Procedures'] = this.procedures.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Procedures {
|
||||||
|
String procedure;
|
||||||
|
String category;
|
||||||
|
List<Controls> controls;
|
||||||
|
|
||||||
|
Procedures({this.procedure, this.category, this.controls});
|
||||||
|
|
||||||
|
Procedures.fromJson(Map<String, dynamic> json) {
|
||||||
|
procedure = json['Procedure'];
|
||||||
|
category = json['Category'];
|
||||||
|
if (json['Controls'] != null) {
|
||||||
|
controls = new List<Controls>();
|
||||||
|
json['Controls'].forEach((v) {
|
||||||
|
controls.add(new Controls.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Procedure'] = this.procedure;
|
||||||
|
data['Category'] = this.category;
|
||||||
|
if (this.controls != null) {
|
||||||
|
data['Controls'] = this.controls.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Controls {
|
||||||
|
String code;
|
||||||
|
String controlValue;
|
||||||
|
|
||||||
|
Controls({this.code, this.controlValue});
|
||||||
|
|
||||||
|
Controls.fromJson(Map<String, dynamic> json) {
|
||||||
|
code = json['Code'];
|
||||||
|
controlValue = json['ControlValue'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Code'] = this.code;
|
||||||
|
data['ControlValue'] = this.controlValue;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
|
||||||
|
|
||||||
|
import 'base/lookup-service.dart';
|
||||||
|
|
||||||
|
class SOAPService extends LookupService {
|
||||||
|
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_ALLERGIES,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
listOfAllergies.clear();
|
||||||
|
response['List_Allergies']['entityList'].forEach((v) {
|
||||||
|
listOfAllergies.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: getAllergiesRequestModel.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
|
||||||
|
await baseAppClient.post(POST_ALLERGY,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postAllergyRequestModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postHistories(
|
||||||
|
PostHistoriesRequestModel postHistoriesRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(POST_HISTORY,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postHistoriesRequestModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postChiefComplaint(
|
||||||
|
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(POST_CHIEF_COMPLAINT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postChiefComplaintRequestModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postPhysicalExam(
|
||||||
|
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(POST_PHYSICAL_EXAM,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postPhysicalExamRequestModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postProgressNote(
|
||||||
|
PostProgressNoteRequestModel postProgressNoteRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(POST_PROGRESS_NOTE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postProgressNoteRequestModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postAssessment(
|
||||||
|
PostAssessmentRequestModel postAssessmentRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(POST_ASSESSMENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postAssessmentRequestModel.toJson());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,59 @@
|
|||||||
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
|
||||||
class BaseService {
|
class BaseService {
|
||||||
String error;
|
String error;
|
||||||
bool hasError = false;
|
bool hasError = false;
|
||||||
BaseAppClient baseAppClient = BaseAppClient();
|
BaseAppClient baseAppClient = BaseAppClient();
|
||||||
//TODO add the user login model when we need it
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
DoctorProfileModel doctorProfile;
|
||||||
|
|
||||||
|
List<PatientArrivalEntity> patientArrivalList = [];
|
||||||
|
|
||||||
|
//TODO add the user login model when we need it
|
||||||
|
Future<DoctorProfileModel> getDoctorProfile() async {
|
||||||
|
if (doctorProfile == null) {
|
||||||
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
||||||
|
if (profile != null) {
|
||||||
|
doctorProfile = DoctorProfileModel.fromJson(profile);
|
||||||
|
if (doctorProfile != null) {
|
||||||
|
return doctorProfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return doctorProfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPatientArrivalList(String date,{String fromDate}) async{
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['From'] = fromDate == null ? date : fromDate;
|
||||||
|
body['To'] = date;
|
||||||
|
body['PageIndex'] = 0;
|
||||||
|
body['PageSize'] = 0;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_ARRIVAL_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
patientArrivalList.clear();
|
||||||
|
|
||||||
|
response['patientArrivalList']['entityList'].forEach((v) {
|
||||||
|
PatientArrivalEntity item = PatientArrivalEntity.fromJson(v);
|
||||||
|
patientArrivalList.add(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
this.error = error;
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,133 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
import 'base_service.dart';
|
||||||
|
|
||||||
|
class LookupService extends BaseService {
|
||||||
|
List<MasterKeyModel> listOfAllergies = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get allergySeverityList => _allergySeverityList;
|
||||||
|
List<MasterKeyModel> _allergySeverityList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyFamilyList => _historyFamilyList;
|
||||||
|
List<MasterKeyModel> _historyFamilyList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyMedicalList => _historyMedicalList;
|
||||||
|
List<MasterKeyModel> _historyMedicalList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySportList => _historySportList;
|
||||||
|
List<MasterKeyModel> _historySportList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySocialList => _historySocialList;
|
||||||
|
List<MasterKeyModel> _historySocialList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySurgicalList => _historySurgicalList;
|
||||||
|
List<MasterKeyModel> _historySurgicalList = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> listOfPhysiotherapyGoals = [];
|
||||||
|
|
||||||
|
List<MasterKeyModel> get physicalExaminationList => _physicalExaminationList;
|
||||||
|
List<MasterKeyModel> _physicalExaminationList = [];
|
||||||
|
|
||||||
|
// List<MasterKeyModel> listOfPhysiotherapyGoals = [];
|
||||||
|
List<MasterKeyModel> listOfDiagnosisType = [];
|
||||||
|
List<MasterKeyModel> listOfDiagnosisCondition = [];
|
||||||
|
List<MasterKeyModel> listOfICD10 = [];
|
||||||
|
|
||||||
|
Future getMasterLookup(MasterKeysService masterKeys) async {
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = {
|
||||||
|
"MasterInput": masterKeys.getMasterKeyService()
|
||||||
|
};
|
||||||
|
await baseAppClient.post(GET_MASTER_LOOKUP_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
setMasterLookupInCorrectArray(
|
||||||
|
response['MasterLookUpList']['entityList'], masterKeys);
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
setMasterLookupInCorrectArray(entryList, MasterKeysService masterKeys) {
|
||||||
|
switch (masterKeys) {
|
||||||
|
case MasterKeysService.Allergies:
|
||||||
|
listOfAllergies.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
listOfAllergies.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryFamily:
|
||||||
|
_historyFamilyList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historyFamilyList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistoryMedical:
|
||||||
|
_historyMedicalList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historyMedicalList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySocial:
|
||||||
|
historySocialList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
historySocialList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySports:
|
||||||
|
_historySportList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historySportList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.HistorySurgical:
|
||||||
|
_historySurgicalList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_historySurgicalList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.PhysicalExamination:
|
||||||
|
_physicalExaminationList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_physicalExaminationList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.AllergySeverity:
|
||||||
|
_allergySeverityList.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
_allergySeverityList.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.physiotherapyGoals:
|
||||||
|
listOfPhysiotherapyGoals.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MasterKeysService.DiagnosisType:
|
||||||
|
listOfDiagnosisType.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
listOfDiagnosisType
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.DiagnosisCondition:
|
||||||
|
listOfDiagnosisCondition.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
listOfDiagnosisCondition
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case MasterKeysService.ICD10:
|
||||||
|
listOfICD10.clear();
|
||||||
|
entryList.forEach((v) {
|
||||||
|
listOfICD10
|
||||||
|
.add(MasterKeyModel.fromJson(v));
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
||||||
|
|
||||||
|
class DashboardService extends BaseService {
|
||||||
|
List<DashboardModel> _dashboardItemsList = [];
|
||||||
|
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
|
||||||
|
|
||||||
|
// DashboardModel _dashboard = DashboardModel();
|
||||||
|
|
||||||
|
Future getDashboard() async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_DASHBOARD,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_dashboardItemsList.clear();
|
||||||
|
response['listDoctorDashboarKPI'].forEach((v) {
|
||||||
|
_dashboardItemsList.add(DashboardModel.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: {
|
||||||
|
// "VidaAuthTokenID":
|
||||||
|
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODA0IiwianRpIjoiZDYxZmM5MTQtZWFhYy00YjQ4LTgyMmEtMmE3OTNlZDMzZGYwIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMjgwNCIsIk5hbWUiOiJNVUhBTU1BRCBBWkFNIiwiRW1wbG95ZWVJZCI6IjE0ODUiLCJGYWNpbGl0eUdyb3VwSWQiOiIwMTAyNjYiLCJGYWNpbGl0eUlkIjoiMTUiLCJQaGFyYW1jeUZhY2lsaXR5SWQiOiI1NSIsIklTX1BIQVJNQUNZX0NPTk5FQ1RFRCI6IlRydWUiLCJEb2N0b3JJZCI6IjE0ODUiLCJTRVNTSU9OSUQiOiIyMTU3NTgwOCIsIkNsaW5pY0lkIjoiMyIsInJvbGUiOlsiU0VDVVJJVFkgQURNSU5JU1RSQVRPUlMiLCJTRVRVUCBBRE1JTklTVFJBVE9SUyIsIkNFTydTIiwiRVhFQ1VUSVZFIERJUkVDVE9SUyIsIk1BTkFHRVJTIiwiU1VQRVJWSVNPUlMiLCJDTElFTlQgU0VSVklDRVMgQ09PUkRJTkFUT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIFNVUEVSVklTT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIE1BTkdFUlMiLCJIRUFEIE5VUlNFUyIsIkRPQ1RPUlMiLCJDSElFRiBPRiBNRURJQ0FMIFNUQUZGUyIsIkJJTy1NRURJQ0FMIFRFQ0hOSUNJQU5TIiwiQklPLU1FRElDQUwgRU5HSU5FRVJTIiwiQklPLU1FRElDQUwgREVQQVJUTUVOVCBIRUFEUyIsIklUIEhFTFAgREVTSyIsIkFETUlOSVNUUkFUT1JTIiwiTEFCIEFETUlOSVNUUkFUT1IiLCJMQUIgVEVDSE5JQ0lBTiIsIkJVU0lORVNTIE9GRklDRSBTVEFGRiIsIkZJTkFOQ0UgQUNDT1VOVEFOVFMiLCJQSEFSTUFDWSBTVEFGRiIsIkFDQ09VTlRTIFNUQUZGIiwiTEFCIFJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiSU5QQVRJRU5UIEJJTExJTkcgU1VQRVJWSVNPUiIsIkxEUi1PUiBOVVJTRVMiLCJBRE1JU1NJT04gU1RBRkYiLCJIRUxQIERFU0sgQURNSU4iLCJBUFBST1ZBTCBTVEFGRiIsIklOUEFUSUVOVCBCSUxMSU5HIENPT1JESU5BVE9SIiwiQklMTElORyBTVEFGRiIsIkNPTlNFTlQgIiwiQ29uc2VudCAtIERlbnRhbCIsIldFQkVNUiJdLCJuYmYiOjE2MDgwMjg0NzQsImV4cCI6MTYwODg5MjQ3NCwiaWF0IjoxNjA4MDI4NDc0fQ.8OJcy6vUuPnNTi_qSjip8YCrFdaRLtJKbNKXcMtnQxk"
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,231 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
|
||||||
|
|
||||||
|
import 'base/lookup-service.dart';
|
||||||
|
|
||||||
|
class PatientReferralService extends LookupService {
|
||||||
|
List<dynamic> projectsList = [];
|
||||||
|
List<dynamic> clinicsList = [];
|
||||||
|
List<dynamic> doctorsList = [];
|
||||||
|
List<MyReferredPatientModel> listMyReferredPatientModel = [];
|
||||||
|
List<PendingReferral> pendingReferralList = [];
|
||||||
|
String setupID = "0";
|
||||||
|
|
||||||
|
Future getProjectsList() async {
|
||||||
|
hasError = false;
|
||||||
|
const url = GET_PROJECTS;
|
||||||
|
var info = {
|
||||||
|
"LanguageID": 1,
|
||||||
|
"stamp": "2020-02-26T13:51:44.111Z",
|
||||||
|
"IPAdress": "11.11.11.11",
|
||||||
|
"VersionID": 1.2,
|
||||||
|
"Channel": 9,
|
||||||
|
"TokenID": "",
|
||||||
|
"SessionID": "i1UJwCTSqt",
|
||||||
|
"IsLoginForDoctorApp": true
|
||||||
|
};
|
||||||
|
dynamic localRes;
|
||||||
|
|
||||||
|
await baseAppClient.post(url, onSuccess: (response, statusCode) async {
|
||||||
|
if (response['MessageStatus'] == 1) {
|
||||||
|
projectsList = response['ListProject'];
|
||||||
|
} else {
|
||||||
|
// handel error
|
||||||
|
projectsList = ListProject;
|
||||||
|
}
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
projectsList = ListProject;
|
||||||
|
}, body: info);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getProjectInfo(int projectId) async {
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['ProjectID'] = projectId;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
PROJECT_GET_INFO,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
setupID = response['ProjectInfo'][0]['facilityGroupId'];
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getClinicsList(int projectId) async {
|
||||||
|
hasError = false;
|
||||||
|
ClinicByProjectIdRequest _clinicByProjectIdRequest =
|
||||||
|
ClinicByProjectIdRequest();
|
||||||
|
_clinicByProjectIdRequest.projectID = projectId;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
PATIENT_GET_CLINIC_BY_PROJECT_URL,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
clinicsList = [];
|
||||||
|
clinicsList = response['List_Clinic_All'];
|
||||||
|
print(response['List_Clinic_All']);
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: _clinicByProjectIdRequest.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getDoctorsList(String clinicId) async {
|
||||||
|
hasError = false;
|
||||||
|
DoctorsByClinicIdRequest _doctorsByClinicIdRequest =
|
||||||
|
DoctorsByClinicIdRequest();
|
||||||
|
|
||||||
|
_doctorsByClinicIdRequest.clinicID = clinicId;
|
||||||
|
await baseAppClient.post(
|
||||||
|
PATIENT_GET_DOCTOR_BY_CLINIC_URL,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
doctorsList = [];
|
||||||
|
doctorsList = response['List_Doctors_All'];
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: _doctorsByClinicIdRequest.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getMyReferredPatient() async {
|
||||||
|
hasError = false;
|
||||||
|
RequestMyReferralPatientModel _requestMyReferralPatient =
|
||||||
|
RequestMyReferralPatientModel();
|
||||||
|
DoctorProfileModel doctorProfile = await getDoctorProfile();
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_MY_REFERRED_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
listMyReferredPatientModel.clear();
|
||||||
|
|
||||||
|
response['List_MyReferredPatient'].forEach((v) {
|
||||||
|
MyReferredPatientModel item = MyReferredPatientModel.fromJson(v);
|
||||||
|
if (doctorProfile != null) {
|
||||||
|
item.isReferralDoctorSameBranch =
|
||||||
|
doctorProfile.projectID == item.projectId;
|
||||||
|
} else {
|
||||||
|
item.isReferralDoctorSameBranch = false;
|
||||||
|
}
|
||||||
|
listMyReferredPatientModel.add(item);
|
||||||
|
});
|
||||||
|
// print(response['List_MyReferredPatient']);
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: _requestMyReferralPatient.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPendingReferralList() async {
|
||||||
|
hasError = false;
|
||||||
|
DoctorProfileModel doctorProfile = await getDoctorProfile();
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['ClinicID'] = 0;
|
||||||
|
body['DoctorID'] = doctorProfile.doctorID;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PENDING_REFERRAL_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
pendingReferralList.clear();
|
||||||
|
|
||||||
|
response['PendingReferralList'].forEach((v) {
|
||||||
|
PendingReferral item = PendingReferral.fromJson(v);
|
||||||
|
item.isReferralDoctorSameBranch =
|
||||||
|
item.targetProjectId == item.sourceProjectId;
|
||||||
|
pendingReferralList.add(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
|
||||||
|
hasError = false;
|
||||||
|
DoctorProfileModel doctorProfile = await getDoctorProfile();
|
||||||
|
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['IsAccepted'] = isAccepted;
|
||||||
|
body['AppointmentNo'] = pendingReferral.sourceAppointmentNo;
|
||||||
|
body['PatientMRN'] = pendingReferral.patientID;
|
||||||
|
body['PatientName'] = pendingReferral.patientName;
|
||||||
|
body['ReferralResponse'] = pendingReferral.remarksFromSource;
|
||||||
|
body['SetupID'] = pendingReferral.sourceSetupID;
|
||||||
|
body['DoctorName'] = doctorProfile.doctorName;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
RESPONSE_PENDING_REFERRAL_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future makeReferral(
|
||||||
|
PatientArrivalEntity patientArrivalEntity,
|
||||||
|
String isoStringDate,
|
||||||
|
int projectID,
|
||||||
|
int clinicID,
|
||||||
|
int doctorID,
|
||||||
|
String remarks) async {
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
|
||||||
|
List<dynamic> physiotheraphyGoalsList = [];
|
||||||
|
listOfPhysiotherapyGoals.forEach((element) {
|
||||||
|
physiotheraphyGoalsList
|
||||||
|
.add({"goalId": element.id, "remarks": element.remarks});
|
||||||
|
});
|
||||||
|
|
||||||
|
body['PatientMRN'] = patientArrivalEntity.patientMRN;
|
||||||
|
body['AppointmentNo'] = patientArrivalEntity.appointmentNo;
|
||||||
|
body['SetupID'] = setupID;
|
||||||
|
body['appointmentDate'] = isoStringDate;
|
||||||
|
body['SlotStart'] = isoStringDate;
|
||||||
|
body['SlotEnd'] = isoStringDate;
|
||||||
|
body['Remarks'] = remarks;
|
||||||
|
body['ProjectID'] = projectID;
|
||||||
|
body['ClinicID'] = clinicID;
|
||||||
|
body['DoctorID'] = doctorID;
|
||||||
|
body['noOfSessions'] = 1;
|
||||||
|
body['physiotheraphyGoalsList'] = physiotheraphyGoalsList;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
CREATE_REFERRAL_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print(response.toString());
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
|
||||||
|
|
||||||
|
class VitalSignsService extends BaseService{
|
||||||
|
|
||||||
|
List<VitalSignResModel> patientVitalSignList = [];
|
||||||
|
List<VitalSignResModel> patientVitalSignOrderdSubList = [];
|
||||||
|
VitalSignData patientVitalSigns;
|
||||||
|
|
||||||
|
/*Future getPatientVitalSign(patient) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_VITAL_SIGN,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
patientVitalSignList = [];
|
||||||
|
response['List_DoctorPatientVitalSign'].forEach((v) {
|
||||||
|
patientVitalSignList.add(new VitalSignResModel.fromJson(v));
|
||||||
|
});
|
||||||
|
|
||||||
|
if (patientVitalSignList.length > 0) {
|
||||||
|
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
|
||||||
|
patientVitalSignOrderdSubListTemp = patientVitalSignList;
|
||||||
|
patientVitalSignOrderdSubListTemp
|
||||||
|
.sort((VitalSignResModel a, VitalSignResModel b) {
|
||||||
|
return b.vitalSignDate.microsecondsSinceEpoch -
|
||||||
|
a.vitalSignDate.microsecondsSinceEpoch;
|
||||||
|
});
|
||||||
|
patientVitalSignOrderdSubList.clear();
|
||||||
|
int length = patientVitalSignOrderdSubListTemp.length >= 20
|
||||||
|
? 20
|
||||||
|
: patientVitalSignOrderdSubListTemp.length;
|
||||||
|
for (int x = 0; x < length; x++) {
|
||||||
|
patientVitalSignOrderdSubList
|
||||||
|
.add(patientVitalSignOrderdSubListTemp[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: patient,
|
||||||
|
);
|
||||||
|
} // Vit*/
|
||||||
|
|
||||||
|
Future getPatientVitalSign(PatientArrivalEntity patientArrivalEntity) async {
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['PatientMRN'] = patientArrivalEntity.patientMRN;
|
||||||
|
body['AppointmentNo'] = patientArrivalEntity.appointmentNo;
|
||||||
|
body['EpisodeID'] = patientArrivalEntity.episodeNo;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_VITAL_SIGN_DATA,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
if(response['VitalSignsList'] != null){
|
||||||
|
if(response['VitalSignsList']['entityList'] = null && (response['VitalSignsList']['entityList'] as List).length > 0){
|
||||||
|
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error.toString();
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
|
||||||
|
class PrescriptionService extends BaseService {
|
||||||
|
List<PrescriptionModel> _prescriptionList = List();
|
||||||
|
List<PrescriptionModel> get prescriptionList => _prescriptionList;
|
||||||
|
|
||||||
|
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(
|
||||||
|
patientMRN: 1231755,
|
||||||
|
vidaAuthTokenID:
|
||||||
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODA0IiwianRpIjoiNzNiNmUyZDctMjA0ZC00NzAyLTkxMDYtODE3MzI3OTZkYzI5IiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMjgwNCIsIk5hbWUiOiJNVUhBTU1BRCBBWkFNIiwiRW1wbG95ZWVJZCI6IjE0ODUiLCJGYWNpbGl0eUdyb3VwSWQiOiIwMTAyNjYiLCJGYWNpbGl0eUlkIjoiMTUiLCJQaGFyYW1jeUZhY2lsaXR5SWQiOiI1NSIsIklTX1BIQVJNQUNZX0NPTk5FQ1RFRCI6IlRydWUiLCJEb2N0b3JJZCI6IjE0ODUiLCJTRVNTSU9OSUQiOiIyMTU3NjIwOSIsIkNsaW5pY0lkIjoiMyIsInJvbGUiOlsiU0VDVVJJVFkgQURNSU5JU1RSQVRPUlMiLCJTRVRVUCBBRE1JTklTVFJBVE9SUyIsIkNFTydTIiwiRVhFQ1VUSVZFIERJUkVDVE9SUyIsIk1BTkFHRVJTIiwiU1VQRVJWSVNPUlMiLCJDTElFTlQgU0VSVklDRVMgQ09PUkRJTkFUT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIFNVUEVSVklTT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIE1BTkdFUlMiLCJIRUFEIE5VUlNFUyIsIkRPQ1RPUlMiLCJDSElFRiBPRiBNRURJQ0FMIFNUQUZGUyIsIkJJTy1NRURJQ0FMIFRFQ0hOSUNJQU5TIiwiQklPLU1FRElDQUwgRU5HSU5FRVJTIiwiQklPLU1FRElDQUwgREVQQVJUTUVOVCBIRUFEUyIsIklUIEhFTFAgREVTSyIsIkFETUlOSVNUUkFUT1JTIiwiTEFCIEFETUlOSVNUUkFUT1IiLCJMQUIgVEVDSE5JQ0lBTiIsIkJVU0lORVNTIE9GRklDRSBTVEFGRiIsIkZJTkFOQ0UgQUNDT1VOVEFOVFMiLCJQSEFSTUFDWSBTVEFGRiIsIkFDQ09VTlRTIFNUQUZGIiwiTEFCIFJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiSU5QQVRJRU5UIEJJTExJTkcgU1VQRVJWSVNPUiIsIkxEUi1PUiBOVVJTRVMiLCJBRE1JU1NJT04gU1RBRkYiLCJIRUxQIERFU0sgQURNSU4iLCJBUFBST1ZBTCBTVEFGRiIsIklOUEFUSUVOVCBCSUxMSU5HIENPT1JESU5BVE9SIiwiQklMTElORyBTVEFGRiIsIkNPTlNFTlQgIiwiQ29uc2VudCAtIERlbnRhbCIsIldFQkVNUiJdLCJuYmYiOjE2MDgyMzY2MjAsImV4cCI6MTYwOTEwMDYyMCwiaWF0IjoxNjA4MjM2NjIwfQ.z4Lh0dCRr9GWXvaTo7x5GPV7R5z8ONyh3-0uk3PXMu8",
|
||||||
|
);
|
||||||
|
|
||||||
|
PostPrescriptionReqModel _postPrescriptionReqModel =
|
||||||
|
PostPrescriptionReqModel();
|
||||||
|
|
||||||
|
Future getPrescription() async {
|
||||||
|
hasError = false;
|
||||||
|
_prescriptionList.clear();
|
||||||
|
await baseAppClient.post(GET_PRESCRIPTION_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_prescriptionList
|
||||||
|
.add(PrescriptionModel.fromJson(response['PrescriptionList']));
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: _prescriptionReqModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postPrescription() async {
|
||||||
|
hasError = false;
|
||||||
|
//_prescriptionList.clear();
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_CATEGORISE_PROCEDURE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_prescriptionList
|
||||||
|
.add(PrescriptionModel.fromJson(response['PrescriptionList']));
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
class ProcedureService extends BaseService {
|
||||||
|
List<GetProcedureModel> _procedureList = List();
|
||||||
|
List<GetProcedureModel> get procedureList => _procedureList;
|
||||||
|
List<CategoriseProcedureModel> _categoriesList = List();
|
||||||
|
List<CategoriseProcedureModel> get categoriesList => _categoriesList;
|
||||||
|
List<Procedures> procedureslist = List();
|
||||||
|
|
||||||
|
Procedures t1 = Procedures(
|
||||||
|
category: '02',
|
||||||
|
procedure: '02011002',
|
||||||
|
);
|
||||||
|
|
||||||
|
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
|
||||||
|
clinicId: 0,
|
||||||
|
pageSize: 10,
|
||||||
|
pageIndex: 1,
|
||||||
|
patientMRN: 0,
|
||||||
|
//categoryId: null,
|
||||||
|
vidaAuthTokenID:
|
||||||
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
|
||||||
|
|
||||||
|
search: ["lab"],
|
||||||
|
);
|
||||||
|
|
||||||
|
PostProcedureReqModel _postProcedureReqModel = PostProcedureReqModel();
|
||||||
|
|
||||||
|
Future getProcedure() async {
|
||||||
|
hasError = false;
|
||||||
|
_procedureList.clear();
|
||||||
|
await baseAppClient.post(GET_PROCEDURE_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_procedureList.add(GetProcedureModel.fromJson(response['ProcedureList']));
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: _getProcedureReqModel.toJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getCategories() async {
|
||||||
|
hasError = false;
|
||||||
|
_categoriesList.clear();
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_CATEGORISE_PROCEDURE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_categoriesList
|
||||||
|
.add(CategoriseProcedureModel.fromJson(response['listCategories']));
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {
|
||||||
|
hasError = false;
|
||||||
|
_procedureList.clear();
|
||||||
|
await baseAppClient.post(POST_PROCEDURE_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print("Success");
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
}, body: postProcedureReqModel.toJson());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
|
||||||
|
// import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
||||||
|
|
||||||
|
class SickLeaveService extends BaseService {
|
||||||
|
Map get sickLeavestatisitics => _statistics;
|
||||||
|
Map _statistics = {};
|
||||||
|
|
||||||
|
List<GetAllSickLeaveResponse> get getAllSickLeave => _getAllsickLeave;
|
||||||
|
List<GetAllSickLeaveResponse> _getAllsickLeave = [];
|
||||||
|
Future getStatistics(appoNo, patientMRN) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_SICKLEAVE_STATISTIC,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
print(response);
|
||||||
|
_statistics = {};
|
||||||
|
_statistics = response['SickLeaveStatistics'];
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: {"PatientMRN": patientMRN, "AppointmentNo": appoNo},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async {
|
||||||
|
addSickLeaveRequest.appointmentNo = '2016054661';
|
||||||
|
addSickLeaveRequest.patientMRN = '3120746';
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
ADD_SICK_LEAVE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
Future.value(response);
|
||||||
|
print(response);
|
||||||
|
// _statistics = {};
|
||||||
|
// _statistics = response['SickLeaveStatistics'];
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: addSickLeaveRequest.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future extendSickLeave(GetAllSickLeaveResponse request) async {
|
||||||
|
var extendSickLeaveRequest = ExtendSickLeaveRequest();
|
||||||
|
extendSickLeaveRequest.patientMRN =
|
||||||
|
request.patientMRN.toString(); //'3120746';
|
||||||
|
extendSickLeaveRequest.previousRequestNo = request.requestNo.toString();
|
||||||
|
extendSickLeaveRequest.noOfDays = request.noOfDays.toString();
|
||||||
|
extendSickLeaveRequest.remarks = request.remarks;
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
EXTEND_SICK_LEAVE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
Future.value(response);
|
||||||
|
print(response);
|
||||||
|
// _statistics = {};
|
||||||
|
// _statistics = response['SickLeaveStatistics'];
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: extendSickLeaveRequest.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getSickLeave() async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_SICK_LEAVE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
Future.value(response);
|
||||||
|
_getAllsickLeave.clear();
|
||||||
|
response['SickLeavesList']['entityList'].forEach((v) {
|
||||||
|
_getAllsickLeave.add(GetAllSickLeaveResponse.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: {'PatientMRN': 3120772},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,123 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/SOAP_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/Allergy_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'base_view_model.dart';
|
||||||
|
|
||||||
|
class SOAPViewModel extends BaseViewModel {
|
||||||
|
SOAPService _SOAPService = locator<SOAPService>();
|
||||||
|
|
||||||
|
List<MasterKeyModel> get listOfAllergies => _SOAPService.listOfAllergies;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get allergySeverityList =>
|
||||||
|
_SOAPService.allergySeverityList;
|
||||||
|
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyFamilyList => _SOAPService.historyFamilyList;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historyMedicalList => _SOAPService.historyMedicalList;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySportList => _SOAPService.historySportList;
|
||||||
|
|
||||||
|
List<MasterKeyModel> get historySocialList => _SOAPService.historySocialList;
|
||||||
|
List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList;
|
||||||
|
List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList,...historySportList];
|
||||||
|
List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
|
||||||
|
List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
|
||||||
|
List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;
|
||||||
|
List<MasterKeyModel> get listOfICD10 => _SOAPService.listOfICD10;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _SOAPService.getAllergies(getAllergiesRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getMasterLookup(MasterKeysService masterKeys) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _SOAPService.getMasterLookup(masterKeys);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postAllergy(postAllergyRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postHistories(PostHistoriesRequestModel postHistoriesRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postHistories(postHistoriesRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postChiefComplaint(PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postChiefComplaint(postChiefComplaintRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postPhysicalExam(postPhysicalExamRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postProgressNote(postProgressNoteRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postAssessment(PostAssessmentRequestModel postAssessmentRequestModel) async {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _SOAPService.postAssessment(postAssessmentRequestModel);
|
||||||
|
if (_SOAPService.hasError) {
|
||||||
|
error = _SOAPService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,17 +1,39 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class BaseViewModel extends ChangeNotifier {
|
class BaseViewModel extends ChangeNotifier {
|
||||||
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
DoctorProfileModel doctorProfile;
|
||||||
|
|
||||||
ViewState _state = ViewState.Idle;
|
ViewState _state = ViewState.Idle;
|
||||||
bool isInternetConnection = true;
|
bool isInternetConnection = true;
|
||||||
|
|
||||||
ViewState get state => _state;
|
ViewState get state => _state;
|
||||||
|
|
||||||
String error = "";
|
String error = "";
|
||||||
|
|
||||||
//TODO add the user login model when we need it
|
//TODO add the user login model when we need it
|
||||||
|
|
||||||
void setState(ViewState viewState) {
|
void setState(ViewState viewState) {
|
||||||
_state = viewState;
|
_state = viewState;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<DoctorProfileModel> getDoctorProfile() async {
|
||||||
|
if (doctorProfile == null) {
|
||||||
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
||||||
|
if (profile != null) {
|
||||||
|
doctorProfile = DoctorProfileModel.fromJson(profile);
|
||||||
|
if (doctorProfile != null) {
|
||||||
|
return doctorProfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return doctorProfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/dasboard_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'base_view_model.dart';
|
||||||
|
|
||||||
|
class DashboardViewModel extends BaseViewModel {
|
||||||
|
DashboardService _dashboardService = locator<DashboardService>();
|
||||||
|
get dashboardItemsList => _dashboardService.dashboardItemsList;
|
||||||
|
|
||||||
|
Future getDashboard() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _dashboardService.getDashboard();
|
||||||
|
if (_dashboardService.hasError) {
|
||||||
|
error = _dashboardService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,156 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/patient-doctor-referral-service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
|
||||||
|
class PatientReferralViewModel extends BaseViewModel {
|
||||||
|
PatientReferralService _referralPatientService =
|
||||||
|
locator<PatientReferralService>();
|
||||||
|
|
||||||
|
List<dynamic> get branchesList => _referralPatientService.projectsList;
|
||||||
|
|
||||||
|
List<dynamic> get clinicsList => _referralPatientService.clinicsList;
|
||||||
|
|
||||||
|
List<dynamic> get doctorsList => _referralPatientService.doctorsList;
|
||||||
|
|
||||||
|
List<MyReferredPatientModel> get listMyReferredPatientModel =>
|
||||||
|
_referralPatientService.listMyReferredPatientModel;
|
||||||
|
|
||||||
|
List<PendingReferral> get pendingReferral =>
|
||||||
|
_referralPatientService.pendingReferralList;
|
||||||
|
|
||||||
|
List<PatientArrivalEntity> get patientArrivalList =>
|
||||||
|
_referralPatientService.patientArrivalList;
|
||||||
|
|
||||||
|
Future getMasterLookup(MasterKeysService masterKeys) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getMasterLookup(masterKeys);
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
await getBranches();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getBranches() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getProjectsList();
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getClinics(int projectId) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getClinicsList(projectId);
|
||||||
|
await _referralPatientService.getProjectInfo(projectId);
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getClinicDoctors(String clinicId) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getDoctorsList(clinicId);
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> getDoctorBranch() async {
|
||||||
|
DoctorProfileModel doctorProfile = await getDoctorProfile();
|
||||||
|
if (doctorProfile != null) {
|
||||||
|
dynamic _selectedBranch = {
|
||||||
|
"ID": doctorProfile.projectID,
|
||||||
|
"Desciption": doctorProfile.projectName
|
||||||
|
};
|
||||||
|
return _selectedBranch;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getMyReferredPatient() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getMyReferredPatient();
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
MyReferredPatientModel getReferredPatientItem(int index) {
|
||||||
|
return listMyReferredPatientModel[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPendingReferralPatients() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getPendingReferralList();
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.responseReferral(pendingReferral, isAccepted);
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPatientArrivalList(String date) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.getPatientArrivalList(date);
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else {
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<dynamic> getAppointmentsByPatientName(String patientName) {
|
||||||
|
List<dynamic> appointments = [];
|
||||||
|
patientArrivalList.forEach((element) {
|
||||||
|
if (element.patientName == patientName) {
|
||||||
|
appointments.add(element.toJson());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return appointments;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future makeReferral(PatientArrivalEntity patientArrivalEntity,
|
||||||
|
String isoStringDate,
|
||||||
|
int projectID,
|
||||||
|
int clinicID,
|
||||||
|
int doctorID,
|
||||||
|
String remarks) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _referralPatientService.makeReferral(patientArrivalEntity, isoStringDate, projectID, clinicID, doctorID, remarks);
|
||||||
|
if (_referralPatientService.hasError) {
|
||||||
|
error = _referralPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/patient-vital-signs-service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
|
||||||
|
class VitalSignsViewModel extends BaseViewModel {
|
||||||
|
VitalSignsService _vitalSignService = locator<VitalSignsService>();
|
||||||
|
|
||||||
|
List<PatientArrivalEntity> get patientArrivalList =>
|
||||||
|
_vitalSignService.patientArrivalList;
|
||||||
|
|
||||||
|
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns;
|
||||||
|
|
||||||
|
Future getPatientArrivalList(String date, PatiantInformtion patient,
|
||||||
|
{String fromDate}) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate);
|
||||||
|
if (_vitalSignService.hasError) {
|
||||||
|
error = _vitalSignService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
await getPatientVitalSign(patient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PatientArrivalEntity getPatientAppointmentEntity(PatiantInformtion patient) {
|
||||||
|
String ffName = "${patient.firstName} ${patient.lastName}";
|
||||||
|
String fmfName =
|
||||||
|
"${patient.firstName} ${patient.middleName} ${patient.lastName}";
|
||||||
|
|
||||||
|
for (var element in patientArrivalList) {
|
||||||
|
int index = patientArrivalList.indexOf(element);
|
||||||
|
if (element.patientName == ffName || element.patientName == fmfName) {
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
// print("patient index: $index");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getPatientVitalSign(PatiantInformtion patient) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
PatientArrivalEntity patientArrivalEntity =
|
||||||
|
getPatientAppointmentEntity(patient);
|
||||||
|
if (patientArrivalEntity == null) {
|
||||||
|
_vitalSignService.hasError = true;
|
||||||
|
error = "There is no appointments for this patient";
|
||||||
|
setState(ViewState.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await _vitalSignService.getPatientVitalSign(patientArrivalEntity);
|
||||||
|
// TODO remove (not) from below condition
|
||||||
|
if (!_vitalSignService.hasError) {
|
||||||
|
error = _vitalSignService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
if (patientVitalSigns == null) {
|
||||||
|
_vitalSignService.patientVitalSigns = VitalSignData(
|
||||||
|
appointmentNo: 2016053265,
|
||||||
|
bloodPressureCuffLocation: 0,
|
||||||
|
bloodPressureCuffSize: 0,
|
||||||
|
bloodPressureHigher: 38,
|
||||||
|
bloodPressureLower: 32,
|
||||||
|
bloodPressurePatientPosition: 1,
|
||||||
|
bodyMassIndex: 31.11,
|
||||||
|
fio2: 0,
|
||||||
|
headCircumCm: 0,
|
||||||
|
heightCm: 150,
|
||||||
|
idealBodyWeightLbs: -2,
|
||||||
|
isPainManagementDone: false,
|
||||||
|
isVitalsRequired: true,
|
||||||
|
leanBodyWeightLbs: 0,
|
||||||
|
painCharacter: null,
|
||||||
|
painDuration: null,
|
||||||
|
painFrequency: null,
|
||||||
|
painLocation: null,
|
||||||
|
painScore: 0,
|
||||||
|
patientMRN: 3333274,
|
||||||
|
patientType: 1,
|
||||||
|
pulseBeatPerMinute: 0,
|
||||||
|
pulseRhythm: 0,
|
||||||
|
respirationBeatPerMinute: 0,
|
||||||
|
respirationPattern: 0,
|
||||||
|
sao2: 0,
|
||||||
|
status: 47,
|
||||||
|
temperatureCelcius: 40,
|
||||||
|
temperatureCelciusMethod: 1,
|
||||||
|
waistSizeInch: 39,
|
||||||
|
weightKg: 70,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/locator.dart';
|
||||||
|
|
||||||
|
class PrescriptionViewModel extends BaseViewModel {
|
||||||
|
bool hasError = false;
|
||||||
|
PrescriptionService _prescriptionService = locator<PrescriptionService>();
|
||||||
|
|
||||||
|
List<PrescriptionModel> get prescriptionList =>
|
||||||
|
_prescriptionService.prescriptionList;
|
||||||
|
|
||||||
|
Future getPrescription() async {
|
||||||
|
hasError = false;
|
||||||
|
//_insuranceCardService.clearInsuranceCard();
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _prescriptionService.getPrescription();
|
||||||
|
if (_prescriptionService.hasError) {
|
||||||
|
error = _prescriptionService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postPrescription() async {
|
||||||
|
hasError = false;
|
||||||
|
//_insuranceCardService.clearInsuranceCard();
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _prescriptionService.postPrescription();
|
||||||
|
if (_prescriptionService.hasError) {
|
||||||
|
error = _prescriptionService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/locator.dart';
|
||||||
|
|
||||||
|
class ProcedureViewModel extends BaseViewModel {
|
||||||
|
bool hasError = false;
|
||||||
|
ProcedureService _procedureService = locator<ProcedureService>();
|
||||||
|
List<GetProcedureModel> get procedureList => _procedureService.procedureList;
|
||||||
|
List<CategoriseProcedureModel> get categoriesList =>
|
||||||
|
_procedureService.categoriesList;
|
||||||
|
|
||||||
|
Future getProcedure() async {
|
||||||
|
hasError = false;
|
||||||
|
//_insuranceCardService.clearInsuranceCard();
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _procedureService.getProcedure();
|
||||||
|
if (_procedureService.hasError) {
|
||||||
|
error = _procedureService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getCategories() async {
|
||||||
|
hasError = false;
|
||||||
|
//_insuranceCardService.clearInsuranceCard();
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _procedureService.getCategories();
|
||||||
|
if (_procedureService.hasError) {
|
||||||
|
error = _procedureService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {
|
||||||
|
hasError = false;
|
||||||
|
//_insuranceCardService.clearInsuranceCard();
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _procedureService.postProcedure(postProcedureReqModel);
|
||||||
|
if (_procedureService.hasError) {
|
||||||
|
error = _procedureService.error;
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'base_view_model.dart';
|
||||||
|
|
||||||
|
class SickLeaveViewModel extends BaseViewModel {
|
||||||
|
SickLeaveService _sickLeaveService = locator<SickLeaveService>();
|
||||||
|
get sickLeaveStatistics => _sickLeaveService.sickLeavestatisitics;
|
||||||
|
get getAllSIckLeave => _sickLeaveService.getAllSickLeave;
|
||||||
|
Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _sickLeaveService.addSickLeave(addSickLeaveRequest);
|
||||||
|
if (_sickLeaveService.hasError) {
|
||||||
|
error = _sickLeaveService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future extendSickLeave(GetAllSickLeaveResponse extendSickLeaveRequest) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _sickLeaveService.extendSickLeave(extendSickLeaveRequest);
|
||||||
|
if (_sickLeaveService.hasError) {
|
||||||
|
error = _sickLeaveService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future preSickLeaveStatistics(appoNo, patientMRN) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _sickLeaveService.getStatistics(appoNo, patientMRN);
|
||||||
|
if (_sickLeaveService.hasError) {
|
||||||
|
error = _sickLeaveService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getSickLeave() async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _sickLeaveService.getSickLeave();
|
||||||
|
if (_sickLeaveService.hasError) {
|
||||||
|
error = _sickLeaveService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
class AllergyModel {
|
||||||
|
int allergyDiseaseId;
|
||||||
|
String allergyDiseaseName;
|
||||||
|
int allergyDiseaseType;
|
||||||
|
int appointmentNo;
|
||||||
|
int createdBy;
|
||||||
|
String createdByName;
|
||||||
|
String createdOn;
|
||||||
|
int episodeID;
|
||||||
|
bool isChecked;
|
||||||
|
bool isUpdatedByNurse;
|
||||||
|
int severity;
|
||||||
|
String severityName;
|
||||||
|
|
||||||
|
AllergyModel(
|
||||||
|
{this.allergyDiseaseId,
|
||||||
|
this.allergyDiseaseName,
|
||||||
|
this.allergyDiseaseType,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdByName,
|
||||||
|
this.createdOn,
|
||||||
|
this.episodeID,
|
||||||
|
this.isChecked,
|
||||||
|
this.isUpdatedByNurse,
|
||||||
|
this.severity,
|
||||||
|
this.severityName});
|
||||||
|
|
||||||
|
AllergyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
allergyDiseaseId = json['allergyDiseaseId'];
|
||||||
|
allergyDiseaseName = json['allergyDiseaseName'];
|
||||||
|
allergyDiseaseType = json['allergyDiseaseType'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdByName = json['createdByName'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
episodeID = json['episodeID'];
|
||||||
|
isChecked = json['isChecked'];
|
||||||
|
isUpdatedByNurse = json['isUpdatedByNurse'];
|
||||||
|
severity = json['severity'];
|
||||||
|
severityName = json['severityName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['allergyDiseaseId'] = this.allergyDiseaseId;
|
||||||
|
data['allergyDiseaseName'] = this.allergyDiseaseName;
|
||||||
|
data['allergyDiseaseType'] = this.allergyDiseaseType;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdByName'] = this.createdByName;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['episodeID'] = this.episodeID;
|
||||||
|
data['isChecked'] = this.isChecked;
|
||||||
|
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
|
||||||
|
data['severity'] = this.severity;
|
||||||
|
data['severityName'] = this.severityName;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
class GetAllergiesRequestModel {
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
int patientMRN;
|
||||||
|
int appointmentNo;
|
||||||
|
int episodeId;
|
||||||
|
String doctorID;
|
||||||
|
|
||||||
|
GetAllergiesRequestModel(
|
||||||
|
{this.vidaAuthTokenID,
|
||||||
|
this.patientMRN,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.episodeId,
|
||||||
|
this.doctorID});
|
||||||
|
|
||||||
|
GetAllergiesRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
episodeId = json['EpisodeId'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['EpisodeId'] = this.episodeId;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
class MasterKeyModel {
|
||||||
|
String alias;
|
||||||
|
String aliasN;
|
||||||
|
dynamic code;
|
||||||
|
dynamic description;
|
||||||
|
dynamic detail1;
|
||||||
|
dynamic detail2;
|
||||||
|
dynamic detail3;
|
||||||
|
dynamic detail4;
|
||||||
|
dynamic detail5;
|
||||||
|
int groupID;
|
||||||
|
int id;
|
||||||
|
String nameAr;
|
||||||
|
String nameEn;
|
||||||
|
dynamic remarks;
|
||||||
|
int typeId;
|
||||||
|
String valueList;
|
||||||
|
|
||||||
|
MasterKeyModel(
|
||||||
|
{this.alias,
|
||||||
|
this.aliasN,
|
||||||
|
this.code,
|
||||||
|
this.description,
|
||||||
|
this.detail1,
|
||||||
|
this.detail2,
|
||||||
|
this.detail3,
|
||||||
|
this.detail4,
|
||||||
|
this.detail5,
|
||||||
|
this.groupID,
|
||||||
|
this.id,
|
||||||
|
this.nameAr,
|
||||||
|
this.nameEn,
|
||||||
|
this.remarks,
|
||||||
|
this.typeId,
|
||||||
|
this.valueList});
|
||||||
|
|
||||||
|
MasterKeyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
alias = json['alias'];
|
||||||
|
aliasN = json['aliasN'];
|
||||||
|
code = json['code'];
|
||||||
|
description = json['description'];
|
||||||
|
detail1 = json['detail1'];
|
||||||
|
detail2 = json['detail2'];
|
||||||
|
detail3 = json['detail3'];
|
||||||
|
detail4 = json['detail4'];
|
||||||
|
detail5 = json['detail5'];
|
||||||
|
groupID = json['groupID'];
|
||||||
|
id = json['id'];
|
||||||
|
nameAr = json['nameAr'];
|
||||||
|
nameEn = json['nameEn'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
typeId = json['typeId'];
|
||||||
|
valueList = json['valueList'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['alias'] = this.alias;
|
||||||
|
data['aliasN'] = this.aliasN;
|
||||||
|
data['code'] = this.code;
|
||||||
|
data['description'] = this.description;
|
||||||
|
data['detail1'] = this.detail1;
|
||||||
|
data['detail2'] = this.detail2;
|
||||||
|
data['detail3'] = this.detail3;
|
||||||
|
data['detail4'] = this.detail4;
|
||||||
|
data['detail5'] = this.detail5;
|
||||||
|
data['groupID'] = this.groupID;
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['nameAr'] = this.nameAr;
|
||||||
|
data['nameEn'] = this.nameEn;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['typeId'] = this.typeId;
|
||||||
|
data['valueList'] = this.valueList;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
class MySelectedAllergy {
|
||||||
|
MasterKeyModel selectedAllergySeverity;
|
||||||
|
MasterKeyModel selectedAllergy;
|
||||||
|
String remark;
|
||||||
|
|
||||||
|
MySelectedAllergy(
|
||||||
|
{this.selectedAllergySeverity, this.selectedAllergy, this.remark});
|
||||||
|
|
||||||
|
MySelectedAllergy.fromJson(Map<String, dynamic> json) {
|
||||||
|
selectedAllergySeverity = json['selectedAllergySeverity'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedAllergySeverity'])
|
||||||
|
: null;
|
||||||
|
selectedAllergy = json['selectedAllergy'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedAllergy'])
|
||||||
|
: null;
|
||||||
|
remark = json['remark'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.selectedAllergySeverity != null) {
|
||||||
|
data['selectedAllergySeverity'] = this.selectedAllergySeverity.toJson();
|
||||||
|
}
|
||||||
|
if (this.selectedAllergy != null) {
|
||||||
|
data['selectedAllergy'] = this.selectedAllergy.toJson();
|
||||||
|
}
|
||||||
|
data['remark'] = this.remark;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
class MySelectedAssessment {
|
||||||
|
MasterKeyModel selectedICD;
|
||||||
|
MasterKeyModel selectedDiagnosisCondition;
|
||||||
|
MasterKeyModel selectedDiagnosisType;
|
||||||
|
String remark;
|
||||||
|
int appointmentId;
|
||||||
|
|
||||||
|
MySelectedAssessment(
|
||||||
|
{this.selectedICD,
|
||||||
|
this.selectedDiagnosisCondition,
|
||||||
|
this.selectedDiagnosisType,
|
||||||
|
this.remark, this.appointmentId});
|
||||||
|
|
||||||
|
MySelectedAssessment.fromJson(Map<String, dynamic> json) {
|
||||||
|
selectedICD = json['selectedICD'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedICD'])
|
||||||
|
: null;
|
||||||
|
selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
|
||||||
|
: null;
|
||||||
|
selectedDiagnosisType = json['selectedDiagnosisType'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedDiagnosisType'])
|
||||||
|
: null;
|
||||||
|
remark = json['remark'];
|
||||||
|
appointmentId = json['appointmentId'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
|
||||||
|
if (this.selectedICD != null) {
|
||||||
|
data['selectedICD'] = this.selectedICD.toJson();
|
||||||
|
}
|
||||||
|
if (this.selectedDiagnosisCondition != null) {
|
||||||
|
data['selectedICD'] = this.selectedDiagnosisCondition.toJson();
|
||||||
|
}
|
||||||
|
if (this.selectedDiagnosisType != null) {
|
||||||
|
data['selectedICD'] = this.selectedDiagnosisType.toJson();
|
||||||
|
}
|
||||||
|
data['remark'] = this.remark;
|
||||||
|
data['appointmentId'] = this.appointmentId;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
class MySelectedExamination {
|
||||||
|
MasterKeyModel selectedExamination;
|
||||||
|
String remark;
|
||||||
|
bool isNormal;
|
||||||
|
bool isAbnormal;
|
||||||
|
|
||||||
|
MySelectedExamination(
|
||||||
|
{this.selectedExamination, this.remark, this.isNormal = true, this.isAbnormal = false});
|
||||||
|
|
||||||
|
MySelectedExamination.fromJson(Map<String, dynamic> json) {
|
||||||
|
|
||||||
|
selectedExamination = json['selectedExamination'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['selectedExamination'])
|
||||||
|
: null;
|
||||||
|
remark = json['remark'];
|
||||||
|
remark = json['isNormal'];
|
||||||
|
remark = json['isAbnormal'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
|
||||||
|
if (this.selectedExamination != null) {
|
||||||
|
data['selectedExamination'] = this.selectedExamination.toJson();
|
||||||
|
}
|
||||||
|
data['remark'] = this.remark;
|
||||||
|
data['isNormal'] = this.isNormal;
|
||||||
|
data['isAbnormal'] = this.isAbnormal;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
class PostAllergyRequestModel {
|
||||||
|
List<ListHisProgNotePatientAllergyDiseaseVM>
|
||||||
|
listHisProgNotePatientAllergyDiseaseVM;
|
||||||
|
|
||||||
|
PostAllergyRequestModel({this.listHisProgNotePatientAllergyDiseaseVM});
|
||||||
|
|
||||||
|
PostAllergyRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['listHisProgNotePatientAllergyDiseaseVM'] != null) {
|
||||||
|
listHisProgNotePatientAllergyDiseaseVM =
|
||||||
|
new List<ListHisProgNotePatientAllergyDiseaseVM>();
|
||||||
|
json['listHisProgNotePatientAllergyDiseaseVM'].forEach((v) {
|
||||||
|
listHisProgNotePatientAllergyDiseaseVM
|
||||||
|
.add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.listHisProgNotePatientAllergyDiseaseVM != null) {
|
||||||
|
data['listHisProgNotePatientAllergyDiseaseVM'] = this
|
||||||
|
.listHisProgNotePatientAllergyDiseaseVM
|
||||||
|
.map((v) => v.toJson())
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListHisProgNotePatientAllergyDiseaseVM {
|
||||||
|
int patientMRN;
|
||||||
|
int allergyDiseaseType;
|
||||||
|
int allergyDiseaseId;
|
||||||
|
int episodeId;
|
||||||
|
int appointmentNo;
|
||||||
|
int severity;
|
||||||
|
bool isChecked;
|
||||||
|
bool isUpdatedByNurse;
|
||||||
|
String remarks;
|
||||||
|
int createdBy;
|
||||||
|
String createdOn;
|
||||||
|
int editedBy;
|
||||||
|
String editedOn;
|
||||||
|
|
||||||
|
ListHisProgNotePatientAllergyDiseaseVM(
|
||||||
|
{this.patientMRN,
|
||||||
|
this.allergyDiseaseType,
|
||||||
|
this.allergyDiseaseId,
|
||||||
|
this.episodeId,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.severity,
|
||||||
|
this.isChecked,
|
||||||
|
this.isUpdatedByNurse,
|
||||||
|
this.remarks,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.editedOn});
|
||||||
|
|
||||||
|
ListHisProgNotePatientAllergyDiseaseVM.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
allergyDiseaseType = json['allergyDiseaseType'];
|
||||||
|
allergyDiseaseId = json['allergyDiseaseId'];
|
||||||
|
episodeId = json['episodeId'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
severity = json['severity'];
|
||||||
|
isChecked = json['isChecked'];
|
||||||
|
isUpdatedByNurse = json['isUpdatedByNurse'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
editedBy = json['editedBy'];
|
||||||
|
editedOn = json['editedOn'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['allergyDiseaseType'] = this.allergyDiseaseType;
|
||||||
|
data['allergyDiseaseId'] = this.allergyDiseaseId;
|
||||||
|
data['episodeId'] = this.episodeId;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['severity'] = this.severity;
|
||||||
|
data['isChecked'] = this.isChecked;
|
||||||
|
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['editedBy'] = this.editedBy;
|
||||||
|
data['editedOn'] = this.editedOn;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
class PostAssessmentRequestModel {
|
||||||
|
int patientMRN;
|
||||||
|
int appointmentNo;
|
||||||
|
int episodeId;
|
||||||
|
List<IcdCodeDetails> icdCodeDetails;
|
||||||
|
|
||||||
|
PostAssessmentRequestModel(
|
||||||
|
{this.patientMRN,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.episodeId,
|
||||||
|
this.icdCodeDetails});
|
||||||
|
|
||||||
|
PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
episodeId = json['EpisodeId'];
|
||||||
|
if (json['icdCodeDetails'] != null) {
|
||||||
|
icdCodeDetails = new List<IcdCodeDetails>();
|
||||||
|
json['icdCodeDetails'].forEach((v) {
|
||||||
|
icdCodeDetails.add(new IcdCodeDetails.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['EpisodeId'] = this.episodeId;
|
||||||
|
if (this.icdCodeDetails != null) {
|
||||||
|
data['icdCodeDetails'] =
|
||||||
|
this.icdCodeDetails.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class IcdCodeDetails {
|
||||||
|
String icdcode10Id;
|
||||||
|
int conditionId;
|
||||||
|
int diagnosisTypeId;
|
||||||
|
bool complexDiagnosis;
|
||||||
|
String remarks;
|
||||||
|
|
||||||
|
IcdCodeDetails(
|
||||||
|
{this.icdcode10Id,
|
||||||
|
this.conditionId,
|
||||||
|
this.diagnosisTypeId,
|
||||||
|
this.complexDiagnosis,
|
||||||
|
this.remarks});
|
||||||
|
|
||||||
|
IcdCodeDetails.fromJson(Map<String, dynamic> json) {
|
||||||
|
icdcode10Id = json['icdcode10Id'];
|
||||||
|
conditionId = json['conditionId'];
|
||||||
|
diagnosisTypeId = json['diagnosisTypeId'];
|
||||||
|
complexDiagnosis = json['complexDiagnosis'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['icdcode10Id'] = this.icdcode10Id;
|
||||||
|
data['conditionId'] = this.conditionId;
|
||||||
|
data['diagnosisTypeId'] = this.diagnosisTypeId;
|
||||||
|
data['complexDiagnosis'] = this.complexDiagnosis;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
class PostChiefComplaintRequestModel {
|
||||||
|
int appointmentNo;
|
||||||
|
int episodeID;
|
||||||
|
int patientMRN;
|
||||||
|
String chiefComplaint;
|
||||||
|
String hopi;
|
||||||
|
String currentMedication;
|
||||||
|
bool ispregnant;
|
||||||
|
bool isLactation;
|
||||||
|
int numberOfWeeks;
|
||||||
|
|
||||||
|
PostChiefComplaintRequestModel(
|
||||||
|
{this.appointmentNo,
|
||||||
|
this.episodeID,
|
||||||
|
this.patientMRN,
|
||||||
|
this.chiefComplaint,
|
||||||
|
this.hopi,
|
||||||
|
this.currentMedication,
|
||||||
|
this.ispregnant,
|
||||||
|
this.isLactation,
|
||||||
|
this.numberOfWeeks});
|
||||||
|
|
||||||
|
PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
episodeID = json['EpisodeID'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
chiefComplaint = json['chiefComplaint'];
|
||||||
|
hopi = json['Hopi'];
|
||||||
|
currentMedication = json['CurrentMedication'];
|
||||||
|
ispregnant = json['ispregnant'];
|
||||||
|
isLactation = json['isLactation'];
|
||||||
|
numberOfWeeks = json['numberOfWeeks'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['EpisodeID'] = this.episodeID;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['chiefComplaint'] = this.chiefComplaint;
|
||||||
|
data['Hopi'] = this.hopi;
|
||||||
|
data['CurrentMedication'] = this.currentMedication;
|
||||||
|
data['ispregnant'] = this.ispregnant;
|
||||||
|
data['isLactation'] = this.isLactation;
|
||||||
|
data['numberOfWeeks'] = this.numberOfWeeks;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
class PostHistoriesRequestModel {
|
||||||
|
List<ListMedicalHistoryVM> listMedicalHistoryVM;
|
||||||
|
|
||||||
|
PostHistoriesRequestModel({this.listMedicalHistoryVM});
|
||||||
|
|
||||||
|
PostHistoriesRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['listMedicalHistoryVM'] != null) {
|
||||||
|
listMedicalHistoryVM = new List<ListMedicalHistoryVM>();
|
||||||
|
json['listMedicalHistoryVM'].forEach((v) {
|
||||||
|
listMedicalHistoryVM.add(new ListMedicalHistoryVM.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.listMedicalHistoryVM != null) {
|
||||||
|
data['listMedicalHistoryVM'] =
|
||||||
|
this.listMedicalHistoryVM.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListMedicalHistoryVM {
|
||||||
|
int patientMRN;
|
||||||
|
int historyType;
|
||||||
|
int historyId;
|
||||||
|
int episodeId;
|
||||||
|
int appointmentNo;
|
||||||
|
bool isChecked;
|
||||||
|
String remarks;
|
||||||
|
|
||||||
|
ListMedicalHistoryVM(
|
||||||
|
{this.patientMRN,
|
||||||
|
this.historyType,
|
||||||
|
this.historyId,
|
||||||
|
this.episodeId,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.isChecked,
|
||||||
|
this.remarks});
|
||||||
|
|
||||||
|
ListMedicalHistoryVM.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
historyType = json['historyType'];
|
||||||
|
historyId = json['historyId'];
|
||||||
|
episodeId = json['episodeId'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
isChecked = json['isChecked'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['historyType'] = this.historyType;
|
||||||
|
data['historyId'] = this.historyId;
|
||||||
|
data['episodeId'] = this.episodeId;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['isChecked'] = this.isChecked;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
|
||||||
|
class PostPhysicalExamRequestModel {
|
||||||
|
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM;
|
||||||
|
|
||||||
|
PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM});
|
||||||
|
|
||||||
|
PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['listHisProgNotePhysicalExaminationVM'] != null) {
|
||||||
|
listHisProgNotePhysicalExaminationVM = new List<ListHisProgNotePhysicalExaminationVM>();
|
||||||
|
json['listHisProgNotePhysicalExaminationVM'].forEach((v) {
|
||||||
|
listHisProgNotePhysicalExaminationVM
|
||||||
|
.add(new ListHisProgNotePhysicalExaminationVM.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.listHisProgNotePhysicalExaminationVM != null) {
|
||||||
|
data['listHisProgNotePhysicalExaminationVM'] =
|
||||||
|
this.listHisProgNotePhysicalExaminationVM.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListHisProgNotePhysicalExaminationVM {
|
||||||
|
int episodeId;
|
||||||
|
int appointmentNo;
|
||||||
|
int examType;
|
||||||
|
int examId;
|
||||||
|
int patientMRN;
|
||||||
|
bool isNormal;
|
||||||
|
bool isAbnormal;
|
||||||
|
String remarks;
|
||||||
|
int createdBy;
|
||||||
|
String createdOn;
|
||||||
|
int editedBy;
|
||||||
|
String editedOn;
|
||||||
|
bool notExamined;
|
||||||
|
MasterKeyModel masterDescription;
|
||||||
|
|
||||||
|
ListHisProgNotePhysicalExaminationVM(
|
||||||
|
{this.episodeId,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.examType,
|
||||||
|
this.examId,
|
||||||
|
this.patientMRN,
|
||||||
|
this.isNormal,
|
||||||
|
this.isAbnormal,
|
||||||
|
this.remarks,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.editedOn,
|
||||||
|
this.notExamined,
|
||||||
|
this.masterDescription});
|
||||||
|
|
||||||
|
ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) {
|
||||||
|
episodeId = json['episodeId'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
examType = json['examType'];
|
||||||
|
examId = json['examId'];
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
isNormal = json['isNormal'];
|
||||||
|
isAbnormal = json['isAbnormal'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
createdBy = json['createdBy'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
editedBy = json['editedBy'];
|
||||||
|
editedOn = json['editedOn'];
|
||||||
|
notExamined = json['notExamined'];
|
||||||
|
masterDescription = json['masterDescription'] != null
|
||||||
|
? new MasterKeyModel.fromJson(json['masterDescription'])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['episodeId'] = this.episodeId;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['examType'] = this.examType;
|
||||||
|
data['examId'] = this.examId;
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['isNormal'] = this.isNormal;
|
||||||
|
data['isAbnormal'] = this.isAbnormal;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['createdBy'] = this.createdBy;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['editedBy'] = this.editedBy;
|
||||||
|
data['editedOn'] = this.editedOn;
|
||||||
|
data['notExamined'] = this.notExamined;
|
||||||
|
if (this.masterDescription != null) {
|
||||||
|
data['masterDescription'] = this.masterDescription.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
class PostProgressNoteRequestModel {
|
||||||
|
int appointmentNo;
|
||||||
|
int episodeId;
|
||||||
|
int patientMRN;
|
||||||
|
String planNote;
|
||||||
|
|
||||||
|
PostProgressNoteRequestModel(
|
||||||
|
{this.appointmentNo, this.episodeId, this.patientMRN, this.planNote});
|
||||||
|
|
||||||
|
PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
episodeId = json['EpisodeId'];
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
planNote = json['PlanNote'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['EpisodeId'] = this.episodeId;
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['PlanNote'] = this.planNote;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
class ActivationCodeModel {
|
||||||
|
String mobileNumber;
|
||||||
|
String zipCode;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
double versionID;
|
||||||
|
int memberID;
|
||||||
|
String password;
|
||||||
|
int facilityId;
|
||||||
|
String generalid;
|
||||||
|
|
||||||
|
ActivationCodeModel(
|
||||||
|
{this.mobileNumber,
|
||||||
|
this.zipCode,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.versionID,
|
||||||
|
this.memberID,
|
||||||
|
this.password,
|
||||||
|
this.facilityId,
|
||||||
|
this.generalid});
|
||||||
|
|
||||||
|
ActivationCodeModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
memberID = json['MemberID'];
|
||||||
|
password = json['Password'];
|
||||||
|
facilityId = json['facilityId'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['MemberID'] = this.memberID;
|
||||||
|
data['Password'] = this.password;
|
||||||
|
data['facilityId'] = this.facilityId;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
class CheckActivationCodeRequestModel {
|
||||||
|
String mobileNumber;
|
||||||
|
String zipCode;
|
||||||
|
int doctorID;
|
||||||
|
String iPAdress;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
int projectID;
|
||||||
|
double versionID;
|
||||||
|
String generalid;
|
||||||
|
String logInTokenID;
|
||||||
|
String activationCode;
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
String vidaRefreshTokenID;
|
||||||
|
|
||||||
|
CheckActivationCodeRequestModel(
|
||||||
|
{this.mobileNumber,
|
||||||
|
this.zipCode,
|
||||||
|
this.doctorID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.projectID,
|
||||||
|
this.versionID,
|
||||||
|
this.generalid,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.activationCode,
|
||||||
|
this.vidaAuthTokenID,
|
||||||
|
this.vidaRefreshTokenID});
|
||||||
|
|
||||||
|
CheckActivationCodeRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
activationCode = json['activationCode'];
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
vidaRefreshTokenID = json['VidaRefreshTokenID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['activationCode'] = this.activationCode;
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['VidaRefreshTokenID'] = this.vidaRefreshTokenID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
class DashboardModel {
|
||||||
|
String kPIName;
|
||||||
|
int displaySequence;
|
||||||
|
List<Summaryoptions> summaryoptions;
|
||||||
|
|
||||||
|
DashboardModel({this.kPIName, this.displaySequence, this.summaryoptions});
|
||||||
|
|
||||||
|
DashboardModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
kPIName = json['KPIName'];
|
||||||
|
displaySequence = json['displaySequence'];
|
||||||
|
if (json['summaryoptions'] != null) {
|
||||||
|
summaryoptions = new List<Summaryoptions>();
|
||||||
|
json['summaryoptions'].forEach((v) {
|
||||||
|
summaryoptions.add(new Summaryoptions.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['KPIName'] = this.kPIName;
|
||||||
|
data['displaySequence'] = this.displaySequence;
|
||||||
|
if (this.summaryoptions != null) {
|
||||||
|
data['summaryoptions'] =
|
||||||
|
this.summaryoptions.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Summaryoptions {
|
||||||
|
String kPIParameter;
|
||||||
|
String captionColor;
|
||||||
|
bool isCaptionBold;
|
||||||
|
bool isValueBold;
|
||||||
|
int order;
|
||||||
|
int value;
|
||||||
|
String valueColor;
|
||||||
|
|
||||||
|
Summaryoptions(
|
||||||
|
{this.kPIParameter,
|
||||||
|
this.captionColor,
|
||||||
|
this.isCaptionBold,
|
||||||
|
this.isValueBold,
|
||||||
|
this.order,
|
||||||
|
this.value,
|
||||||
|
this.valueColor});
|
||||||
|
|
||||||
|
Summaryoptions.fromJson(Map<String, dynamic> json) {
|
||||||
|
kPIParameter = json['KPIParameter'];
|
||||||
|
captionColor = json['captionColor'];
|
||||||
|
isCaptionBold = json['isCaptionBold'];
|
||||||
|
isValueBold = json['isValueBold'];
|
||||||
|
order = json['order'];
|
||||||
|
value = json['value'];
|
||||||
|
valueColor = json['valueColor'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['KPIParameter'] = this.kPIParameter;
|
||||||
|
data['captionColor'] = this.captionColor;
|
||||||
|
data['isCaptionBold'] = this.isCaptionBold;
|
||||||
|
data['isValueBold'] = this.isValueBold;
|
||||||
|
data['order'] = this.order;
|
||||||
|
data['value'] = this.value;
|
||||||
|
data['valueColor'] = this.valueColor;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
class PatientArrivalEntity {
|
||||||
|
String age;
|
||||||
|
String appointmentDate;
|
||||||
|
int appointmentNo;
|
||||||
|
String appointmentType;
|
||||||
|
String arrivedOn;
|
||||||
|
String companyName;
|
||||||
|
String endTime;
|
||||||
|
int episodeNo;
|
||||||
|
int fallRiskScore;
|
||||||
|
String gender;
|
||||||
|
int medicationOrders;
|
||||||
|
String mobileNumber;
|
||||||
|
String nationality;
|
||||||
|
int patientMRN;
|
||||||
|
String patientName;
|
||||||
|
int rowCount;
|
||||||
|
String startTime;
|
||||||
|
String visitType;
|
||||||
|
|
||||||
|
PatientArrivalEntity(
|
||||||
|
{this.age,
|
||||||
|
this.appointmentDate,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.appointmentType,
|
||||||
|
this.arrivedOn,
|
||||||
|
this.companyName,
|
||||||
|
this.endTime,
|
||||||
|
this.episodeNo,
|
||||||
|
this.fallRiskScore,
|
||||||
|
this.gender,
|
||||||
|
this.medicationOrders,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.nationality,
|
||||||
|
this.patientMRN,
|
||||||
|
this.patientName,
|
||||||
|
this.rowCount,
|
||||||
|
this.startTime,
|
||||||
|
this.visitType});
|
||||||
|
|
||||||
|
PatientArrivalEntity.fromJson(Map<String, dynamic> json) {
|
||||||
|
age = json['age'];
|
||||||
|
appointmentDate = json['appointmentDate'];
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
appointmentType = json['appointmentType'];
|
||||||
|
arrivedOn = json['arrivedOn'];
|
||||||
|
companyName = json['companyName'];
|
||||||
|
endTime = json['endTime'];
|
||||||
|
episodeNo = json['episodeNo'];
|
||||||
|
fallRiskScore = json['fallRiskScore'];
|
||||||
|
gender = json['gender'];
|
||||||
|
medicationOrders = json['medicationOrders'];
|
||||||
|
mobileNumber = json['mobileNumber'];
|
||||||
|
nationality = json['nationality'];
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
patientName = json['patientName'];
|
||||||
|
rowCount = json['rowCount'];
|
||||||
|
startTime = json['startTime'];
|
||||||
|
visitType = json['visitType'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['age'] = this.age;
|
||||||
|
data['appointmentDate'] = this.appointmentDate;
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['appointmentType'] = this.appointmentType;
|
||||||
|
data['arrivedOn'] = this.arrivedOn;
|
||||||
|
data['companyName'] = this.companyName;
|
||||||
|
data['endTime'] = this.endTime;
|
||||||
|
data['episodeNo'] = this.episodeNo;
|
||||||
|
data['fallRiskScore'] = this.fallRiskScore;
|
||||||
|
data['gender'] = this.gender;
|
||||||
|
data['medicationOrders'] = this.medicationOrders;
|
||||||
|
data['mobileNumber'] = this.mobileNumber;
|
||||||
|
data['nationality'] = this.nationality;
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['patientName'] = this.patientName;
|
||||||
|
data['rowCount'] = this.rowCount;
|
||||||
|
data['startTime'] = this.startTime;
|
||||||
|
data['visitType'] = this.visitType;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
class PendingReferral {
|
||||||
|
String responded;
|
||||||
|
String answerFromTarget;
|
||||||
|
String createdOn;
|
||||||
|
int data;
|
||||||
|
String editedOn;
|
||||||
|
int interBranchReferral;
|
||||||
|
int patientID;
|
||||||
|
String patientName;
|
||||||
|
int patientType;
|
||||||
|
int referralNo;
|
||||||
|
String referralStatus;
|
||||||
|
String referredByDoctorInfo;
|
||||||
|
String referredFromBranchName;
|
||||||
|
String referredOn;
|
||||||
|
String referredType;
|
||||||
|
String remarksFromSource;
|
||||||
|
String respondedOn;
|
||||||
|
int sourceAppointmentNo;
|
||||||
|
int sourceProjectId;
|
||||||
|
String sourceSetupID;
|
||||||
|
String startDate;
|
||||||
|
int targetAppointmentNo;
|
||||||
|
String targetClinicID;
|
||||||
|
String targetDoctorID;
|
||||||
|
int targetProjectId;
|
||||||
|
String targetSetupID;
|
||||||
|
bool isReferralDoctorSameBranch;
|
||||||
|
|
||||||
|
PendingReferral(
|
||||||
|
{this.responded,
|
||||||
|
this.answerFromTarget,
|
||||||
|
this.createdOn,
|
||||||
|
this.data,
|
||||||
|
this.editedOn,
|
||||||
|
this.interBranchReferral,
|
||||||
|
this.patientID,
|
||||||
|
this.patientName,
|
||||||
|
this.patientType,
|
||||||
|
this.referralNo,
|
||||||
|
this.referralStatus,
|
||||||
|
this.referredByDoctorInfo,
|
||||||
|
this.referredFromBranchName,
|
||||||
|
this.referredOn,
|
||||||
|
this.referredType,
|
||||||
|
this.remarksFromSource,
|
||||||
|
this.respondedOn,
|
||||||
|
this.sourceAppointmentNo,
|
||||||
|
this.sourceProjectId,
|
||||||
|
this.sourceSetupID,
|
||||||
|
this.startDate,
|
||||||
|
this.targetAppointmentNo,
|
||||||
|
this.targetClinicID,
|
||||||
|
this.targetDoctorID,
|
||||||
|
this.targetProjectId,
|
||||||
|
this.targetSetupID,
|
||||||
|
this.isReferralDoctorSameBranch,
|
||||||
|
});
|
||||||
|
|
||||||
|
PendingReferral.fromJson(Map<String, dynamic> json) {
|
||||||
|
responded = json['Responded'];
|
||||||
|
answerFromTarget = json['answerFromTarget'];
|
||||||
|
createdOn = json['createdOn'];
|
||||||
|
data = json['data'];
|
||||||
|
editedOn = json['editedOn'];
|
||||||
|
interBranchReferral = json['interBranchReferral'];
|
||||||
|
patientID = json['patientID'];
|
||||||
|
patientName = json['patientName'];
|
||||||
|
patientType = json['patientType'];
|
||||||
|
referralNo = json['referralNo'];
|
||||||
|
referralStatus = json['referralStatus'];
|
||||||
|
referredByDoctorInfo = json['referredByDoctorInfo'];
|
||||||
|
referredFromBranchName = json['referredFromBranchName'];
|
||||||
|
referredOn = json['referredOn'];
|
||||||
|
referredType = json['referredType'];
|
||||||
|
remarksFromSource = json['remarksFromSource'];
|
||||||
|
respondedOn = json['respondedOn'];
|
||||||
|
sourceAppointmentNo = json['sourceAppointmentNo'];
|
||||||
|
sourceProjectId = json['sourceProjectId'];
|
||||||
|
sourceSetupID = json['sourceSetupID'];
|
||||||
|
startDate = json['startDate'];
|
||||||
|
targetAppointmentNo = json['targetAppointmentNo'];
|
||||||
|
targetClinicID = json['targetClinicID'];
|
||||||
|
targetDoctorID = json['targetDoctorID'];
|
||||||
|
targetProjectId = json['targetProjectId'];
|
||||||
|
targetSetupID = json['targetSetupID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Responded'] = this.responded;
|
||||||
|
data['answerFromTarget'] = this.answerFromTarget;
|
||||||
|
data['createdOn'] = this.createdOn;
|
||||||
|
data['data'] = this.data;
|
||||||
|
data['editedOn'] = this.editedOn;
|
||||||
|
data['interBranchReferral'] = this.interBranchReferral;
|
||||||
|
data['patientID'] = this.patientID;
|
||||||
|
data['patientName'] = this.patientName;
|
||||||
|
data['patientType'] = this.patientType;
|
||||||
|
data['referralNo'] = this.referralNo;
|
||||||
|
data['referralStatus'] = this.referralStatus;
|
||||||
|
data['referredByDoctorInfo'] = this.referredByDoctorInfo;
|
||||||
|
data['referredFromBranchName'] = this.referredFromBranchName;
|
||||||
|
data['referredOn'] = this.referredOn;
|
||||||
|
data['referredType'] = this.referredType;
|
||||||
|
data['remarksFromSource'] = this.remarksFromSource;
|
||||||
|
data['respondedOn'] = this.respondedOn;
|
||||||
|
data['sourceAppointmentNo'] = this.sourceAppointmentNo;
|
||||||
|
data['sourceProjectId'] = this.sourceProjectId;
|
||||||
|
data['sourceSetupID'] = this.sourceSetupID;
|
||||||
|
data['startDate'] = this.startDate;
|
||||||
|
data['targetAppointmentNo'] = this.targetAppointmentNo;
|
||||||
|
data['targetClinicID'] = this.targetClinicID;
|
||||||
|
data['targetDoctorID'] = this.targetDoctorID;
|
||||||
|
data['targetProjectId'] = this.targetProjectId;
|
||||||
|
data['targetSetupID'] = this.targetSetupID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,136 @@
|
|||||||
|
class VitalSignData {
|
||||||
|
int appointmentNo;
|
||||||
|
int bloodPressureCuffLocation;
|
||||||
|
int bloodPressureCuffSize;
|
||||||
|
int bloodPressureHigher;
|
||||||
|
int bloodPressureLower;
|
||||||
|
int bloodPressurePatientPosition;
|
||||||
|
double bodyMassIndex;
|
||||||
|
int fio2;
|
||||||
|
int headCircumCm;
|
||||||
|
int heightCm;
|
||||||
|
int idealBodyWeightLbs;
|
||||||
|
bool isPainManagementDone;
|
||||||
|
bool isVitalsRequired;
|
||||||
|
int leanBodyWeightLbs;
|
||||||
|
String painCharacter;
|
||||||
|
String painDuration;
|
||||||
|
String painFrequency;
|
||||||
|
String painLocation;
|
||||||
|
int painScore;
|
||||||
|
int patientMRN;
|
||||||
|
int patientType;
|
||||||
|
int pulseBeatPerMinute;
|
||||||
|
int pulseRhythm;
|
||||||
|
int respirationBeatPerMinute;
|
||||||
|
int respirationPattern;
|
||||||
|
int sao2;
|
||||||
|
int status;
|
||||||
|
int temperatureCelcius;
|
||||||
|
int temperatureCelciusMethod;
|
||||||
|
int waistSizeInch;
|
||||||
|
int weightKg;
|
||||||
|
|
||||||
|
VitalSignData(
|
||||||
|
{this.appointmentNo,
|
||||||
|
this.bloodPressureCuffLocation,
|
||||||
|
this.bloodPressureCuffSize,
|
||||||
|
this.bloodPressureHigher,
|
||||||
|
this.bloodPressureLower,
|
||||||
|
this.bloodPressurePatientPosition,
|
||||||
|
this.bodyMassIndex,
|
||||||
|
this.fio2,
|
||||||
|
this.headCircumCm,
|
||||||
|
this.heightCm,
|
||||||
|
this.idealBodyWeightLbs,
|
||||||
|
this.isPainManagementDone,
|
||||||
|
this.isVitalsRequired,
|
||||||
|
this.leanBodyWeightLbs,
|
||||||
|
this.painCharacter,
|
||||||
|
this.painDuration,
|
||||||
|
this.painFrequency,
|
||||||
|
this.painLocation,
|
||||||
|
this.painScore,
|
||||||
|
this.patientMRN,
|
||||||
|
this.patientType,
|
||||||
|
this.pulseBeatPerMinute,
|
||||||
|
this.pulseRhythm,
|
||||||
|
this.respirationBeatPerMinute,
|
||||||
|
this.respirationPattern,
|
||||||
|
this.sao2,
|
||||||
|
this.status,
|
||||||
|
this.temperatureCelcius,
|
||||||
|
this.temperatureCelciusMethod,
|
||||||
|
this.waistSizeInch,
|
||||||
|
this.weightKg});
|
||||||
|
|
||||||
|
VitalSignData.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
bloodPressureCuffLocation = json['bloodPressureCuffLocation'];
|
||||||
|
bloodPressureCuffSize = json['bloodPressureCuffSize'];
|
||||||
|
bloodPressureHigher = json['bloodPressureHigher'];
|
||||||
|
bloodPressureLower = json['bloodPressureLower'];
|
||||||
|
bloodPressurePatientPosition = json['bloodPressurePatientPosition'];
|
||||||
|
bodyMassIndex = json['bodyMassIndex'];
|
||||||
|
fio2 = json['fio2'];
|
||||||
|
headCircumCm = json['headCircumCm'];
|
||||||
|
heightCm = json['heightCm'];
|
||||||
|
idealBodyWeightLbs = json['idealBodyWeightLbs'];
|
||||||
|
isPainManagementDone = json['isPainManagementDone'];
|
||||||
|
isVitalsRequired = json['isVitalsRequired'];
|
||||||
|
leanBodyWeightLbs = json['leanBodyWeightLbs'];
|
||||||
|
painCharacter = json['painCharacter'];
|
||||||
|
painDuration = json['painDuration'];
|
||||||
|
painFrequency = json['painFrequency'];
|
||||||
|
painLocation = json['painLocation'];
|
||||||
|
painScore = json['painScore'];
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
patientType = json['patientType'];
|
||||||
|
pulseBeatPerMinute = json['pulseBeatPerMinute'];
|
||||||
|
pulseRhythm = json['pulseRhythm'];
|
||||||
|
respirationBeatPerMinute = json['respirationBeatPerMinute'];
|
||||||
|
respirationPattern = json['respirationPattern'];
|
||||||
|
sao2 = json['sao2'];
|
||||||
|
status = json['status'];
|
||||||
|
temperatureCelcius = json['temperatureCelcius'];
|
||||||
|
temperatureCelciusMethod = json['temperatureCelciusMethod'];
|
||||||
|
waistSizeInch = json['waistSizeInch'];
|
||||||
|
weightKg = json['weightKg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['bloodPressureCuffLocation'] = this.bloodPressureCuffLocation;
|
||||||
|
data['bloodPressureCuffSize'] = this.bloodPressureCuffSize;
|
||||||
|
data['bloodPressureHigher'] = this.bloodPressureHigher;
|
||||||
|
data['bloodPressureLower'] = this.bloodPressureLower;
|
||||||
|
data['bloodPressurePatientPosition'] = this.bloodPressurePatientPosition;
|
||||||
|
data['bodyMassIndex'] = this.bodyMassIndex;
|
||||||
|
data['fio2'] = this.fio2;
|
||||||
|
data['headCircumCm'] = this.headCircumCm;
|
||||||
|
data['heightCm'] = this.heightCm;
|
||||||
|
data['idealBodyWeightLbs'] = this.idealBodyWeightLbs;
|
||||||
|
data['isPainManagementDone'] = this.isPainManagementDone;
|
||||||
|
data['isVitalsRequired'] = this.isVitalsRequired;
|
||||||
|
data['leanBodyWeightLbs'] = this.leanBodyWeightLbs;
|
||||||
|
data['painCharacter'] = this.painCharacter;
|
||||||
|
data['painDuration'] = this.painDuration;
|
||||||
|
data['painFrequency'] = this.painFrequency;
|
||||||
|
data['painLocation'] = this.painLocation;
|
||||||
|
data['painScore'] = this.painScore;
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['patientType'] = this.patientType;
|
||||||
|
data['pulseBeatPerMinute'] = this.pulseBeatPerMinute;
|
||||||
|
data['pulseRhythm'] = this.pulseRhythm;
|
||||||
|
data['respirationBeatPerMinute'] = this.respirationBeatPerMinute;
|
||||||
|
data['respirationPattern'] = this.respirationPattern;
|
||||||
|
data['sao2'] = this.sao2;
|
||||||
|
data['status'] = this.status;
|
||||||
|
data['temperatureCelcius'] = this.temperatureCelcius;
|
||||||
|
data['temperatureCelciusMethod'] = this.temperatureCelciusMethod;
|
||||||
|
data['waistSizeInch'] = this.waistSizeInch;
|
||||||
|
data['weightKg'] = this.weightKg;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
class AddSickLeaveRequest {
|
||||||
|
String patientMRN;
|
||||||
|
String appointmentNo;
|
||||||
|
String startDate;
|
||||||
|
String noOfDays;
|
||||||
|
String remarks;
|
||||||
|
|
||||||
|
AddSickLeaveRequest(
|
||||||
|
{this.patientMRN,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.startDate,
|
||||||
|
this.noOfDays,
|
||||||
|
this.remarks});
|
||||||
|
|
||||||
|
AddSickLeaveRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
startDate = json['StartDate'];
|
||||||
|
noOfDays = json['NoOfDays'];
|
||||||
|
remarks = json['Remarks'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['StartDate'] = this.startDate;
|
||||||
|
data['NoOfDays'] = this.noOfDays;
|
||||||
|
data['Remarks'] = this.remarks;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
class ExtendSickLeaveRequest {
|
||||||
|
String patientMRN;
|
||||||
|
String previousRequestNo;
|
||||||
|
String noOfDays;
|
||||||
|
String remarks;
|
||||||
|
|
||||||
|
ExtendSickLeaveRequest(
|
||||||
|
{this.patientMRN, this.previousRequestNo, this.noOfDays, this.remarks});
|
||||||
|
|
||||||
|
ExtendSickLeaveRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMRN = json['PatientMRN'];
|
||||||
|
previousRequestNo = json['PreviousRequestNo'];
|
||||||
|
noOfDays = json['NoOfDays'];
|
||||||
|
remarks = json['Remarks'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMRN'] = this.patientMRN;
|
||||||
|
data['PreviousRequestNo'] = this.previousRequestNo;
|
||||||
|
data['NoOfDays'] = this.noOfDays;
|
||||||
|
data['Remarks'] = this.remarks;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
class GetAllSickLeaveResponse {
|
||||||
|
int appointmentNo;
|
||||||
|
bool isExtendedLeave;
|
||||||
|
int noOfDays;
|
||||||
|
int patientMRN;
|
||||||
|
String remarks;
|
||||||
|
int requestNo;
|
||||||
|
String startDate;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
GetAllSickLeaveResponse(
|
||||||
|
{this.appointmentNo,
|
||||||
|
this.isExtendedLeave,
|
||||||
|
this.noOfDays,
|
||||||
|
this.patientMRN,
|
||||||
|
this.remarks,
|
||||||
|
this.requestNo,
|
||||||
|
this.startDate,
|
||||||
|
this.status});
|
||||||
|
|
||||||
|
GetAllSickLeaveResponse.fromJson(Map<String, dynamic> json) {
|
||||||
|
appointmentNo = json['appointmentNo'];
|
||||||
|
isExtendedLeave = json['isExtendedLeave'];
|
||||||
|
noOfDays = json['noOfDays'];
|
||||||
|
patientMRN = json['patientMRN'];
|
||||||
|
remarks = json['remarks'];
|
||||||
|
requestNo = json['requestNo'];
|
||||||
|
startDate = json['startDate'];
|
||||||
|
status = json['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['appointmentNo'] = this.appointmentNo;
|
||||||
|
data['isExtendedLeave'] = this.isExtendedLeave;
|
||||||
|
data['noOfDays'] = this.noOfDays;
|
||||||
|
data['patientMRN'] = this.patientMRN;
|
||||||
|
data['remarks'] = this.remarks;
|
||||||
|
data['requestNo'] = this.requestNo;
|
||||||
|
data['startDate'] = this.startDate;
|
||||||
|
data['status'] = this.status;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,151 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class MyReferralDetailScreen extends StatelessWidget {
|
||||||
|
PendingReferral pendingReferral;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final gridHeight = (MediaQuery.of(context).size.width * 0.3) * 1.8;
|
||||||
|
|
||||||
|
AuthViewModel authProvider = Provider.of(context);
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
pendingReferral = routeArgs['referral'];
|
||||||
|
|
||||||
|
return BaseView<PatientReferralViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).referPatient,
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
ProfileWelcomeWidget(
|
||||||
|
AppText(
|
||||||
|
authProvider.selectedClinicName != null
|
||||||
|
? authProvider.selectedClinicName
|
||||||
|
: authProvider.doctorProfile.clinicDescription,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.7,
|
||||||
|
color: Colors.white,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
height: 100,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).myReferralPatient,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
PatientReferralItemWidget(
|
||||||
|
patientName: pendingReferral.patientName,
|
||||||
|
referralStatus: null,
|
||||||
|
isReferredTo: false,
|
||||||
|
isSameBranch: pendingReferral.isReferralDoctorSameBranch,
|
||||||
|
referralDoctorName: pendingReferral.referredByDoctorInfo,
|
||||||
|
clinicDescription: null,
|
||||||
|
remark: pendingReferral.remarksFromSource,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
child: GridView.count(
|
||||||
|
childAspectRatio: 1.8,
|
||||||
|
crossAxisSpacing: 8,
|
||||||
|
mainAxisSpacing: 10,
|
||||||
|
controller: new ScrollController(keepScrollOffset: false),
|
||||||
|
shrinkWrap: true,
|
||||||
|
padding: const EdgeInsets.all(4.0),
|
||||||
|
crossAxisCount: 2,
|
||||||
|
children: [
|
||||||
|
PatientProfileButton(
|
||||||
|
key: key,
|
||||||
|
// patient: patient,
|
||||||
|
// route: RADIOLOGY,
|
||||||
|
nameLine1: TranslationBase.of(context).previewHealth,
|
||||||
|
nameLine2: TranslationBase.of(context).summaryReport,
|
||||||
|
icon: 'radiology-1.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
key: key,
|
||||||
|
// patient: patient,
|
||||||
|
// route: LAB_ORDERS,
|
||||||
|
nameLine1: TranslationBase.of(context).lab,
|
||||||
|
nameLine2: TranslationBase.of(context).result,
|
||||||
|
icon: 'lab.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
key: key,
|
||||||
|
// patient: patient,
|
||||||
|
// route: VITAL_SIGN_DETAILS,
|
||||||
|
nameLine1: TranslationBase.of(context).vital,
|
||||||
|
nameLine2: TranslationBase.of(context).signs,
|
||||||
|
icon: 'heartbeat.png'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: BorderedButton(
|
||||||
|
TranslationBase.of(context).accept,
|
||||||
|
backgroundColor: Color(0xFF4BA821),
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
hPadding: 8,
|
||||||
|
vPadding: 12,
|
||||||
|
handler: (){
|
||||||
|
model.responseReferral(pendingReferral, true);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: BorderedButton(
|
||||||
|
TranslationBase.of(context).reject,
|
||||||
|
backgroundColor: Color(0xFFB9382C),
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
hPadding: 8,
|
||||||
|
vPadding: 12,
|
||||||
|
handler: (){
|
||||||
|
model.responseReferral(pendingReferral, false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../../../routes.dart';
|
||||||
|
|
||||||
|
class MyReferralPatientScreen extends StatelessWidget {
|
||||||
|
// previous design page is: MyReferralPatient
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
AuthViewModel authProvider = Provider.of(context);
|
||||||
|
|
||||||
|
return BaseView<PatientReferralViewModel>(
|
||||||
|
onModelReady: (model) => model.getPendingReferralPatients(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).referPatient,
|
||||||
|
body: model.pendingReferral == null ||
|
||||||
|
model.pendingReferral.length == 0
|
||||||
|
? Center(
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).errorNoSchedule,
|
||||||
|
color: Theme.of(context).errorColor,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
ProfileWelcomeWidget(
|
||||||
|
AppText(
|
||||||
|
authProvider.selectedClinicName != null
|
||||||
|
? authProvider.selectedClinicName
|
||||||
|
: authProvider.doctorProfile.clinicDescription,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.7,
|
||||||
|
color: Colors.white,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
height: 100,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).myReferralPatient,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
model.pendingReferral.length,
|
||||||
|
(index) => PatientReferralItemWidget(
|
||||||
|
patientName: model.pendingReferral[index].patientName,
|
||||||
|
referralStatus: null,
|
||||||
|
isReferredTo: false,
|
||||||
|
isSameBranch: model.pendingReferral[index]
|
||||||
|
.isReferralDoctorSameBranch,
|
||||||
|
referralDoctorName:
|
||||||
|
model.pendingReferral[index].referredByDoctorInfo,
|
||||||
|
clinicDescription: null,
|
||||||
|
remark:
|
||||||
|
model.pendingReferral[index].remarksFromSource,
|
||||||
|
infoIcon: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
MY_REFERRAL_DETAIL,
|
||||||
|
arguments: {
|
||||||
|
'referral': model.pendingReferral[index]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(
|
||||||
|
Icons.info_outline,
|
||||||
|
color: Colors.black,
|
||||||
|
size: 30,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,460 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
import '../../../QR_reader_screen.dart';
|
||||||
|
|
||||||
|
class PatientMakeReferralScreen extends StatefulWidget {
|
||||||
|
// previous design page is: MyReferralPatient
|
||||||
|
@override
|
||||||
|
_PatientMakeReferralScreenState createState() =>
|
||||||
|
_PatientMakeReferralScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
||||||
|
PatiantInformtion patient;
|
||||||
|
List<dynamic> referToList;
|
||||||
|
dynamic _referTo;
|
||||||
|
dynamic _selectedBranch;
|
||||||
|
dynamic _selectedClinic;
|
||||||
|
dynamic _selectedDoctor;
|
||||||
|
DateTime appointmentDate;
|
||||||
|
final _remarksController = TextEditingController();
|
||||||
|
PatientArrivalEntity _selectedPatientArrivalEntity;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
referToList = List();
|
||||||
|
dynamic sameBranch = {"id": 1, "name": "Same Branch"};
|
||||||
|
dynamic otherBranch = {"id": 2, "name": "Other Branch"};
|
||||||
|
referToList.add(sameBranch);
|
||||||
|
referToList.add(otherBranch);
|
||||||
|
appointmentDate = DateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
patient = routeArgs['patient'];
|
||||||
|
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return BaseView<PatientReferralViewModel>(
|
||||||
|
onModelReady: (model) => model.getBranches(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).referPatient,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
PatientPageHeaderWidget(patient),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).referPatient,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: referToList != null
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog =
|
||||||
|
ListSelectDialog(
|
||||||
|
list: referToList,
|
||||||
|
attributeName: 'name',
|
||||||
|
attributeValueId: 'id',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_referTo = selectedValue;
|
||||||
|
_selectedBranch = null;
|
||||||
|
_selectedClinic = null;
|
||||||
|
_selectedDoctor = null;
|
||||||
|
model
|
||||||
|
.getDoctorBranch()
|
||||||
|
.then((value) {
|
||||||
|
_selectedBranch = value;
|
||||||
|
if (_referTo['id'] == 1) {
|
||||||
|
model.getClinics(
|
||||||
|
_selectedBranch['ID']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
TranslationBase.of(context).referTo,
|
||||||
|
_referTo != null ? _referTo['name'] : null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: model.branchesList != null &&
|
||||||
|
model.branchesList.length > 0 &&
|
||||||
|
_referTo != null &&
|
||||||
|
_referTo['id'] == 2
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog =
|
||||||
|
ListSelectDialog(
|
||||||
|
list: model.branchesList,
|
||||||
|
attributeName: 'Desciption',
|
||||||
|
attributeValueId: 'ID',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedBranch = selectedValue;
|
||||||
|
_selectedClinic = null;
|
||||||
|
_selectedDoctor = null;
|
||||||
|
model.getClinics(
|
||||||
|
_selectedBranch['ID']);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
TranslationBase.of(context).branch,
|
||||||
|
_selectedBranch != null
|
||||||
|
? _selectedBranch['Desciption']
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: _selectedBranch != null &&
|
||||||
|
model.clinicsList != null &&
|
||||||
|
model.clinicsList.length > 0
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog =
|
||||||
|
ListSelectDialog(
|
||||||
|
list: model.clinicsList,
|
||||||
|
attributeName: 'ClinicDescription',
|
||||||
|
attributeValueId: 'ClinicID',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedDoctor = null;
|
||||||
|
_selectedClinic = selectedValue;
|
||||||
|
model.getClinicDoctors(
|
||||||
|
_selectedClinic['ClinicID']
|
||||||
|
.toString());
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
TranslationBase.of(context).clinic,
|
||||||
|
_selectedClinic != null
|
||||||
|
? _selectedClinic['ClinicDescription']
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: _selectedClinic != null &&
|
||||||
|
model.doctorsList != null &&
|
||||||
|
model.doctorsList.length > 0
|
||||||
|
? () {
|
||||||
|
ListSelectDialog dialog =
|
||||||
|
ListSelectDialog(
|
||||||
|
list: model.doctorsList,
|
||||||
|
attributeName: 'DoctorName',
|
||||||
|
attributeValueId: 'DoctorID',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedDoctor = selectedValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
TranslationBase.of(context).doctor,
|
||||||
|
_selectedDoctor != null
|
||||||
|
? _selectedDoctor['DoctorName']
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => _selectDate(context, model),
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.chooseAppointment,
|
||||||
|
_selectedPatientArrivalEntity != null
|
||||||
|
? "${TranslationBase.of(context).appointmentNo} ${_selectedPatientArrivalEntity.appointmentNo}"
|
||||||
|
: null,
|
||||||
|
true,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.calendar_today,
|
||||||
|
color: Colors.black,
|
||||||
|
)),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
TranslationBase.of(context).remarks,
|
||||||
|
null,
|
||||||
|
false),
|
||||||
|
enabled: true,
|
||||||
|
controller: _remarksController,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp(ONLY_LETTERS))
|
||||||
|
],
|
||||||
|
keyboardType: TextInputType.text,
|
||||||
|
minLines: 4,
|
||||||
|
maxLines: 6,
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
|
child: AppButton(
|
||||||
|
title: TranslationBase.of(context).refer,
|
||||||
|
color: HexColor("#B8382B"),
|
||||||
|
onPressed: () {
|
||||||
|
if (_selectedPatientArrivalEntity == null ||
|
||||||
|
_selectedBranch == null ||
|
||||||
|
_selectedClinic == null ||
|
||||||
|
_selectedDoctor == null ||
|
||||||
|
_remarksController.text == null) return;
|
||||||
|
model
|
||||||
|
.makeReferral(
|
||||||
|
_selectedPatientArrivalEntity,
|
||||||
|
appointmentDate.toIso8601String(),
|
||||||
|
_selectedBranch['ID'],
|
||||||
|
_selectedClinic['ClinicID'],
|
||||||
|
_selectedDoctor['DoctorID'],
|
||||||
|
_remarksController.text)
|
||||||
|
.then((_) => Navigator.pop(context));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_selectDate(BuildContext context, PatientReferralViewModel model) async {
|
||||||
|
// https://medium.com/flutter-community/a-deep-dive-into-datepicker-in-flutter-37e84f7d8d6c good reference
|
||||||
|
// https://stackoverflow.com/a/63147062/6246772 to customize a date picker
|
||||||
|
final DateTime picked = await showDatePicker(
|
||||||
|
context: context,
|
||||||
|
initialDate: appointmentDate,
|
||||||
|
firstDate: DateTime.now().add(Duration(hours: 2)),
|
||||||
|
lastDate: DateTime(2040),
|
||||||
|
initialEntryMode: DatePickerEntryMode.calendar,
|
||||||
|
);
|
||||||
|
if (picked != null && picked != appointmentDate) {
|
||||||
|
appointmentDate = picked;
|
||||||
|
model
|
||||||
|
.getPatientArrivalList(DateUtils.convertStringToDateFormat(
|
||||||
|
appointmentDate.toString(), "yyyy-MM-dd"))
|
||||||
|
.then((_) {
|
||||||
|
if (model.state == ViewState.ErrorLocal) {
|
||||||
|
helpers.showErrorToast(model.error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (model.patientArrivalList != null &&
|
||||||
|
model.patientArrivalList.length > 0) {
|
||||||
|
List<dynamic> appointments = model.getAppointmentsByPatientName(
|
||||||
|
"${patient.firstName} ${patient.middleName} ${patient.lastName}");
|
||||||
|
if (appointments.length > 0) {
|
||||||
|
ListSelectDialog dialog = ListSelectDialog(
|
||||||
|
list: appointments,
|
||||||
|
attributeName: 'appointmentNo',
|
||||||
|
attributeValueId: 'appointmentNo',
|
||||||
|
okText: TranslationBase.of(context).ok,
|
||||||
|
okFunction: (selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedPatientArrivalEntity =
|
||||||
|
PatientArrivalEntity.fromJson(selectedValue);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
_selectedPatientArrivalEntity = null;
|
||||||
|
});
|
||||||
|
DrAppToastMsg.showErrorToast(
|
||||||
|
TranslationBase.of(context).noAppointmentsErrorMsg);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
_selectedPatientArrivalEntity = null;
|
||||||
|
});
|
||||||
|
DrAppToastMsg.showErrorToast(
|
||||||
|
TranslationBase.of(context).noAppointmentsErrorMsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
InputDecoration textFieldSelectorDecoration(
|
||||||
|
String hintText, String selectedText, bool isDropDown,
|
||||||
|
{Icon suffixIcon}) {
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown
|
||||||
|
? suffixIcon != null
|
||||||
|
? suffixIcon
|
||||||
|
: Icon(
|
||||||
|
Icons.arrow_drop_down,
|
||||||
|
color: Colors.black,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
BoxDecoration containerBorderDecoration(
|
||||||
|
Color containerColor, Color borderColor) {
|
||||||
|
return BoxDecoration(
|
||||||
|
color: containerColor,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: borderColor,
|
||||||
|
width: 2.0,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ReferredPatientScreen extends StatelessWidget {
|
||||||
|
// previous design page is: MyReferredPatient
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<PatientReferralViewModel>(
|
||||||
|
onModelReady: (model) => model.getMyReferredPatient(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).referPatient,
|
||||||
|
body: model.listMyReferredPatientModel == null ||
|
||||||
|
model.listMyReferredPatientModel.length == 0
|
||||||
|
? Center(
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).errorNoSchedule,
|
||||||
|
color: Theme.of(context).errorColor,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 75,
|
||||||
|
child: AppText(
|
||||||
|
"This is where upper view for avatar.. etc placed",
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
model.listMyReferredPatientModel.length,
|
||||||
|
(index) => PatientReferralItemWidget(
|
||||||
|
patientName:
|
||||||
|
"${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
|
||||||
|
referralStatus:
|
||||||
|
"${model.getReferredPatientItem(index).referralStatus}",
|
||||||
|
isReferredTo: true,
|
||||||
|
isSameBranch: model
|
||||||
|
.getReferredPatientItem(index)
|
||||||
|
.isReferralDoctorSameBranch,
|
||||||
|
referralDoctorName: model
|
||||||
|
.getReferredPatientItem(index)
|
||||||
|
.referralDoctorName,
|
||||||
|
clinicDescription: model
|
||||||
|
.getReferredPatientItem(index)
|
||||||
|
.referralClinicDescription,
|
||||||
|
remark: model
|
||||||
|
.getReferredPatientItem(index)
|
||||||
|
.referringDoctorRemarks,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,989 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PatientVitalSignScreen extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
|
||||||
|
return BaseView<VitalSignsViewModel>(
|
||||||
|
onModelReady: (model) => model.getPatientArrivalList(
|
||||||
|
DateUtils.convertDateToFormat(DateTime.now(), "yyyy-MM-dd"), patient,
|
||||||
|
fromDate: DateUtils.convertDateToFormat(
|
||||||
|
DateTime.now().subtract(Duration(days: 500)), "yyyy-MM-dd")),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).vitalSign,
|
||||||
|
body: model.patientVitalSigns != null
|
||||||
|
? SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
PatientPageHeaderWidget(patient),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).weight} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.weightKg} ${TranslationBase.of(context).kg}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).idealBodyWeight} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.idealBodyWeightLbs} ${TranslationBase.of(context).kg}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).height} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.heightCm} ${TranslationBase.of(context).cm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).waistSize} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.waistSizeInch} ${TranslationBase.of(context).inch}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).headCircum} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.headCircumCm} ${TranslationBase.of(context).cm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).leanBodyWeight} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.leanBodyWeightLbs} ${TranslationBase.of(context).kg}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).bodyMassIndex} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.patientVitalSigns.bodyMassIndex}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"G.C.S :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"N/A",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
TemperatureWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
PulseWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
RespirationWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
BloodPressureWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
OxygenationWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
PainScaleWidget(model.patientVitalSigns),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 2,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Container(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TemperatureWidget extends StatefulWidget {
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
TemperatureWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_TemperatureWidgetState createState() => _TemperatureWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TemperatureWidgetState extends State<TemperatureWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature} (C):",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.temperatureCelcius}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature} (F):",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).method} :",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.temperatureCelciusMethod}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PulseWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
PulseWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PulseWidgetState createState() => _PulseWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PulseWidgetState extends State<PulseWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).pulse}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).pulseBeats}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.pulseBeatPerMinute}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).rhythm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.pulseRhythm}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RespirationWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
RespirationWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_RespirationWidgetState createState() => _RespirationWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RespirationWidgetState extends State<RespirationWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).respiration}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).respBeats}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.respirationBeatPerMinute}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).patternOfRespiration}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.respirationPattern}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BloodPressureWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
BloodPressureWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_BloodPressureWidgetState createState() => _BloodPressureWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BloodPressureWidgetState extends State<BloodPressureWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).bloodPressure}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).cuffLocation}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressureCuffLocation}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).patientPosition}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressurePatientPosition}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).cuffSize}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.bloodPressureCuffSize}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OxygenationWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
OxygenationWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_OxygenationWidgetState createState() => _OxygenationWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OxygenationWidgetState extends State<OxygenationWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).oxygenation}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).sao2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.sao2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).fio2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.fio2}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PainScaleWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final VitalSignData vitalSign;
|
||||||
|
|
||||||
|
PainScaleWidget(this.vitalSign);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PainScaleWidgetState createState() => _PainScaleWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PainScaleWidgetState extends State<PainScaleWidget> {
|
||||||
|
bool isExpand = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).painScale}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpand = !isExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isExpand ? Icons.remove : Icons.add),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bodyWidget: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).painScale}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.painScore}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).painManagement}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${widget.vitalSign.isPainManagementDone}",
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isExpand: isExpand,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,212 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
void addPrescriptionForm(context) {
|
||||||
|
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||||
|
final double spaceBetweenTextFileds = 12;
|
||||||
|
showModalBottomSheet(
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext bc) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: 700,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
//mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).medicines.toUpperCase(),
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: spaceBetweenTextFileds,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: Form(
|
||||||
|
key: _formKey,
|
||||||
|
child: Column(
|
||||||
|
//mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText:
|
||||||
|
TranslationBase.of(context).searchMedicine,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.text,
|
||||||
|
inputFormatter: ONLY_LETTERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: spaceBetweenTextFileds,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).orderType,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).strength,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).route,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).frequency,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).doseTime,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).indication,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).fromDate,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: TranslationBase.of(context).duration,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText:
|
||||||
|
TranslationBase.of(context).instruction,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: spaceBetweenTextFileds),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.all(SizeConfig.widthMultiplier * 5),
|
||||||
|
child: Wrap(
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
AppButton(
|
||||||
|
title:
|
||||||
|
TranslationBase.of(context).addMedication,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
prescriptionWarning(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -0,0 +1,406 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class NewPrescriptionScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_NewPrescriptionScreenState createState() => _NewPrescriptionScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
||||||
|
int testNum = 0;
|
||||||
|
PatiantInformtion patient;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
patient = routeArgs['patient'];
|
||||||
|
return BaseView<PrescriptionViewModel>(
|
||||||
|
onModelReady: (model) => model.getPrescription(),
|
||||||
|
builder: (BuildContext context, PrescriptionViewModel model,
|
||||||
|
Widget child) =>
|
||||||
|
AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: TranslationBase.of(context).prescription,
|
||||||
|
body: NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
AvatarWidget(
|
||||||
|
Icon(
|
||||||
|
patient.genderDescription == "Male"
|
||||||
|
? DoctorApp.male
|
||||||
|
: DoctorApp.female_icon,
|
||||||
|
size: 70,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
patient.firstName + ' ' + patient.lastName,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
if (model.prescriptionList.length > 0)
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).fileNo,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
patient.patientId.toString(),
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1.0,
|
||||||
|
thickness: 1.0,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
if (model.prescriptionList.length != 0)
|
||||||
|
SizedBox(
|
||||||
|
height: model.prescriptionList[0].rowcount == 0
|
||||||
|
? 200.0
|
||||||
|
: 10.0),
|
||||||
|
//model.prescriptionList == null
|
||||||
|
if (model.prescriptionList.length != 0)
|
||||||
|
model.prescriptionList[0].rowcount == 0
|
||||||
|
? Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
addPrescriptionForm(context);
|
||||||
|
model.postPrescription();
|
||||||
|
},
|
||||||
|
child: CircleAvatar(
|
||||||
|
radius: 65,
|
||||||
|
backgroundColor: Color(0XFFB8382C),
|
||||||
|
child: CircleAvatar(
|
||||||
|
radius: 60,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Colors.black,
|
||||||
|
size: 45.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.noPrescriptionListed,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).addNow,
|
||||||
|
color: Color(0XFFB8382C),
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: EdgeInsets.all(12.0),
|
||||||
|
child: NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
child: Container(
|
||||||
|
height: 50.0,
|
||||||
|
width: 450.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.grey),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
' Add more medication',
|
||||||
|
fontWeight: FontWeight.w100,
|
||||||
|
fontSize: 12.5,
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Color(0XFFB8382C),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
addPrescriptionForm(context);
|
||||||
|
model.postPrescription();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.0,
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
model.prescriptionList[0].rowcount,
|
||||||
|
(index) => Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height:
|
||||||
|
MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.height *
|
||||||
|
0.2,
|
||||||
|
width:
|
||||||
|
MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.width *
|
||||||
|
0.09,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'8\nDEC',
|
||||||
|
color: Colors.green,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height:
|
||||||
|
MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.height *
|
||||||
|
0.24,
|
||||||
|
width:
|
||||||
|
MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.width *
|
||||||
|
0.81,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Start Date:',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
fontSize: 15.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.startDate,
|
||||||
|
fontSize: 11.0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 6.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'Order Type:',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
fontSize: 15.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.orderTypeDescription,
|
||||||
|
fontSize: 13.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 2.5,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: Expanded(
|
||||||
|
child:
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.medicationName,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.doseDetail,
|
||||||
|
fontSize:
|
||||||
|
13.0,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 3.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Indication: ',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.indication,
|
||||||
|
fontSize:
|
||||||
|
12.9),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.doctorName,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(model
|
||||||
|
.prescriptionList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.remarks),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.0,
|
||||||
|
),
|
||||||
|
|
||||||
|
Divider(
|
||||||
|
height: 0,
|
||||||
|
thickness: 1.0,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 40,
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,168 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
void prescriptionWarning(context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
isScrollControlled: true,
|
||||||
|
builder: (BuildContext bc) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(12.0),
|
||||||
|
child: Container(
|
||||||
|
height: 600,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
...List.generate(
|
||||||
|
5,
|
||||||
|
(index) => Container(
|
||||||
|
child: ExpansionTile(
|
||||||
|
title: AppText('Prescription warning and alerts(0)'),
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'DOSESCREENINGRESULTFORETCETC',
|
||||||
|
color: Color(0XFFB8382C),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border:
|
||||||
|
Border.all(width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: 'Remarks',
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 95.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
|
||||||
|
child: Wrap(
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
AppButton(
|
||||||
|
title: 'CONTINUE',
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
authorizationForm(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
|
||||||
|
child: Wrap(
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
AppButton(
|
||||||
|
color: Colors.white,
|
||||||
|
title: 'remove',
|
||||||
|
fontColor: Colors.red,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
prescriptionWarning(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void authorizationForm(context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
isScrollControlled: true,
|
||||||
|
builder: (BuildContext bc) {
|
||||||
|
return Container(
|
||||||
|
height: 500,
|
||||||
|
child: Form(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Prescription authorization'.toUpperCase(),
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: 'Auth ID',
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
inputFormatter: ONLY_NUMBERS,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: 'Password',
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.text,
|
||||||
|
inputFormatter: ONLY_LETTERS,
|
||||||
|
obscureText: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 190.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
|
||||||
|
child: Wrap(
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
AppButton(
|
||||||
|
title: 'CONTINUE',
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
authorizationForm(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -0,0 +1,482 @@
|
|||||||
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class ProcedureScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_ProcedureScreenState createState() => _ProcedureScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ProcedureScreenState extends State<ProcedureScreen> {
|
||||||
|
int testNum = 1;
|
||||||
|
PatiantInformtion patient;
|
||||||
|
TextEditingController procedureController = TextEditingController();
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
patient = routeArgs['patient'];
|
||||||
|
return BaseView<ProcedureViewModel>(
|
||||||
|
onModelReady: (model) => model.getProcedure(),
|
||||||
|
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
|
||||||
|
AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'ORDER PROCEDURE',
|
||||||
|
body: NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(12.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
AvatarWidget(
|
||||||
|
Icon(
|
||||||
|
patient.genderDescription == "Male"
|
||||||
|
? DoctorApp.male
|
||||||
|
: DoctorApp.female_icon,
|
||||||
|
size: 70,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
patient.firstName + ' ' + patient.lastName,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).fileNo,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
patient.patientId.toString(),
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1.0,
|
||||||
|
thickness: 1.0,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
if (model.procedureList.length != 0)
|
||||||
|
SizedBox(
|
||||||
|
height: model.procedureList[0].rowcount == 0
|
||||||
|
? 200.0
|
||||||
|
: 10.0),
|
||||||
|
//model.prescriptionList == null
|
||||||
|
if (model.procedureList.length != 0)
|
||||||
|
model.procedureList[0].rowcount == 0
|
||||||
|
? Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
addSelectedProcedure(context);
|
||||||
|
//model.postPrescription();
|
||||||
|
},
|
||||||
|
child: CircleAvatar(
|
||||||
|
radius: 65,
|
||||||
|
backgroundColor: Color(0XFFB8382C),
|
||||||
|
child: CircleAvatar(
|
||||||
|
radius: 60,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
child: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Colors.black,
|
||||||
|
size: 45.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'NO ORDER FOR PROCEDURE LISTED',
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).addNow,
|
||||||
|
color: Color(0XFFB8382C),
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: EdgeInsets.all(16.0),
|
||||||
|
child: NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
child: Container(
|
||||||
|
height: 50.0,
|
||||||
|
width: 450.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.grey),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.spaceBetween,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
' Add more procedure',
|
||||||
|
fontWeight: FontWeight.w100,
|
||||||
|
fontSize: 12.5,
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Color(0XFFB8382C),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
addSelectedProcedure(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.all(
|
||||||
|
// Radius.circular(6.0)),
|
||||||
|
// border: Border.all(
|
||||||
|
// width: 1.0,
|
||||||
|
// color: HexColor("#CCCCCC"))),
|
||||||
|
// child: AppTextFormField(
|
||||||
|
// labelText: 'Add more procedure',
|
||||||
|
// borderColor: Colors.white,
|
||||||
|
// //suffixIcon: Icons.search,
|
||||||
|
//
|
||||||
|
// //textInputType: TextInputType.number,
|
||||||
|
// inputFormatter: ONLY_NUMBERS,
|
||||||
|
// onTap: () {
|
||||||
|
// addSelectedProcedure(context);
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
height: 35.0,
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
model.procedureList[0].rowcount,
|
||||||
|
(index) => Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 120.0,
|
||||||
|
width: 45.0,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'8\nDEC',
|
||||||
|
color: Colors.green,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 120,
|
||||||
|
width: 325.0,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Code #: ',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
fontSize: 15.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.procedureList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.procedureId
|
||||||
|
.toString(),
|
||||||
|
fontSize: 13.0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 12.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'Order Type: ',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
fontSize: 15.0,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'Urgent',
|
||||||
|
fontSize: 13.0,
|
||||||
|
color:
|
||||||
|
Colors.red,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: Expanded(
|
||||||
|
child:
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.procedureList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.procedureName,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w800,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Price: ',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.w900,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.procedureList[
|
||||||
|
0]
|
||||||
|
.entityList[
|
||||||
|
index]
|
||||||
|
.price
|
||||||
|
.toString(),
|
||||||
|
fontSize:
|
||||||
|
13.0),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Some short remark about the procedure',
|
||||||
|
fontSize: 13.5,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
|
||||||
|
Divider(
|
||||||
|
height: 5.0,
|
||||||
|
thickness: 1.0,
|
||||||
|
color: Colors.grey,
|
||||||
|
)
|
||||||
|
// SizedBox(
|
||||||
|
// height: 40,
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 30,
|
||||||
|
height: 120,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.edit)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
postProcedure({ProcedureViewModel model}) async {
|
||||||
|
model = new ProcedureViewModel();
|
||||||
|
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
|
||||||
|
List<Controls> controls = List();
|
||||||
|
List<Procedures> controlsProcedure = List();
|
||||||
|
|
||||||
|
postProcedureReqModel.appointmentNo = 2016054575;
|
||||||
|
|
||||||
|
postProcedureReqModel.episodeID = 200012166;
|
||||||
|
postProcedureReqModel.patientMRN = 3120725;
|
||||||
|
postProcedureReqModel.vidaAuthTokenID =
|
||||||
|
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI';
|
||||||
|
|
||||||
|
controls.add(
|
||||||
|
Controls(code: 'Remarks', controlValue: 'Testing'),
|
||||||
|
);
|
||||||
|
controlsProcedure.add(
|
||||||
|
Procedures(category: "02", procedure: "02011002", controls: controls));
|
||||||
|
postProcedureReqModel.procedures = controlsProcedure;
|
||||||
|
|
||||||
|
await model.postProcedure(postProcedureReqModel);
|
||||||
|
DrAppToastMsg.showSuccesToast('Procedure had been added');
|
||||||
|
if (model.state == ViewState.ErrorLocal) {
|
||||||
|
helpers.showErrorToast(model.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void addSelectedProcedure(context) {
|
||||||
|
TextEditingController procedureController = TextEditingController();
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext bc) {
|
||||||
|
return BaseView(
|
||||||
|
//onModelReady: (model) => model.getCategories(),
|
||||||
|
builder:
|
||||||
|
(BuildContext context, ProcedureViewModel model, Widget child) =>
|
||||||
|
SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: 490,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(12.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Select Procedure'.toUpperCase(),
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
// Text(model.categoriesList[0].categoryName),
|
||||||
|
SizedBox(
|
||||||
|
height: 9.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
child: AppTextFormField(
|
||||||
|
labelText: 'Add Delected Procedures'.toUpperCase(),
|
||||||
|
borderColor: Colors.white,
|
||||||
|
textInputType: TextInputType.text,
|
||||||
|
inputFormatter: ONLY_LETTERS,
|
||||||
|
controller: procedureController,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 280.0,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.all(SizeConfig.widthMultiplier * 5),
|
||||||
|
child: Wrap(
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
AppButton(
|
||||||
|
title:
|
||||||
|
TranslationBase.of(context).addMedication,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
postProcedure();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -0,0 +1,192 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class AddSickLeavScreen extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<SickLeaveViewModel>(
|
||||||
|
onModelReady: (model) => model.getSickLeave(),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).sickleave,
|
||||||
|
body: model.getAllSIckLeave.length > 0
|
||||||
|
? SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: model.getAllSIckLeave
|
||||||
|
.map<Widget>((GetAllSickLeaveResponse item) {
|
||||||
|
return CardWithBgWidgetNew(
|
||||||
|
widget: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(left: 10, right: 10),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: Wrap(
|
||||||
|
// mainAxisAlignment:
|
||||||
|
// MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(3),
|
||||||
|
child: AppText(
|
||||||
|
item.status == 1
|
||||||
|
? TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.approved
|
||||||
|
: item.status == 2
|
||||||
|
? TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.extended
|
||||||
|
: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.pending,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
color: item.status == 1
|
||||||
|
? Colors.green
|
||||||
|
: Colors.yellow[800],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.leaveStartDate +
|
||||||
|
' ',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
item.startDate,
|
||||||
|
overflow:
|
||||||
|
TextOverflow.ellipsis,
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
item.noOfDays.toString() +
|
||||||
|
' ' +
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.daysSickleave,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
Row(children: [
|
||||||
|
AppText(
|
||||||
|
item.remarks,
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(item.status == 1 || item.status == 2)
|
||||||
|
? Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.open_in_full,
|
||||||
|
size: 40,
|
||||||
|
),
|
||||||
|
// color: Colors.green, //Colors.black,
|
||||||
|
onPressed: () => {
|
||||||
|
openSickLeave(context, true,
|
||||||
|
extendedData: item)
|
||||||
|
},
|
||||||
|
))
|
||||||
|
: SizedBox(),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: new Builder(builder: (context) {
|
||||||
|
return Center(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(40),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: HexColor('#B8382C'), width: 4),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(100))),
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.add,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
openSickLeave(
|
||||||
|
context,
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).noSickLeaveApplied,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).applyNow,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: HexColor('#B8382C'),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
openSickLeave(BuildContext context, isExtend,
|
||||||
|
{GetAllSickLeaveResponse extendedData}) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return new Container(
|
||||||
|
child: SickLeaveScreen(
|
||||||
|
appointmentNo: extendedData.appointmentNo,
|
||||||
|
patientMRN: extendedData.patientMRN,
|
||||||
|
isExtended: isExtend,
|
||||||
|
extendedData: extendedData,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,379 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/text_validator.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
|
||||||
|
|
||||||
|
Helpers helpers = Helpers();
|
||||||
|
|
||||||
|
class SickLeaveScreen extends StatefulWidget {
|
||||||
|
final bool isExtended;
|
||||||
|
final GetAllSickLeaveResponse extendedData;
|
||||||
|
final appointmentNo;
|
||||||
|
final patientMRN;
|
||||||
|
SickLeaveScreen(
|
||||||
|
{this.appointmentNo,
|
||||||
|
this.patientMRN,
|
||||||
|
this.isExtended = false,
|
||||||
|
this.extendedData});
|
||||||
|
@override
|
||||||
|
_SickLeaveScreenState createState() => _SickLeaveScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SickLeaveScreenState extends State<SickLeaveScreen> {
|
||||||
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
TextEditingController _toDateController = new TextEditingController();
|
||||||
|
String _selectedClinic;
|
||||||
|
Map profile = {};
|
||||||
|
AddSickLeaveRequest addSickLeave = AddSickLeaveRequest();
|
||||||
|
void _presentDatePicker(id) {
|
||||||
|
showDatePicker(
|
||||||
|
context: context,
|
||||||
|
initialDate: DateTime.now(),
|
||||||
|
firstDate: DateTime(2019),
|
||||||
|
lastDate: DateTime.now(),
|
||||||
|
).then((pickedDate) {
|
||||||
|
if (pickedDate == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
// var selectedDate = DateFormat.yMd().format(pickedDate);
|
||||||
|
final df = new DateFormat('yyyy-MM-dd');
|
||||||
|
addSickLeave.startDate = df.format(pickedDate);
|
||||||
|
|
||||||
|
_toDateController.text = addSickLeave.startDate;
|
||||||
|
//addSickLeave.startDate = selectedDate;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
getProfile();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<PatientViewModel>(
|
||||||
|
onModelReady: (model) => model.getClinicsList(),
|
||||||
|
builder: (_, model, w) => BaseView<SickLeaveViewModel>(
|
||||||
|
onModelReady: (model2) => model2.preSickLeaveStatistics(
|
||||||
|
widget.appointmentNo, widget.patientMRN),
|
||||||
|
builder: (_, model2, w) => AppScaffold(
|
||||||
|
baseViewModel: model2,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 10),
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
child: AppText(
|
||||||
|
widget.isExtended == true
|
||||||
|
? TranslationBase.of(context)
|
||||||
|
.extendSickLeave
|
||||||
|
: TranslationBase.of(context)
|
||||||
|
.addSickLeave,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(10)),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppTextFormField(
|
||||||
|
borderColor: Colors.white,
|
||||||
|
onChanged: (value) {
|
||||||
|
addSickLeave.noOfDays = value;
|
||||||
|
},
|
||||||
|
hintText: widget.extendedData != null
|
||||||
|
? widget.extendedData.noOfDays
|
||||||
|
.toString()
|
||||||
|
: TranslationBase.of(context)
|
||||||
|
.sickLeaveDays,
|
||||||
|
// validator: (value) {
|
||||||
|
// return TextValidator().validateName(value);
|
||||||
|
// },
|
||||||
|
inputFormatter: ONLY_NUMBERS)
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0,
|
||||||
|
color: HexColor("#CCCCCC"))),
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).sickLeaveDate,
|
||||||
|
// fontSize: 10,
|
||||||
|
// ),
|
||||||
|
AppTextFormField(
|
||||||
|
hintText: widget.extendedData != null
|
||||||
|
? widget.extendedData.startDate
|
||||||
|
: TranslationBase.of(context)
|
||||||
|
.sickLeaveDate,
|
||||||
|
borderColor: Colors.white,
|
||||||
|
prefix: IconButton(
|
||||||
|
icon: Icon(Icons.calendar_today)),
|
||||||
|
textInputType: TextInputType.number,
|
||||||
|
controller: _toDateController,
|
||||||
|
onTap: () {
|
||||||
|
_presentDatePicker('_selectedToDate');
|
||||||
|
},
|
||||||
|
inputFormatter: ONLY_DATE,
|
||||||
|
onChanged: (value) {
|
||||||
|
addSickLeave.startDate = value;
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 10, left: 10, right: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0,
|
||||||
|
color: HexColor("#CCCCCC"))),
|
||||||
|
width: double.infinity,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
bottom: SizeConfig.widthMultiplier * 0.9,
|
||||||
|
right: SizeConfig.widthMultiplier * 3,
|
||||||
|
left: SizeConfig.widthMultiplier * 3),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).clinicName,
|
||||||
|
// fontSize: 10,
|
||||||
|
// ),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
// add Expanded to have your dropdown button fill remaining space
|
||||||
|
child: DropdownButtonHideUnderline(
|
||||||
|
child: new IgnorePointer(
|
||||||
|
ignoring: true,
|
||||||
|
child: DropdownButton(
|
||||||
|
isExpanded: true,
|
||||||
|
value: getClinicName(
|
||||||
|
model) ??
|
||||||
|
"",
|
||||||
|
iconSize: 40,
|
||||||
|
elevation: 16,
|
||||||
|
selectedItemBuilder:
|
||||||
|
(BuildContext
|
||||||
|
context) {
|
||||||
|
return model
|
||||||
|
.getClinicNameList()
|
||||||
|
.map((item) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize:
|
||||||
|
MainAxisSize
|
||||||
|
.max,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
item,
|
||||||
|
fontSize: SizeConfig
|
||||||
|
.textMultiplier *
|
||||||
|
2.1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
},
|
||||||
|
onChanged: (newValue) =>
|
||||||
|
{},
|
||||||
|
items: model
|
||||||
|
.getClinicNameList()
|
||||||
|
.map((item) {
|
||||||
|
return DropdownMenuItem(
|
||||||
|
value:
|
||||||
|
item.toString(),
|
||||||
|
child: Text(
|
||||||
|
item,
|
||||||
|
textAlign:
|
||||||
|
TextAlign.end,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
))),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
model2.sickLeaveStatistics[
|
||||||
|
'recommendedSickLeaveDays'] !=
|
||||||
|
null
|
||||||
|
? Padding(
|
||||||
|
child: AppText(
|
||||||
|
model2.sickLeaveStatistics[
|
||||||
|
'recommendedSickLeaveDays'],
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
)
|
||||||
|
: SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).doctorName,
|
||||||
|
// fontSize: 10,
|
||||||
|
// ),
|
||||||
|
new IgnorePointer(
|
||||||
|
ignoring: true,
|
||||||
|
child: AppTextFormField(
|
||||||
|
readOnly: true,
|
||||||
|
hintText: profile['DoctorName'],
|
||||||
|
borderColor: Colors.white,
|
||||||
|
onSaved: (value) {},
|
||||||
|
// validator: (value) {
|
||||||
|
// return TextValidator().validateName(value);
|
||||||
|
// },
|
||||||
|
inputFormatter: ONLY_NUMBERS))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 10, right: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).remarks,
|
||||||
|
// fontSize: 10,
|
||||||
|
// ),
|
||||||
|
AppTextFormField(
|
||||||
|
borderColor: Colors.white,
|
||||||
|
hintText: widget.extendedData != null
|
||||||
|
? widget.extendedData.remarks
|
||||||
|
: TranslationBase.of(context).remarks,
|
||||||
|
onChanged: (value) {
|
||||||
|
addSickLeave.remarks = value;
|
||||||
|
},
|
||||||
|
validator: (value) {
|
||||||
|
// return TextValidator().validateName(value);
|
||||||
|
},
|
||||||
|
inputFormatter: ONLY_LETTERS)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(
|
||||||
|
SizeConfig.widthMultiplier * 5),
|
||||||
|
child: Wrap(
|
||||||
|
alignment: WrapAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
AppButton(
|
||||||
|
title: widget.isExtended == true
|
||||||
|
? TranslationBase.of(context).extend
|
||||||
|
: TranslationBase.of(context).add,
|
||||||
|
onPressed: () {
|
||||||
|
if (widget.isExtended) {
|
||||||
|
model2
|
||||||
|
.extendSickLeave(
|
||||||
|
widget.extendedData)
|
||||||
|
.then((value) => (value) {
|
||||||
|
print(value);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
model2
|
||||||
|
.addSickLeave(addSickLeave)
|
||||||
|
.then((value) => print(value));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Column(
|
||||||
|
// children: [
|
||||||
|
// Texts(TranslationBase.of(context)
|
||||||
|
// .previousSickLeaveIssue +
|
||||||
|
// ' ')
|
||||||
|
// ],
|
||||||
|
// )
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
getProfile() async {
|
||||||
|
Map p = await sharedPref.getObj(DOCTOR_PROFILE);
|
||||||
|
setState(() {
|
||||||
|
this.profile = p;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getClinicName(model) {
|
||||||
|
var clinicInfo = model.clinicsList
|
||||||
|
.where((i) => i['ClinicID'] == this.profile['ClinicID'])
|
||||||
|
.toList();
|
||||||
|
return clinicInfo.length > 0 ? clinicInfo[0]['ClinicDescription'] : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,143 @@
|
|||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PatientReferralItemWidget extends StatelessWidget {
|
||||||
|
final String patientName;
|
||||||
|
final String referralStatus;
|
||||||
|
final isReferredTo;
|
||||||
|
final isSameBranch;
|
||||||
|
final String referralDoctorName;
|
||||||
|
final String clinicDescription;
|
||||||
|
final String remark;
|
||||||
|
final Widget infoIcon;
|
||||||
|
|
||||||
|
PatientReferralItemWidget({
|
||||||
|
this.patientName,
|
||||||
|
this.referralStatus,
|
||||||
|
this.isReferredTo = false,
|
||||||
|
this.isSameBranch,
|
||||||
|
this.referralDoctorName,
|
||||||
|
this.clinicDescription,
|
||||||
|
this.remark,
|
||||||
|
this.infoIcon,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Center(
|
||||||
|
child: AppText(
|
||||||
|
patientName,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (referralStatus != null)
|
||||||
|
Container(
|
||||||
|
color: Color(0xFF4BA821),
|
||||||
|
padding: EdgeInsets.all(4),
|
||||||
|
child: AppText(
|
||||||
|
referralStatus == "46"
|
||||||
|
? TranslationBase.of(context).approved
|
||||||
|
: TranslationBase.of(context).rejected,
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
isReferredTo
|
||||||
|
? "${TranslationBase.of(context).referTo}: "
|
||||||
|
: "${TranslationBase.of(context).referredFrom}: ",
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
isSameBranch
|
||||||
|
? TranslationBase.of(context).sameBranch
|
||||||
|
: TranslationBase.of(context).otherBranch,
|
||||||
|
color: Colors.grey,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).dr} $referralDoctorName",
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
if (clinicDescription != null)
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).clinic}: ",
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
clinicDescription,
|
||||||
|
color: Colors.grey,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
remark,
|
||||||
|
color: Colors.grey,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (infoIcon != null) infoIcon,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
color: Color(0xffCCCCCC),
|
||||||
|
height: 1,
|
||||||
|
thickness: 1,
|
||||||
|
indent: 0,
|
||||||
|
endIndent: 0,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PatientProfileButton extends StatelessWidget {
|
||||||
|
final String nameLine1;
|
||||||
|
final String nameLine2;
|
||||||
|
final String icon;
|
||||||
|
final dynamic route;
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
final String url = "assets/images/";
|
||||||
|
PatientProfileButton(
|
||||||
|
{Key key, this.patient, this.nameLine1, this.nameLine2, this.icon, this.route})
|
||||||
|
: super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return new Container(
|
||||||
|
margin: new EdgeInsets.symmetric(horizontal: 4.0),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
navigator(context, this.route);
|
||||||
|
},
|
||||||
|
child: Column(children: <Widget>[
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child:
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
this.nameLine1,
|
||||||
|
color: Color(0xFFB9382C),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
this.nameLine2,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
child: new Image.asset(url + icon))
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
// border: Border.all(),
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: Color(0xffBBBBBB),
|
||||||
|
width: 1,
|
||||||
|
)),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.grey.withOpacity(0.2),
|
||||||
|
spreadRadius: 5,
|
||||||
|
blurRadius: 7,
|
||||||
|
offset: Offset(0, 3), // changes position of shadow
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.fromLTRB(5, 10, 5, 5),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void navigator(BuildContext context, route) {
|
||||||
|
Navigator.of(context).pushNamed(route, arguments: {'patient': patient});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../patient_profile_widget.dart';
|
||||||
|
import 'steps_widget.dart';
|
||||||
|
|
||||||
|
class AddSOAPIndex extends StatefulWidget {
|
||||||
|
final bool isUpdate;
|
||||||
|
|
||||||
|
const AddSOAPIndex({Key key, this.isUpdate}) : super(key: key);
|
||||||
|
@override
|
||||||
|
_AddSOAPIndexState createState() => _AddSOAPIndexState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddSOAPIndexState extends State<AddSOAPIndex>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
PageController _controller;
|
||||||
|
int _currentIndex = 0;
|
||||||
|
List<MySelectedAllergy> myAllergiesList= List();
|
||||||
|
List<MasterKeyModel> myHistoryList = List();
|
||||||
|
List<MySelectedExamination> mySelectedExamination = List();
|
||||||
|
MySelectedAssessment mySelectedAssessment = new MySelectedAssessment();
|
||||||
|
changePageViewIndex(pageIndex) {
|
||||||
|
_controller.jumpToPage(pageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
_controller = new PageController();
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
return BaseView<DoctorReplayViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
appBarTitle: TranslationBase.of(context).healthRecordInformation,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(boxShadow: <BoxShadow>[], color: Colors.white),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
PatientPageHeaderWidget(patient),
|
||||||
|
FractionallySizedBox(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.75,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left:
|
||||||
|
MediaQuery.of(context).size.width * 0.05,
|
||||||
|
right:
|
||||||
|
MediaQuery.of(context).size.width * 0.05),
|
||||||
|
child: StepsWidget(
|
||||||
|
index: _currentIndex,
|
||||||
|
changeCurrentTab: changePageViewIndex,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: PageView(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
controller: _controller,
|
||||||
|
onPageChanged: (index) {
|
||||||
|
setState(() {
|
||||||
|
_currentIndex = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
children: <Widget>[
|
||||||
|
SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,),
|
||||||
|
ObjectivePage(changePageViewIndex: changePageViewIndex,mySelectedExamination:mySelectedExamination),
|
||||||
|
AssessmentPage(changePageViewIndex: changePageViewIndex,mySelectedAssessment:mySelectedAssessment),
|
||||||
|
PlanPage(changePageViewIndex: changePageViewIndex,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,653 @@
|
|||||||
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class AssessmentPage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
final MySelectedAssessment mySelectedAssessment;
|
||||||
|
|
||||||
|
AssessmentPage(
|
||||||
|
{Key key, this.changePageViewIndex, this.mySelectedAssessment});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AssessmentPageState createState() => _AssessmentPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AssessmentPageState extends State<AssessmentPage> {
|
||||||
|
bool isAssessmentExpand = false;
|
||||||
|
|
||||||
|
List<dynamic> assessmentList;
|
||||||
|
dynamic _referTo;
|
||||||
|
|
||||||
|
TextEditingController remarksController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return BaseView<SOAPViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('ASSESSMENT',
|
||||||
|
variant:
|
||||||
|
isAssessmentExpand ? "bodyText" : '',
|
||||||
|
bold: isAssessmentExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isAssessmentExpand = !isAssessmentExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isAssessmentExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 5, right: 5, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add ASSESSMENT",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openAssessmentDialog(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
if(widget.mySelectedAssessment != null &&
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.appointmentId !=
|
||||||
|
null && widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisType != null &&
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisCondition != null)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 5, right: 5, top: 15),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment
|
||||||
|
.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment
|
||||||
|
.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment
|
||||||
|
.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"12".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"DEC".toUpperCase(),
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment
|
||||||
|
.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Appointment #: ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.appointmentId
|
||||||
|
.toString(),
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisCondition
|
||||||
|
.nameEn,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Type : ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisType
|
||||||
|
.nameEn,
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Doc : ",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Anas Abdullah",
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 6,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 6,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
widget.mySelectedAssessment.remark,
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment
|
||||||
|
.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"ICD: ".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"R07.1".toUpperCase(),
|
||||||
|
fontSize: 10,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
openAssessmentDialog(context);
|
||||||
|
},
|
||||||
|
child: Icon(EvaIcons
|
||||||
|
.edit2Outline),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
isExpand: isAssessmentExpand,
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: TranslationBase.of(context).next,
|
||||||
|
loading: model.state == ViewState.BusyLocal,
|
||||||
|
onPressed: () async {
|
||||||
|
await submitAssessment(model);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
submitAssessment(SOAPViewModel model) async {
|
||||||
|
// if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
|
||||||
|
// widget.mySelectedAssessment.selectedDiagnosisType != null) {
|
||||||
|
// PostAssessmentRequestModel postAssessmentRequestModel =
|
||||||
|
// new PostAssessmentRequestModel(
|
||||||
|
// patientMRN: 3120690,
|
||||||
|
// episodeId: 200012117,
|
||||||
|
// appointmentNo: 2016054573,
|
||||||
|
// icdCodeDetails: [
|
||||||
|
// new IcdCodeDetails(
|
||||||
|
// remarks: widget.mySelectedAssessment.remark,
|
||||||
|
// complexDiagnosis: true,
|
||||||
|
// conditionId:
|
||||||
|
// widget.mySelectedAssessment.selectedDiagnosisCondition.id,
|
||||||
|
// diagnosisTypeId:
|
||||||
|
// widget.mySelectedAssessment.selectedDiagnosisType.id,
|
||||||
|
// icdcode10Id: "1")
|
||||||
|
// ]);
|
||||||
|
//
|
||||||
|
// await model.postAssessment(postAssessmentRequestModel);
|
||||||
|
//
|
||||||
|
// if (model.state == ViewState.ErrorLocal) {
|
||||||
|
// helpers.showErrorToast(model.error);
|
||||||
|
// } else {
|
||||||
|
// widget.changePageViewIndex(3);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// helpers.showErrorToast('Please add required field correctly');
|
||||||
|
// }
|
||||||
|
widget.changePageViewIndex(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
openAssessmentDialog(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AddAssessmentDetails(
|
||||||
|
mySelectedAssessment: widget.mySelectedAssessment,
|
||||||
|
addSelectedAssessment: () {
|
||||||
|
setState(() {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddAssessmentDetails extends StatefulWidget {
|
||||||
|
final MySelectedAssessment mySelectedAssessment;
|
||||||
|
final Function() addSelectedAssessment;
|
||||||
|
|
||||||
|
const AddAssessmentDetails(
|
||||||
|
{Key key, this.mySelectedAssessment, this.addSelectedAssessment})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddAssessmentDetailsState createState() => _AddAssessmentDetailsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
||||||
|
// MasterKeyModel _selectedDiagnosisCondition;
|
||||||
|
// MasterKeyModel _selectedDiagnosisType;
|
||||||
|
TextEditingController remarkController = TextEditingController();
|
||||||
|
TextEditingController appointmentIdController = TextEditingController(
|
||||||
|
text: "234567");
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
remarkController.text = widget.mySelectedAssessment.remark??"";
|
||||||
|
final screenSize = MediaQuery
|
||||||
|
.of(context)
|
||||||
|
.size;
|
||||||
|
InputDecoration textFieldSelectorDecoration(String hintText,
|
||||||
|
String selectedText, bool isDropDown) {
|
||||||
|
//TODO: make one Input InputDecoration for all
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.75,
|
||||||
|
child: BaseView<SOAPViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
if (model.listOfDiagnosisCondition.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
|
||||||
|
}
|
||||||
|
if (model.listOfDiagnosisType.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.DiagnosisType);
|
||||||
|
}
|
||||||
|
if (model.listOfICD10.length == 0) {
|
||||||
|
await model.getMasterLookup(MasterKeysService.ICD10);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (_, model, w) =>
|
||||||
|
AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Add Assessment Details".toUpperCase(),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 0, right: 0, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Appointment Number",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
readOnly: true,
|
||||||
|
controller: appointmentIdController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: model.listOfICD10 != null
|
||||||
|
? () {
|
||||||
|
MasterKeyDailog dialog = MasterKeyDailog(
|
||||||
|
isICD: true,
|
||||||
|
list: model.listOfICD10,
|
||||||
|
selectedValue: widget
|
||||||
|
.mySelectedAssessment
|
||||||
|
.selectedICD,
|
||||||
|
okText: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.ok,
|
||||||
|
okFunction:
|
||||||
|
(MasterKeyModel selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedICD =
|
||||||
|
selectedValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
"Name / ICD",
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedICD !=
|
||||||
|
null
|
||||||
|
? widget.mySelectedAssessment
|
||||||
|
.selectedICD.nameEn
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: model.listOfDiagnosisCondition !=
|
||||||
|
null
|
||||||
|
? () {
|
||||||
|
MasterKeyDailog dialog = MasterKeyDailog(
|
||||||
|
list: model.listOfDiagnosisCondition,
|
||||||
|
okText: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.ok,
|
||||||
|
okFunction: (
|
||||||
|
MasterKeyModel selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisCondition =
|
||||||
|
selectedValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
"Condition",
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisCondition != null
|
||||||
|
? widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisCondition
|
||||||
|
.nameEn
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: model.listOfDiagnosisType != null
|
||||||
|
? () {
|
||||||
|
MasterKeyDailog dialog = MasterKeyDailog(
|
||||||
|
list: model.listOfDiagnosisType,
|
||||||
|
okText: TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.ok,
|
||||||
|
okFunction: (
|
||||||
|
MasterKeyModel selectedValue) {
|
||||||
|
setState(() {
|
||||||
|
// _selectedDiagnosisType =
|
||||||
|
// selectedValue;
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisType =
|
||||||
|
selectedValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
showDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return dialog;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: TextField(
|
||||||
|
decoration: textFieldSelectorDecoration(
|
||||||
|
"Type",
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisType != null
|
||||||
|
? widget.mySelectedAssessment
|
||||||
|
.selectedDiagnosisType.nameEn
|
||||||
|
: null,
|
||||||
|
true),
|
||||||
|
enabled: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 0, right: 0, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Remarks",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 18,
|
||||||
|
minLines: 5,
|
||||||
|
controller: remarkController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase
|
||||||
|
.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppButton(
|
||||||
|
title: "Add".toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
widget.mySelectedAssessment.remark =
|
||||||
|
remarkController.text;
|
||||||
|
widget.mySelectedAssessment
|
||||||
|
.appointmentId = int.parse(
|
||||||
|
appointmentIdController.text);
|
||||||
|
|
||||||
|
widget.addSelectedAssessment();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
])),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
))),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,582 @@
|
|||||||
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class ObjectivePage extends StatefulWidget {
|
||||||
|
final Function changePageViewIndex;
|
||||||
|
final List<MySelectedExamination> mySelectedExamination;
|
||||||
|
|
||||||
|
ObjectivePage(
|
||||||
|
{Key key, this.changePageViewIndex, this.mySelectedExamination});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ObjectivePageState createState() => _ObjectivePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ObjectivePageState extends State<ObjectivePage> {
|
||||||
|
bool isSysExaminationExpand = false;
|
||||||
|
TextEditingController remarksController = TextEditingController();
|
||||||
|
|
||||||
|
BoxDecoration containerBorderDecoration(
|
||||||
|
Color containerColor, Color borderColor) {
|
||||||
|
return BoxDecoration(
|
||||||
|
color: containerColor,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: borderColor,
|
||||||
|
width: 0.5,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return BaseView<SOAPViewModel>(
|
||||||
|
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts('Physical/System Examination',
|
||||||
|
variant:
|
||||||
|
isSysExaminationExpand ? "bodyText" : '',
|
||||||
|
bold: isSysExaminationExpand ? true : false,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isSysExaminationExpand =
|
||||||
|
!isSysExaminationExpand;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(isSysExaminationExpand
|
||||||
|
? EvaIcons.minus
|
||||||
|
: EvaIcons.plus))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: Column(children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Add Examination",
|
||||||
|
fontSize: 13.5,
|
||||||
|
onTapTextFields: () {
|
||||||
|
openExaminationList(context);
|
||||||
|
},
|
||||||
|
readOnly: true,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
suffixIcon: EvaIcons.plusCircleOutline,
|
||||||
|
suffixIconColor: AppGlobal.appPrimaryColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
// controller: messageController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children:
|
||||||
|
widget.mySelectedExamination.map((examination) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 15, right: 15, top: 15),
|
||||||
|
child: Column(children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Texts(
|
||||||
|
examination
|
||||||
|
.selectedExamination.nameEn
|
||||||
|
.toUpperCase(),
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color: Colors.black)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height:
|
||||||
|
screenSize.height *
|
||||||
|
0.070,
|
||||||
|
decoration:
|
||||||
|
containerBorderDecoration(
|
||||||
|
examination
|
||||||
|
.isNormal
|
||||||
|
? Color(
|
||||||
|
0xFF515A5D)
|
||||||
|
: Colors
|
||||||
|
.white,
|
||||||
|
Colors.grey),
|
||||||
|
child: Center(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
"Normal",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color:
|
||||||
|
examination
|
||||||
|
.isNormal
|
||||||
|
? Colors.white
|
||||||
|
: Colors
|
||||||
|
.black,
|
||||||
|
//Colors.black,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
examination.isAbnormal =
|
||||||
|
!examination.isAbnormal;
|
||||||
|
examination.isNormal =
|
||||||
|
!examination.isNormal;
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height:
|
||||||
|
screenSize.height *
|
||||||
|
0.070,
|
||||||
|
decoration:
|
||||||
|
containerBorderDecoration(
|
||||||
|
examination
|
||||||
|
.isAbnormal
|
||||||
|
? Color(
|
||||||
|
0xFF515A5D)
|
||||||
|
: Colors
|
||||||
|
.white,
|
||||||
|
Colors.black),
|
||||||
|
child: Center(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
"Abnormal",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color:
|
||||||
|
examination
|
||||||
|
.isAbnormal
|
||||||
|
? Colors.white
|
||||||
|
: Colors
|
||||||
|
.black,
|
||||||
|
//Colors.black,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
examination.isAbnormal =
|
||||||
|
!examination.isAbnormal;
|
||||||
|
examination.isNormal =
|
||||||
|
!examination.isNormal;
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
|
||||||
|
child: Icon(
|
||||||
|
FontAwesomeIcons.trash,
|
||||||
|
color: Colors.grey,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
onTap: () => removeExamination(
|
||||||
|
examination.selectedExamination),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 10, right: 10, top: 15),
|
||||||
|
child: TextFields(
|
||||||
|
hintText: "Remarks",
|
||||||
|
fontSize: 13.5,
|
||||||
|
// hintColor: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
maxLines: 25,
|
||||||
|
minLines: 13,
|
||||||
|
controller: remarksController,
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null)
|
||||||
|
return TranslationBase.of(context)
|
||||||
|
.emptyMessage;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
]));
|
||||||
|
}).toList(),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
isExpand: isSysExaminationExpand,
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(height: 30,),
|
||||||
|
AppButton(
|
||||||
|
title: TranslationBase.of(context).next,
|
||||||
|
loading: model.state == ViewState.BusyLocal,
|
||||||
|
onPressed: () async {
|
||||||
|
await submitObjectivePage(model);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
submitObjectivePage(SOAPViewModel model) async {
|
||||||
|
// if(widget.mySelectedExamination.isNotEmpty){
|
||||||
|
// PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
|
||||||
|
// widget.mySelectedExamination.forEach((exam) {
|
||||||
|
// if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
|
||||||
|
// null)
|
||||||
|
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
|
||||||
|
//
|
||||||
|
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
|
||||||
|
// ListHisProgNotePhysicalExaminationVM(
|
||||||
|
// patientMRN: 3120690,
|
||||||
|
// episodeId: 200012117,
|
||||||
|
// appointmentNo: 2016054573,
|
||||||
|
// remarks: exam.remark ?? '',
|
||||||
|
// createdBy: 1485,
|
||||||
|
// createdOn: DateTime.now().toIso8601String(),
|
||||||
|
// editedBy: 1485,
|
||||||
|
// editedOn: DateTime.now().toIso8601String(),
|
||||||
|
// examId: exam.selectedExamination.id,
|
||||||
|
// examType: exam.selectedExamination.typeId,
|
||||||
|
// isAbnormal: exam.isAbnormal,
|
||||||
|
// isNormal: exam.isNormal,
|
||||||
|
// masterDescription: exam.selectedExamination,
|
||||||
|
// notExamined: false
|
||||||
|
//
|
||||||
|
// ));
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// await model.postPhysicalExam(postPhysicalExamRequestModel);
|
||||||
|
//
|
||||||
|
// if (model.state == ViewState.ErrorLocal) {
|
||||||
|
// helpers.showErrorToast(model.error);
|
||||||
|
// } else {
|
||||||
|
// widget.changePageViewIndex(2);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// helpers.showErrorToast('Please add required field correctly');
|
||||||
|
// }
|
||||||
|
|
||||||
|
widget.changePageViewIndex(2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
removeExamination(MasterKeyModel masterKey) {
|
||||||
|
Iterable<MySelectedExamination> history = widget.mySelectedExamination
|
||||||
|
.where(
|
||||||
|
(element) =>
|
||||||
|
masterKey.id == element.selectedExamination.id &&
|
||||||
|
masterKey.typeId == element.selectedExamination.typeId);
|
||||||
|
|
||||||
|
if (history.length > 0)
|
||||||
|
setState(() {
|
||||||
|
widget.mySelectedExamination.remove(history.first);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
openExaminationList(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery
|
||||||
|
.of(context)
|
||||||
|
.size;
|
||||||
|
InputDecoration textFieldSelectorDecoration(String hintText,
|
||||||
|
String selectedText, bool isDropDown) {
|
||||||
|
return InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
hintText: selectedText != null ? selectedText : hintText,
|
||||||
|
suffixIcon: isDropDown ? Icon(Icons.arrow_drop_down) : null,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey.shade600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
showModalBottomSheet(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
isScrollControlled: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AddExaminationDailog(
|
||||||
|
mySelectedExamination: widget.mySelectedExamination,
|
||||||
|
addSelectedExamination: () {
|
||||||
|
setState(() {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
removeExamination: (masterKey) => removeExamination(masterKey),);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AddExaminationDailog extends StatefulWidget {
|
||||||
|
final List<MySelectedExamination> mySelectedExamination;
|
||||||
|
final Function addSelectedExamination;
|
||||||
|
final Function (MasterKeyModel) removeExamination;
|
||||||
|
|
||||||
|
const AddExaminationDailog(
|
||||||
|
{Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddExaminationDailogState createState() => _AddExaminationDailogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddExaminationDailogState extends State<AddExaminationDailog> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
heightFactor: 0.7,
|
||||||
|
child: BaseView<SOAPViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
if (model.physicalExaminationList.length == 0) {
|
||||||
|
await model.getMasterLookup(
|
||||||
|
MasterKeysService.PhysicalExamination);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (_, model, w) =>
|
||||||
|
AppScaffold(
|
||||||
|
// baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: Center(
|
||||||
|
child: Container(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"Examinations",
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
NetworkBaseView(
|
||||||
|
baseViewModel: model,
|
||||||
|
child: Container(
|
||||||
|
height:
|
||||||
|
MediaQuery
|
||||||
|
.of(context)
|
||||||
|
.size
|
||||||
|
.height * 0.5,
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius
|
||||||
|
.circular(12),
|
||||||
|
color: Colors.white),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: model
|
||||||
|
.physicalExaminationList
|
||||||
|
.map((examinationInfo) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: isServiceSelected(
|
||||||
|
examinationInfo),
|
||||||
|
activeColor:
|
||||||
|
Colors.red[800],
|
||||||
|
onChanged:
|
||||||
|
(
|
||||||
|
bool newValue) {
|
||||||
|
setState(() {
|
||||||
|
if (isServiceSelected(
|
||||||
|
examinationInfo
|
||||||
|
)) {
|
||||||
|
widget
|
||||||
|
.removeExamination(
|
||||||
|
examinationInfo
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MySelectedExamination mySelectedExamination = new MySelectedExamination(
|
||||||
|
selectedExamination: examinationInfo
|
||||||
|
);
|
||||||
|
widget
|
||||||
|
.mySelectedExamination
|
||||||
|
.add(
|
||||||
|
mySelectedExamination);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 0),
|
||||||
|
child: Texts(
|
||||||
|
examinationInfo
|
||||||
|
.nameEn,
|
||||||
|
variant: "bodyText",
|
||||||
|
bold: true,
|
||||||
|
color:
|
||||||
|
Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
DividerWithSpacesAround(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
if (model.state == ViewState.Idle)
|
||||||
|
AppButton(
|
||||||
|
title: "Add SELECTED Examinations"
|
||||||
|
.toUpperCase(),
|
||||||
|
onPressed: () {
|
||||||
|
widget.addSelectedExamination();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
))),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
isServiceSelected(MasterKeyModel masterKey) {
|
||||||
|
Iterable<MySelectedExamination> exam =
|
||||||
|
widget
|
||||||
|
.mySelectedExamination
|
||||||
|
.where((element) =>
|
||||||
|
masterKey.id == element.selectedExamination.id &&
|
||||||
|
masterKey.typeId == element.selectedExamination.typeId);
|
||||||
|
if (exam.length > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue