merge-requests/228/head
Sultan Khan 4 years ago
commit ad967e8aae

@ -166,6 +166,7 @@ const GET_CATEGORISE_PROCEDURE =
const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure';
const UPDATE_PRESCRIPTION =
'Services/DoctorApplication.svc/REST/PatchPrescription';
const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList';
const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile';

@ -504,5 +504,19 @@ const Map<String, Map<String, String>> localizedValues = {
'itemExist': {'en': "This item already exist", 'ar': "هذا العنصر موجود"},
'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"},
'selectSeverity': {'en': "Select Severity", 'ar': "أختر الدرجه"},
'leaveCreated': {'en': "Leave has been created", 'ar': "تم إنشاء الإجازة"}
'leaveCreated': {'en': "Leave has been created", 'ar': "تم إنشاء الإجازة"},
'medications': {'en': "Medications", 'ar': "الأدوية"},
'procedures': {'en': "Procedures", 'ar': "الإجراءات"},
'vitalSignEmptyMsg': {
'en': "There is no vital signs for this patient",
'ar': "لا توجد علامات حيوية لهذا المريض"
},
'referralEmptyMsg': {
'en': "There is no referral data",
'ar': "لا توجد بيانات إحالة"
},
'referralSuccessMsg': {
'en': "You make referral successfully",
'ar': "You make referral successfully"
},
};

@ -1,7 +1,7 @@
class MedicalFileModel {
List<EntityList> entityList;
int rowcount;
dynamic statusMessage;
Null statusMessage;
MedicalFileModel({this.entityList, this.rowcount, this.statusMessage});
@ -190,12 +190,12 @@ class LstDischargeDiag {
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
// if (json['TimeLineEvents'] != null) {
// timeLineEvents = new List<TimeLineEvents>();
// json['TimeLineEvents'].forEach((v) {
// timeLineEvents.add(new TimeLineEvents.fromJson(v));
// });
// }
if (json['TimeLineEvents'] != null) {
timeLineEvents = new List<TimeLineEvents>();
json['TimeLineEvents'].forEach((v) {
timeLineEvents.add(new TimeLineEvents.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
@ -246,49 +246,49 @@ class TimeLineEvents {
this.radReports,
this.toolTip});
// TimeLineEvents.fromJson(Map<String, dynamic> json) {
// if (json['Admissions'] != null) {
// admissions = new List<Null>();
// json['Admissions'].forEach((v) {
// admissions.add(new Null.fromJson(v));
// });
// }
// colorClass = json['ColorClass'];
// if (json['Consulations'] != null) {
// consulations = new List<Null>();
// json['Consulations'].forEach((v) {
// consulations.add(new Null.fromJson(v));
// });
// }
// disPlayName = json['DisPlayName'];
// doctorName = json['DoctorName'];
// eRData =
// json['ERData'] != null ? new ERData.fromJson(json['ERData']) : null;
// eventId = json['EventId'];
// fullName = json['FullName'];
// iconClass = json['IconClass'];
// isDisabled = json['IsDisabled'];
// if (json['LabOrders'] != null) {
// labOrders = new List<Null>();
// json['LabOrders'].forEach((v) {
// labOrders.add(new Null.fromJson(v));
// });
// }
// if (json['RadReports'] != null) {
// radReports = new List<Null>();
// json['RadReports'].forEach((v) {
// radReports.add(new Null.fromJson(v));
// });
// }
// toolTip = json['ToolTip'];
// }
TimeLineEvents.fromJson(Map<String, dynamic> json) {
// if (json['Admissions'] != null) {
// admissions = new List<Null>();
// json['Admissions'].forEach((v) {
// admissions.add(new Null.fromJson(v));
// });
// }
// colorClass = json['ColorClass'];
// if (json['Consulations'] != null) {
// consulations = new List<Null>();
// json['Consulations'].forEach((v) {
// consulations.add(new Null.fromJson(v));
// });
// }
disPlayName = json['DisPlayName'];
doctorName = json['DoctorName'];
eRData =
json['ERData'] != null ? new ERData.fromJson(json['ERData']) : null;
eventId = json['EventId'];
fullName = json['FullName'];
iconClass = json['IconClass'];
isDisabled = json['IsDisabled'];
// if (json['LabOrders'] != null) {
// labOrders = new List<Null>();
// json['LabOrders'].forEach((v) {
// labOrders.add(new Null.fromJson(v));
// });
// }
// if (json['RadReports'] != null) {
// radReports = new List<Null>();
// json['RadReports'].forEach((v) {
// radReports.add(new Null.fromJson(v));
// });
// }
toolTip = json['ToolTip'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
// if (this.admissions != null) {
// data['Admissions'] = this.admissions.map((v) => v.toJson()).toList();
// }
data['ColorClass'] = this.colorClass;
// data['ColorClass'] = this.colorClass;
// if (this.consulations != null) {
// data['Consulations'] = this.consulations.map((v) => v.toJson()).toList();
// }
@ -326,38 +326,38 @@ class ERData {
this.radReports,
this.lstErDischargeSummary});
// ERData.fromJson(Map<String, dynamic> json) {
// if (json['Admissions'] != null) {
// admissions = new List<Null>();
// json['Admissions'].forEach((v) {
// admissions.add(new Null.fromJson(v));
// });
// }
// if (json['Consulations'] != null) {
// consulations = new List<Null>();
// json['Consulations'].forEach((v) {
// consulations.add(new Null.fromJson(v));
// });
// }
// if (json['LabOrders'] != null) {
// labOrders = new List<Null>();
// json['LabOrders'].forEach((v) {
// labOrders.add(new Null.fromJson(v));
// });
// }
// if (json['RadReports'] != null) {
// radReports = new List<Null>();
// json['RadReports'].forEach((v) {
// radReports.add(new Null.fromJson(v));
// });
// }
// if (json['lstErDischargeSummary'] != null) {
// lstErDischargeSummary = new List<Null>();
// json['lstErDischargeSummary'].forEach((v) {
// lstErDischargeSummary.add(new Null.fromJson(v));
// });
// }
// }
ERData.fromJson(Map<String, dynamic> json) {
// if (json['Admissions'] != null) {
// admissions = new List<Null>();
// json['Admissions'].forEach((v) {
// admissions.add(new Null.fromJson(v));
// });
// }
// if (json['Consulations'] != null) {
// consulations = new List<Null>();
// json['Consulations'].forEach((v) {
// consulations.add(new Null.fromJson(v));
// });
// }
// if (json['LabOrders'] != null) {
// labOrders = new List<Null>();
// json['LabOrders'].forEach((v) {
// labOrders.add(new Null.fromJson(v));
// });
// }
// if (json['RadReports'] != null) {
// radReports = new List<Null>();
// json['RadReports'].forEach((v) {
// radReports.add(new Null.fromJson(v));
// });
// }
// if (json['lstErDischargeSummary'] != null) {
// lstErDischargeSummary = new List<Null>();
// json['lstErDischargeSummary'].forEach((v) {
// lstErDischargeSummary.add(new Null.fromJson(v));
// });
// }
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
@ -827,6 +827,7 @@ class DoctorWisePatientEpisodes {
String setupID;
int doctorID;
String doctorName;
List<LstEpisodes> lstEpisodes;
DoctorWisePatientEpisodes(
{this.clinicName,
@ -835,7 +836,8 @@ class DoctorWisePatientEpisodes {
this.projectName,
this.setupID,
this.doctorID,
this.doctorName});
this.doctorName,
this.lstEpisodes});
DoctorWisePatientEpisodes.fromJson(Map<String, dynamic> json) {
clinicName = json['ClinicName'];
@ -845,6 +847,12 @@ class DoctorWisePatientEpisodes {
setupID = json['SetupID'];
doctorID = json['doctorID'];
doctorName = json['doctorName'];
if (json['lstEpisodes'] != null) {
lstEpisodes = new List<LstEpisodes>();
json['lstEpisodes'].forEach((v) {
lstEpisodes.add(new LstEpisodes.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
@ -856,6 +864,256 @@ class DoctorWisePatientEpisodes {
data['SetupID'] = this.setupID;
data['doctorID'] = this.doctorID;
data['doctorName'] = this.doctorName;
if (this.lstEpisodes != null) {
data['lstEpisodes'] = this.lstEpisodes.map((v) => v.toJson()).toList();
}
return data;
}
}
class LstEpisodes {
int admissionNo;
String appointmentDate;
int appointmentNo;
String appointmentType;
String clinicID;
String clinicName;
int doctorID;
String doctorName;
String endTime;
String episodeDate;
int episodeID;
int patientID;
int projectID;
String projectName;
String remarks;
String setupID;
String startTime;
String visitFor;
String visitType;
String dispalyName;
List<LstAssessments> lstAssessments;
List<LstPhysicalExam> lstPhysicalExam;
LstEpisodes(
{this.admissionNo,
this.appointmentDate,
this.appointmentNo,
this.appointmentType,
this.clinicID,
this.clinicName,
this.doctorID,
this.doctorName,
this.endTime,
this.episodeDate,
this.episodeID,
this.patientID,
this.projectID,
this.projectName,
this.remarks,
this.setupID,
this.startTime,
this.visitFor,
this.visitType,
this.dispalyName,
this.lstAssessments,
this.lstPhysicalExam});
LstEpisodes.fromJson(Map<String, dynamic> json) {
admissionNo = json['AdmissionNo'];
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
appointmentType = json['AppointmentType'];
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
doctorID = json['DoctorID'];
doctorName = json['DoctorName'];
endTime = json['EndTime'];
episodeDate = json['EpisodeDate'];
episodeID = json['EpisodeID'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
startTime = json['StartTime'];
visitFor = json['VisitFor'];
visitType = json['VisitType'];
dispalyName = json['dispalyName'];
if (json['lstAssessments'] != null) {
lstAssessments = new List<LstAssessments>();
json['lstAssessments'].forEach((v) {
lstAssessments.add(new LstAssessments.fromJson(v));
});
}
if (json['lstPhysicalExam'] != null) {
lstPhysicalExam = new List<LstPhysicalExam>();
json['lstPhysicalExam'].forEach((v) {
lstPhysicalExam.add(new LstPhysicalExam.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AdmissionNo'] = this.admissionNo;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentType'] = this.appointmentType;
data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName;
data['DoctorID'] = this.doctorID;
data['DoctorName'] = this.doctorName;
data['EndTime'] = this.endTime;
data['EpisodeDate'] = this.episodeDate;
data['EpisodeID'] = this.episodeID;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['SetupID'] = this.setupID;
data['StartTime'] = this.startTime;
data['VisitFor'] = this.visitFor;
data['VisitType'] = this.visitType;
data['dispalyName'] = this.dispalyName;
if (this.lstAssessments != null) {
data['lstAssessments'] =
this.lstAssessments.map((v) => v.toJson()).toList();
}
if (this.lstPhysicalExam != null) {
data['lstPhysicalExam'] =
this.lstPhysicalExam.map((v) => v.toJson()).toList();
}
return data;
}
}
class LstAssessments {
int appointmentNo;
String condition;
String description;
int episodeID;
String iCD10;
int patientID;
String patientType;
int projectID;
String projectName;
String remarks;
String setupID;
String type;
String dispalyName;
LstAssessments(
{this.appointmentNo,
this.condition,
this.description,
this.episodeID,
this.iCD10,
this.patientID,
this.patientType,
this.projectID,
this.projectName,
this.remarks,
this.setupID,
this.type,
this.dispalyName});
LstAssessments.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
condition = json['Condition'];
description = json['Description'];
episodeID = json['EpisodeID'];
iCD10 = json['ICD10'];
patientID = json['PatientID'];
patientType = json['PatientType'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
type = json['Type'];
dispalyName = json['dispalyName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentNo'] = this.appointmentNo;
data['Condition'] = this.condition;
data['Description'] = this.description;
data['EpisodeID'] = this.episodeID;
data['ICD10'] = this.iCD10;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['SetupID'] = this.setupID;
data['Type'] = this.type;
data['dispalyName'] = this.dispalyName;
return data;
}
}
class LstPhysicalExam {
String abnormal;
int appointmentNo;
int episodeID;
String examDesc;
String examID;
String examType;
int patientID;
String patientType;
int projectID;
String projectName;
String remarks;
String setupID;
String dispalyName;
LstPhysicalExam(
{this.abnormal,
this.appointmentNo,
this.episodeID,
this.examDesc,
this.examID,
this.examType,
this.patientID,
this.patientType,
this.projectID,
this.projectName,
this.remarks,
this.setupID,
this.dispalyName});
LstPhysicalExam.fromJson(Map<String, dynamic> json) {
abnormal = json['Abnormal'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];
examDesc = json['ExamDesc'];
examID = json['ExamID'];
examType = json['ExamType'];
patientID = json['PatientID'];
patientType = json['PatientType'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
setupID = json['SetupID'];
dispalyName = json['dispalyName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Abnormal'] = this.abnormal;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
data['ExamDesc'] = this.examDesc;
data['ExamID'] = this.examID;
data['ExamType'] = this.examType;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['SetupID'] = this.setupID;
data['dispalyName'] = this.dispalyName;
return data;
}
}

@ -34,7 +34,7 @@ class EntityList {
String genderValidation;
String group;
String orderedValidation;
int price;
dynamic price;
String procedureId;
String procedureName;
String specialPermission;

@ -0,0 +1,65 @@
class SearchDrugModel {
List<EntityList> entityList;
int rowcount;
dynamic statusMessage;
SearchDrugModel({this.entityList, this.rowcount, this.statusMessage});
SearchDrugModel.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 description;
dynamic genericName;
dynamic itemId;
dynamic keywords;
dynamic price;
dynamic quantity;
EntityList(
{this.description,
this.genericName,
this.itemId,
this.keywords,
this.price,
this.quantity});
EntityList.fromJson(Map<String, dynamic> json) {
description = json['Description'];
genericName = json['GenericName'];
itemId = json['ItemId'];
keywords = json['Keywords'];
price = json['Price'];
quantity = json['Quantity'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description;
data['GenericName'] = this.genericName;
data['ItemId'] = this.itemId;
data['Keywords'] = this.keywords;
data['Price'] = this.price;
data['Quantity'] = this.quantity;
return data;
}
}

@ -0,0 +1,18 @@
class SearchDrugRequestModel {
List<String> search;
String vidaAuthTokenID;
SearchDrugRequestModel({this.search, this.vidaAuthTokenID});
SearchDrugRequestModel.fromJson(Map<String, dynamic> json) {
search = json['Search'].cast<String>();
vidaAuthTokenID = json['VidaAuthTokenID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Search'] = this.search;
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
return data;
}
}

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_reque
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/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
import 'base/lookup-service.dart';
@ -188,7 +189,7 @@ class PatientReferralService extends LookupService {
}
Future makeReferral(
PatientArrivalEntity patientArrivalEntity,
PatiantInformtion patient,
String isoStringDate,
int projectID,
int clinicID,
@ -203,8 +204,8 @@ class PatientReferralService extends LookupService {
.add({"goalId": element.id, "remarks": element.remarks});
});
body['PatientMRN'] = patientArrivalEntity.patientMRN;
body['AppointmentNo'] = patientArrivalEntity.appointmentNo;
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['SetupID'] = setupID;
body['appointmentDate'] = isoStringDate;
body['SlotStart'] = isoStringDate;

@ -1,6 +1,7 @@
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/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';
@ -46,18 +47,18 @@ class VitalSignsService extends BaseService{
);
} // Vit*/
Future getPatientVitalSign(PatientArrivalEntity patientArrivalEntity) async {
Future getPatientVitalSign(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patientArrivalEntity.patientMRN;
body['AppointmentNo'] = patientArrivalEntity.appointmentNo;
body['EpisodeID'] = patientArrivalEntity.episodeNo;
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.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){
if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']);
}
}

@ -2,17 +2,26 @@ 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/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_request_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;
List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList;
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(
patientMRN: 3120877,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODA0IiwianRpIjoiNzNiNmUyZDctMjA0ZC00NzAyLTkxMDYtODE3MzI3OTZkYzI5IiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMjgwNCIsIk5hbWUiOiJNVUhBTU1BRCBBWkFNIiwiRW1wbG95ZWVJZCI6IjE0ODUiLCJGYWNpbGl0eUdyb3VwSWQiOiIwMTAyNjYiLCJGYWNpbGl0eUlkIjoiMTUiLCJQaGFyYW1jeUZhY2lsaXR5SWQiOiI1NSIsIklTX1BIQVJNQUNZX0NPTk5FQ1RFRCI6IlRydWUiLCJEb2N0b3JJZCI6IjE0ODUiLCJTRVNTSU9OSUQiOiIyMTU3NjIwOSIsIkNsaW5pY0lkIjoiMyIsInJvbGUiOlsiU0VDVVJJVFkgQURNSU5JU1RSQVRPUlMiLCJTRVRVUCBBRE1JTklTVFJBVE9SUyIsIkNFTydTIiwiRVhFQ1VUSVZFIERJUkVDVE9SUyIsIk1BTkFHRVJTIiwiU1VQRVJWSVNPUlMiLCJDTElFTlQgU0VSVklDRVMgQ09PUkRJTkFUT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIFNVUEVSVklTT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIE1BTkdFUlMiLCJIRUFEIE5VUlNFUyIsIkRPQ1RPUlMiLCJDSElFRiBPRiBNRURJQ0FMIFNUQUZGUyIsIkJJTy1NRURJQ0FMIFRFQ0hOSUNJQU5TIiwiQklPLU1FRElDQUwgRU5HSU5FRVJTIiwiQklPLU1FRElDQUwgREVQQVJUTUVOVCBIRUFEUyIsIklUIEhFTFAgREVTSyIsIkFETUlOSVNUUkFUT1JTIiwiTEFCIEFETUlOSVNUUkFUT1IiLCJMQUIgVEVDSE5JQ0lBTiIsIkJVU0lORVNTIE9GRklDRSBTVEFGRiIsIkZJTkFOQ0UgQUNDT1VOVEFOVFMiLCJQSEFSTUFDWSBTVEFGRiIsIkFDQ09VTlRTIFNUQUZGIiwiTEFCIFJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiSU5QQVRJRU5UIEJJTExJTkcgU1VQRVJWSVNPUiIsIkxEUi1PUiBOVVJTRVMiLCJBRE1JU1NJT04gU1RBRkYiLCJIRUxQIERFU0sgQURNSU4iLCJBUFBST1ZBTCBTVEFGRiIsIklOUEFUSUVOVCBCSUxMSU5HIENPT1JESU5BVE9SIiwiQklMTElORyBTVEFGRiIsIkNPTlNFTlQgIiwiQ29uc2VudCAtIERlbnRhbCIsIldFQkVNUiJdLCJuYmYiOjE2MDgyMzY2MjAsImV4cCI6MTYwOTEwMDYyMCwiaWF0IjoxNjA4MjM2NjIwfQ.z4Lh0dCRr9GWXvaTo7x5GPV7R5z8ONyh3-0uk3PXMu8",
);
SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel(
search: ["panadol"],
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiY2QwOWU3MTEtZDEwYy00NjZhLWEwNDctMjc4MDBmNmRkMTYxIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYyMDMiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkhFQUQgTlVSU0VTIiwiRE9DVE9SUyIsIkhFQUQgRE9DVE9SUyIsIkFETUlOSVNUUkFUT1JTIiwiUkVDRVBUSU9OSVNUIiwiRVIgTlVSU0UiLCJJVkYgUkVDRVBUSU9OSVNUIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIklWRiBET0NUT1IiLCJJVkYgTlVSU0UiLCJJVkYgQ09PUkRJTkFUT1IiLCJJVkYgTEFCIFNUQUZGIiwiQ09OU0VOVCAiLCJNRURJQ0FMIFJFUE9SVCAtIFNJQ0sgTEVBVkUgTUFOQUdFUiJdLCJuYmYiOjE2MDkyNjQ2MTQsImV4cCI6MTYxMDEyODYxNCwiaWF0IjoxNjA5MjY0NjE0fQ.xCJ0jGtSFf36G8uZpdmHVoLfXDyP6e9mBpuOPSlzuio",
);
PostPrescriptionReqModel _postPrescriptionReqModel =
PostPrescriptionReqModel();
@ -30,6 +39,18 @@ class PrescriptionService extends BaseService {
}, body: _prescriptionReqModel.toJson());
}
Future getDrugs() async {
hasError = false;
_drugsList.clear();
await baseAppClient.post(SEARCH_DRUG,
onSuccess: (dynamic response, int statusCode) {
_drugsList.add(SearchDrugModel.fromJson(response['MedicationList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _drugRequestModel.toJson());
}
Future postPrescription(
PostPrescriptionReqModel postProcedureReqModel) async {
hasError = false;

@ -14,10 +14,10 @@ class ProcedureService extends BaseService {
List<Procedures> procedureslist = List();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
clinicId: 0,
clinicId: 17,
pageSize: 10,
pageIndex: 1,
patientMRN: 0,
patientMRN: 3120725,
//categoryId: null,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",

@ -7,6 +7,7 @@ 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 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
@ -40,7 +41,7 @@ class PatientReferralViewModel extends BaseViewModel {
}
Future getBranches() async {
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _referralPatientService.getProjectsList();
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
@ -51,7 +52,7 @@ class PatientReferralViewModel extends BaseViewModel {
}
Future getClinics(int projectId) async {
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _referralPatientService.getClinicsList(projectId);
await _referralPatientService.getProjectInfo(projectId);
if (_referralPatientService.hasError) {
@ -62,7 +63,7 @@ class PatientReferralViewModel extends BaseViewModel {
}
Future getClinicDoctors(String clinicId) async {
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _referralPatientService.getDoctorsList(clinicId);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
@ -117,35 +118,14 @@ class PatientReferralViewModel extends BaseViewModel {
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,
Future makeReferral(PatiantInformtion patient,
String isoStringDate,
int projectID,
int clinicID,
int doctorID,
String remarks) async {
setState(ViewState.Busy);
await _referralPatientService.makeReferral(patientArrivalEntity, isoStringDate, projectID, clinicID, doctorID, remarks);
await _referralPatientService.makeReferral(patient, isoStringDate, projectID, clinicID, doctorID, remarks);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);

@ -16,17 +16,17 @@ class VitalSignsViewModel extends BaseViewModel {
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns;
Future getPatientArrivalList(String date, PatiantInformtion patient,
/*Future getPatientArrivalList(String date, PatiantInformtion patient,
{String fromDate}) async {
// TODO when arrival list work un comment below lines
/* setState(ViewState.Busy);
*//* setState(ViewState.Busy);
await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate);
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else {
await getPatientVitalSign(patient);
}*/
}*//*
makeVitalSignDemoData();
}
@ -43,27 +43,18 @@ class VitalSignsViewModel extends BaseViewModel {
// 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) {
await _vitalSignService.getPatientVitalSign(patient);
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else {
if (patientVitalSigns == null) {
makeVitalSignDemoData();
}
// if (patientVitalSigns == null) {
// makeVitalSignDemoData();
// }
setState(ViewState.Idle);
}
}

@ -1,6 +1,7 @@
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/model/search_drug_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';
@ -11,6 +12,7 @@ class PrescriptionViewModel extends BaseViewModel {
List<PrescriptionModel> get prescriptionList =>
_prescriptionService.prescriptionList;
List<SearchDrugModel> get drugsList => _prescriptionService.drugsList;
Future getPrescription() async {
hasError = false;
@ -53,4 +55,16 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
Future getDrugs() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _prescriptionService.getDrugs();
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -4,9 +4,10 @@ class MySelectedAllergy {
MasterKeyModel selectedAllergySeverity;
MasterKeyModel selectedAllergy;
String remark;
bool isChecked;
MySelectedAllergy(
{this.selectedAllergySeverity, this.selectedAllergy, this.remark});
{this.selectedAllergySeverity, this.selectedAllergy, this.remark, this.isChecked});
MySelectedAllergy.fromJson(Map<String, dynamic> json) {
selectedAllergySeverity = json['selectedAllergySeverity'] != null
@ -16,6 +17,7 @@ class MySelectedAllergy {
? new MasterKeyModel.fromJson(json['selectedAllergy'])
: null;
remark = json['remark'];
remark = json['isChecked'];
}
Map<String, dynamic> toJson() {
@ -27,6 +29,7 @@ class MySelectedAllergy {
data['selectedAllergy'] = this.selectedAllergy.toJson();
}
data['remark'] = this.remark;
data['isChecked'] = this.remark;
return data;
}
}

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
@ -91,6 +92,7 @@ const String PATIENT_ADMISSION_REQUEST = 'patients/admission-request';
const String PATIENT_ADMISSION_REQUEST_2 = 'patients/admission-request-second';
const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third';
const String PATIENT_UCAF_REQUEST = 'patients/ucaf';
const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
@ -155,4 +157,5 @@ var routes = {
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox()
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
};

@ -0,0 +1,112 @@
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.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/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class UcafDetailScreen extends StatefulWidget {
@override
_UcafDetailScreenState createState() => _UcafDetailScreenState();
}
class _UcafDetailScreenState extends State<UcafDetailScreen> {
int _activeTap = 0;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).ucaf,
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientHeaderWidgetNoAvatar(patient),
SizedBox(
height: 10,
),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column(
children: [
treatmentStepsBar(context, screenSize),
SizedBox(
height: 16,
),
getSelectedTreatmentStepItem(context),
],
),
),
],
),
),
),
));
}
Widget treatmentStepsBar(BuildContext _context, Size screenSize) {
List<String> __treatmentSteps = [
TranslationBase.of(context).diagnosis.toUpperCase(),
TranslationBase.of(context).medications.toUpperCase(),
TranslationBase.of(context).procedures.toUpperCase(),
];
return Container(
height: screenSize.height * 0.070,
decoration:
Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: __treatmentSteps.map((item) {
bool _isActive = __treatmentSteps[_activeTap] == item ? true : false;
return Expanded(
child: InkWell(
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: Helpers.containerBorderDecoration(
_isActive ? HexColor("#B8382B") : Colors.white,
_isActive ? HexColor("#B8382B") : Colors.white),
child: Center(
child: Text(
item,
style: TextStyle(
fontSize: 12,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),
),
)),
),
onTap: () {
print(__treatmentSteps.indexOf(item));
setState(() {
_activeTap = __treatmentSteps.indexOf(item);
});
},
),
);
}).toList(),
),
);
}
Widget getSelectedTreatmentStepItem(BuildContext _context) {
return Container();
}
}

@ -5,6 +5,7 @@ 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/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.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';
@ -12,6 +13,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart';
class UCAFInputScreen extends StatefulWidget {
@override
_UCAFInputScreenState createState() => _UCAFInputScreenState();
@ -58,7 +61,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
body: SingleChildScrollView(
child: Column(
children: [
PatientHeaderWidget(patient),
PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column(
@ -349,7 +352,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
title: TranslationBase.of(context).next,
color: HexColor("#B8382B"),
onPressed: (){
// Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: {'patient': patient});
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, arguments: {'patient': patient});
},
),
],
@ -362,72 +365,3 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
);
}
}
class PatientHeaderWidget extends StatelessWidget {
final PatiantInformtion patient;
PatientHeaderWidget(this.patient);
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
Row(
children: [
AppText(
"VIP",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
SizedBox(
width: 8,
),
AppText(
" ${patient.age}",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
AppText(
"NEW VISIT",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${patient.companyName}",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
),
Icon(
Icons.info_outline,
color: Colors.black,
),
],
),
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
],
);
}
}

@ -27,7 +27,7 @@ class MyReferralPatientScreen extends StatelessWidget {
model.pendingReferral.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
TranslationBase.of(context).referralEmptyMsg,
color: Theme.of(context).errorColor,
),
)

@ -1,4 +1,5 @@
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/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
@ -9,6 +10,7 @@ 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_loader_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';
@ -19,7 +21,7 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../QR_reader_screen.dart';
class PatientMakeReferralScreen extends StatefulWidget {
// previous design page is: MyReferralPatient
// previous design page is: ReferPatientScreen
@override
_PatientMakeReferralScreenState createState() =>
_PatientMakeReferralScreenState();
@ -34,7 +36,6 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
dynamic _selectedDoctor;
DateTime appointmentDate;
final _remarksController = TextEditingController();
PatientArrivalEntity _selectedPatientArrivalEntity;
@override
void initState() {
@ -55,7 +56,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getBranches(),
onModelReady: (model) =>
model.getMasterLookup(MasterKeysService.physiotherapyGoals),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
@ -64,6 +66,14 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
if (model.state == ViewState.BusyLocal)
Container(
color: Colors.white,
width: 50,
height: 50,
child: AppLoaderWidget(
containerColor: Colors.white,
)),
Column(
children: [
PatientPageHeaderWidget(patient),
@ -284,8 +294,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.chooseAppointment,
_selectedPatientArrivalEntity != null
? "${TranslationBase.of(context).appointmentNo} ${_selectedPatientArrivalEntity.appointmentNo}"
appointmentDate != null
? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
@ -326,20 +336,24 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
title: TranslationBase.of(context).refer,
color: HexColor("#B8382B"),
onPressed: () {
if (_selectedPatientArrivalEntity == null ||
if (appointmentDate == null ||
_selectedBranch == null ||
_selectedClinic == null ||
_selectedDoctor == null ||
_remarksController.text == null) return;
model
.makeReferral(
_selectedPatientArrivalEntity,
patient,
appointmentDate.toIso8601String(),
_selectedBranch['ID'],
_selectedClinic['ClinicID'],
_selectedDoctor['DoctorID'],
_remarksController.text)
.then((_) => Navigator.pop(context));
.then((_) {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).referralSuccessMsg);
Navigator.pop(context);
});
},
),
)
@ -362,8 +376,10 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null && picked != appointmentDate) {
appointmentDate = picked;
model
setState(() {
appointmentDate = picked;
});
/* model
.getPatientArrivalList(DateUtils.convertStringToDateFormat(
appointmentDate.toString(), "yyyy-MM-dd"))
.then((_) {
@ -409,7 +425,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
DrAppToastMsg.showErrorToast(
TranslationBase.of(context).noAppointmentsErrorMsg);
}
});
});*/
}
}

@ -19,7 +19,7 @@ class ReferredPatientScreen extends StatelessWidget {
model.listMyReferredPatientModel.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
TranslationBase.of(context).referralEmptyMsg,
color: Theme.of(context).errorColor,
),
)
@ -27,14 +27,14 @@ class ReferredPatientScreen extends StatelessWidget {
child: Container(
child: Column(
children: [
Container(
/*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,

@ -11,6 +11,7 @@ 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';
import 'package:hexcolor/hexcolor.dart';
class PatientVitalSignScreen extends StatelessWidget {
@override
@ -19,10 +20,7 @@ class PatientVitalSignScreen extends StatelessWidget {
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")),
onModelReady: (model) => model.getPatientVitalSign(patient),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).vitalSign,
@ -213,10 +211,12 @@ class PatientVitalSignScreen extends StatelessWidget {
Container(
color: Colors.green,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 2, horizontal: 8),
padding: EdgeInsets.symmetric(
vertical: 2, horizontal: 8),
child: AppText(
"${model.getBMI(model.patientVitalSigns.bodyMassIndex)}",
fontSize: SizeConfig.textMultiplier * 2,
fontSize:
SizeConfig.textMultiplier * 2,
color: Colors.white,
fontWeight: FontWeight.bold,
),
@ -357,7 +357,14 @@ class PatientVitalSignScreen extends StatelessWidget {
),
),
)
: Container(),
: Center(
child: AppText(
"${TranslationBase.of(context).vitalSignEmptyMsg}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: HexColor("#B8382B"),
fontWeight: FontWeight.normal,
),
),
),
);
}
@ -485,7 +492,6 @@ class _TemperatureWidgetState extends State<TemperatureWidget> {
}
class PulseWidget extends StatefulWidget {
final VitalSignData vitalSign;
PulseWidget(this.vitalSign);
@ -496,6 +502,7 @@ class PulseWidget extends StatefulWidget {
class _PulseWidgetState extends State<PulseWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
@ -578,7 +585,6 @@ class _PulseWidgetState extends State<PulseWidget> {
}
class RespirationWidget extends StatefulWidget {
final VitalSignData vitalSign;
RespirationWidget(this.vitalSign);
@ -672,7 +678,6 @@ class _RespirationWidgetState extends State<RespirationWidget> {
}
class BloodPressureWidget extends StatefulWidget {
final VitalSignData vitalSign;
BloodPressureWidget(this.vitalSign);
@ -812,7 +817,6 @@ class _BloodPressureWidgetState extends State<BloodPressureWidget> {
}
class OxygenationWidget extends StatefulWidget {
final VitalSignData vitalSign;
OxygenationWidget(this.vitalSign);
@ -906,7 +910,6 @@ class _OxygenationWidgetState extends State<OxygenationWidget> {
}
class PainScaleWidget extends StatefulWidget {
final VitalSignData vitalSign;
PainScaleWidget(this.vitalSign);
@ -998,8 +1001,3 @@ class _PainScaleWidgetState extends State<PainScaleWidget> {
);
}
}

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
@ -29,303 +30,333 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
TextEditingController doseController = TextEditingController();
final GlobalKey<FormState> formKey = GlobalKey<FormState>();
final double spaceBetweenTextFileds = 12;
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder: (BuildContext bc) {
return DraggableScrollableSheet(
initialChildSize: 0.90,
maxChildSize: 0.90,
minChildSize: 0.9,
builder: (BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: 980,
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: TextFields(
hintText: TranslationBase.of(context)
.searchMedicine,
controller: drugIdController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: spaceBetweenTextFileds,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).orderType,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).strength,
keyboardType: TextInputType.number,
controller: strengthController,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context).route,
controller: routeController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).frequency,
controller: frequencyController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).doseTime,
controller: doseController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).indication,
controller: indicationController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).fromDate,
keyboardType: TextInputType.datetime,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).duration,
// borderColor: Colors.white,
keyboardType: TextInputType.number,
controller: durationController,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).instruction,
controller: indicationController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context)
.addMedication,
onPressed: () {
formKey.currentState.save();
if (formKey.currentState.validate()) {
postProcedure(
model: model,
duration: durationController.text,
dose: doseController.text,
frequency:
frequencyController.text,
route: routeController.text,
drugId: drugIdController.text,
strength: strengthController.text,
indication:
indicationController.text,
instruction:
indicationController.text,
);
Navigator.pop(context);
}
{
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// NewPrescriptionScreen()),
// );
}
return //BaseView<PrescriptionViewModel>(
//onModelReady: (model) => model.getDrugs(),
//builder: (BuildContext context, PrescriptionViewModel model,
//Widget child) =>
DraggableScrollableSheet(
initialChildSize: 0.90,
maxChildSize: 0.90,
minChildSize: 0.9,
builder:
(BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: 980,
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: TextFields(
hintText: TranslationBase.of(context)
.searchMedicine,
controller: drugIdController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: spaceBetweenTextFileds,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.orderType,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.strength,
keyboardType: TextInputType.number,
controller: strengthController,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText:
TranslationBase.of(context).route,
controller: routeController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.frequency,
controller: frequencyController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.doseTime,
controller: doseController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.indication,
controller: indicationController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.fromDate,
keyboardType: TextInputType.datetime,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.duration,
// borderColor: Colors.white,
keyboardType: TextInputType.number,
controller: durationController,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.instruction,
controller: indicationController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
],
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context)
.addMedication,
onPressed: () {
formKey.currentState.save();
if (formKey.currentState
.validate()) {
postProcedure(
model: model,
duration:
durationController.text,
dose: doseController.text,
frequency:
frequencyController.text,
route: routeController.text,
drugId: drugIdController.text,
strength:
strengthController.text,
indication:
indicationController.text,
instruction:
indicationController.text,
);
Navigator.pop(context);
}
{
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// NewPrescriptionScreen()),
// );
}
},
),
],
),
),
],
),
],
),
),
),
],
),
],
),
),
),
),
);
});
);
});
//);
});
}
// openAllergiesList(BuildContext context) {
// showModalBottomSheet(
// backgroundColor: Colors.white,
// isScrollControlled: true,
// context: context,
// builder: (context) {
// return AddAllergies(
// addAllergiesFun: (MySelectedAllergy mySelectedAllergy) {
// setState(() {
// widget.myAllergiesList.add(mySelectedAllergy);
// Navigator.of(context).pop();
// });
// },
// );
// });
// }
postProcedure(
{String duration,
String dose,

@ -420,7 +420,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
}
}
postProcedure({ProcedureViewModel model}) async {
postProcedure({ProcedureViewModel model, String remarks}) async {
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
List<Controls> controls = List();
List<Procedures> controlsProcedure = List();
@ -433,10 +433,10 @@ postProcedure({ProcedureViewModel model}) async {
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI';
controls.add(
Controls(code: 'Remarks', controlValue: 'Testing'),
Controls(code: remarks.isEmpty ? '' : remarks, controlValue: 'sssssssss'),
);
controlsProcedure.add(
Procedures(category: "02", procedure: "02011002", controls: controls));
Procedures(category: "02", procedure: "02011009", controls: controls));
postProcedureReqModel.procedures = controlsProcedure;
await model.postProcedure(postProcedureReqModel);
@ -448,7 +448,8 @@ postProcedure({ProcedureViewModel model}) async {
}
}
updateProcedure({ProcedureViewModel model, String remarks}) async {
updateProcedure(
{ProcedureViewModel model, String remarks, String procedureId}) async {
PostProcedureReqModel updateProcedureReqModel = new PostProcedureReqModel();
List<Controls> controls = List();
List<Procedures> controlsProcedure = List();
@ -500,6 +501,7 @@ class AddSelectedProcedure extends StatefulWidget {
class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
TextEditingController procedureController = TextEditingController();
TextEditingController remarksController = TextEditingController();
List<EntityList> entityList = List();
@override
Widget build(BuildContext context) {
@ -559,6 +561,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
),
TextFields(
hintText: 'Remarks',
controller: remarksController,
minLines: 3,
maxLines: 5,
),
@ -574,7 +577,9 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
title: 'add Selected Procedures'.toUpperCase(),
onPressed: () {
Navigator.pop(context);
postProcedure(model: widget.model);
postProcedure(
model: widget.model,
remarks: remarksController.text);
},
),
],

@ -507,6 +507,8 @@ class TranslationBase {
String get createNew => localizedValues['createNew'][locale.languageCode];
String get episode => localizedValues['episode'][locale.languageCode];
String get medications => localizedValues['medications'][locale.languageCode];
String get procedures => localizedValues['procedures'][locale.languageCode];
String get chiefComplaints =>
localizedValues['chiefComplaints'][locale.languageCode];
@ -532,6 +534,12 @@ class TranslationBase {
localizedValues['selectSeverity'][locale.languageCode];
String get leaveCreated =>
localizedValues['leaveCreated'][locale.languageCode];
String get vitalSignEmptyMsg =>
localizedValues['vitalSignEmptyMsg'][locale.languageCode];
String get referralEmptyMsg =>
localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg =>
localizedValues['referralSuccessMsg'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -0,0 +1,73 @@
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 PatientHeaderWidgetNoAvatar extends StatelessWidget {
final PatiantInformtion patient;
PatientHeaderWidgetNoAvatar(this.patient);
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
Row(
children: [
AppText(
"VIP",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
SizedBox(
width: 8,
),
AppText(
" ${patient.age}",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
AppText(
"NEW VISIT",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${patient.companyName}",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
),
Icon(
Icons.info_outline,
color: Colors.black,
),
],
),
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
],
);
}
}

@ -1,14 +1,13 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'PatientProfileButton.dart';
/*
*@author: Elham Rababah
@ -45,16 +44,15 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'),
Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
key: key,
patient: patient,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: PATIENT_VITAL_SIGN,
icon: 'heartbeat.png'),
),
if(selectedPatientType == 6 || selectedPatientType == 7)
PatientProfileButton(
key: key,
patient: patient,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: PATIENT_VITAL_SIGN,
icon: 'heartbeat.png'),
if(selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
@ -62,13 +60,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// route: PRESCRIPTIONS,
// nameLine1: TranslationBase.of(context).medicines,
// nameLine2: TranslationBase.of(context).prescription,
// icon: 'note.png'),
PatientProfileButton(
key: key,
patient: patient,
@ -76,32 +68,22 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
child: PatientProfileButton(
key: key,
patient: patient,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png')),
Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
if (selectedPatientType != 0 && selectedPatientType != 5)
PatientProfileButton(
key: key,
patient: patient,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'),
if (selectedPatientType == 7)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'heartbeat.png'),
),
// PatientProfileButton(
// key: key,
// patient: patient,
// route: PATIENT_INSURANCE_APPROVALS,
// nameLine1: TranslationBase.of(context).insurance,
// nameLine2: TranslationBase.of(context).approvals,
// icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
@ -116,42 +98,54 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: 'Order Test',
nameLine2: 'Or Procedures',
icon: 'lab.png'),
Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
key: key,
patient: patient,
route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
icon: 'note.png')),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
child: PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ORDERS,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).list,
icon: 'radiology-1.png')),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
child: PatientProfileButton(
key: key,
patient: patient,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png')),
Visibility(
visible: selectedPatientType == 6 || selectedPatientType == 7,
child: PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'lab.png')),
if(selectedPatientType == 7)
PatientProfileButton(
key: key,
patient: patient,
route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase
.of(context)
.myReferral,
nameLine2: TranslationBase
.of(context)
.patient,
icon: 'note.png'),
if(selectedPatientType != 0 && selectedPatientType != 5)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ORDERS,
nameLine1: TranslationBase
.of(context)
.orders,
nameLine2: TranslationBase
.of(context)
.list,
icon: 'radiology-1.png'),
if(selectedPatientType != 0 && selectedPatientType != 5)
PatientProfileButton(
key: key,
patient: patient,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase
.of(context)
.patientSick,
nameLine2: TranslationBase
.of(context)
.leave,
icon: 'sick_leaves_icons.png'),
if( selectedPatientType == 7)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase
.of(context)
.patient,
nameLine2: TranslationBase
.of(context)
.ucaf,
icon: 'lab.png'),
]);
}
}

@ -34,7 +34,7 @@ class StepsWidget extends StatelessWidget {
top: index == 0 ? 15 : 30,
left: 0,
child: InkWell(
//onTap: () => changeCurrentTab(0),
onTap: () => changeCurrentTab(0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -84,7 +84,7 @@ class StepsWidget extends StatelessWidget {
top: index == 1 ? 15 : 30,
left: MediaQuery.of(context).size.width * 0.28,
child: InkWell(
//onTap: () => index >= 1 ? changeCurrentTab(1) : null,
onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -187,7 +187,7 @@ class StepsWidget extends StatelessWidget {
top: index == 3 ? 15 : 30,
right: 0,
child: InkWell(
//onTap: () => index >= 3 ? changeCurrentTab(4) : null,
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -257,7 +257,7 @@ class StepsWidget extends StatelessWidget {
top: index == 0 ? 15 : 30,
right: 0,
child: InkWell(
//onTap: () => changeCurrentTab(0),
onTap: () => changeCurrentTab(0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -307,7 +307,7 @@ class StepsWidget extends StatelessWidget {
top: index == 1 ? 15 : 30,
right: MediaQuery.of(context).size.width * 0.28,
child: InkWell(
//onTap: () => index >= 2 ? changeCurrentTab(1) : null,
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -357,7 +357,7 @@ class StepsWidget extends StatelessWidget {
top: index == 2 ? 15 : 30,
right: MediaQuery.of(context).size.width * 0.52,
child: InkWell(
//onTap: () => index >= 3 ? changeCurrentTab(2) : null,
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -411,7 +411,7 @@ class StepsWidget extends StatelessWidget {
top: index == 3 ? 15 : 30,
left: 0,
child: InkWell(
//onTap: () => index >= 3 ? changeCurrentTab(4) : null,
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -80,10 +80,15 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
Container(
child: Expanded(
child: Texts(projectViewModel.isArabic ? selectedAllergy
.selectedAllergy.nameAr : selectedAllergy
.selectedAllergy.nameEn.toUpperCase(),
child: Texts(
projectViewModel.isArabic
? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn
.toUpperCase(),
variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
color: Colors.black),
),
@ -95,17 +100,21 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
.selectedAllergySeverity.nameEn
.toUpperCase(),
variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
bold: true,
color: AppGlobal.appPrimaryColor),
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
),
onTap: () => removeAllergy(selectedAllergy),
)
],
if(selectedAllergy.isChecked)
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
),
onTap: () => removeAllergy(selectedAllergy),
)
],
),
SizedBox(
height: 10,
@ -119,13 +128,22 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
}
removeAllergy(MySelectedAllergy mySelectedAllergy) {
Iterable<MySelectedAllergy> allergy =
widget.myAllergiesList.where((element) => mySelectedAllergy == element);
List<MySelectedAllergy> allergy =
// ignore: missing_return
widget.myAllergiesList.where((element) =>
mySelectedAllergy.selectedAllergySeverity.id ==
element.selectedAllergySeverity.id &&
mySelectedAllergy.selectedAllergy.id == element.selectedAllergy.id
).toList();
if (allergy.length > 0)
if (allergy.length > 0) {
setState(() {
widget.myAllergiesList.remove(allergy.first);
allergy[0].isChecked = false;
});
}
print(allergy);
}
openAllergiesList(BuildContext context) {
@ -137,14 +155,29 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
return AddAllergies(
addAllergiesFun: (MySelectedAllergy mySelectedAllergy) {
setState(() {
if (!widget.myAllergiesList.contains(mySelectedAllergy)) {
List<MySelectedAllergy> allergy =
// ignore: missing_return
widget.myAllergiesList.where((element) =>
mySelectedAllergy.selectedAllergy.id ==
element.selectedAllergy.id
).toList();
if (allergy.isEmpty) {
widget.myAllergiesList.add(mySelectedAllergy);
Navigator.of(context).pop();
} else {
helpers.showErrorToast(TranslationBase
.of(context)
.itemExist);
allergy.first.selectedAllergy =
mySelectedAllergy.selectedAllergy;
allergy.first.selectedAllergySeverity =
mySelectedAllergy.selectedAllergySeverity;
allergy.first.remark = mySelectedAllergy.remark;
allergy.first.isChecked = mySelectedAllergy.isChecked;
Navigator.of(context).pop();
// helpers.showErrorToast(TranslationBase
// .of(context)
// .itemExist);
}
});
},);
});
@ -353,9 +386,10 @@ class _AddAllergiesState extends State<AddAllergies> {
title: "Add".toUpperCase(),
onPressed: () {
MySelectedAllergy mySelectedAllergy = new MySelectedAllergy(
remark: remarkController.text,
selectedAllergy: _selectedAllergy,
selectedAllergySeverity: _selectedAllergySeverity);
remark: remarkController.text,
selectedAllergy: _selectedAllergy,
isChecked: true,
selectedAllergySeverity: _selectedAllergySeverity,);
widget.addAllergiesFun(mySelectedAllergy);
},
),

@ -131,6 +131,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
widget.myAllergiesList.clear();
widget.myHistoryList.clear();
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
@ -165,9 +169,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
);
MySelectedAllergy mySelectedAllergy = MySelectedAllergy(
selectedAllergy: selectedAllergy,
isChecked: element.isChecked,
selectedAllergySeverity: selectedAllergySeverity);
widget.myAllergiesList.add(mySelectedAllergy);
if (selectedAllergy != null && selectedAllergySeverity != null)
widget.myAllergiesList.add(mySelectedAllergy);
});
}

@ -130,6 +130,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
),
Column(
children: [
if(model.patientAssessmentList.isEmpty)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, top: 15),

@ -115,6 +115,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
),
Column(
children: [
if(model.patientProgressNoteList.isEmpty)
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),

@ -16,11 +16,12 @@ class Texts extends StatefulWidget {
final bool readMore;
final String style;
final bool allowExpand;
final TextDecoration textDecoration;
Texts(this.text, {Key key, this.variant, this.color,
this.bold, this.regular, this.medium, this.allowExpand = true,
this.italic:false, this.textAlign, this.maxLength=60,
this.maxLines, this.readMore=false, this.style
this.maxLines, this.readMore=false, this.style, this.textDecoration
}) : super(key: key);
@override
@ -192,6 +193,7 @@ class _TextsState extends State<Texts> {
fontSize: _getFontSize(),
letterSpacing: widget.variant=="overline" ? 1.5 : null,
fontWeight: _getFontWeight(),
decoration: widget.textDecoration//TextDecoration.lineThrough
)
),
if (widget.readMore && text.length > widget.maxLength && hidden)
@ -228,7 +230,8 @@ class _TextsState extends State<Texts> {
style: _getFontStyle().copyWith(
color: HexColor('#FF0000'),
fontWeight: FontWeight.w800,
fontFamily: "WorkSans"
fontFamily: "WorkSans",
)
),
),

@ -9,9 +9,10 @@ import 'package:progress_hud_v2/progress_hud.dart';
*@desc: AppLoaderWidget to create loader
*/
class AppLoaderWidget extends StatefulWidget {
AppLoaderWidget({Key key, this.title}) : super(key: key);
AppLoaderWidget({Key key, this.title, this.containerColor}) : super(key: key);
final String title;
final Color containerColor;
@override
_AppLoaderWidgetState createState() => new _AppLoaderWidgetState();
@ -30,7 +31,7 @@ class _AppLoaderWidgetState extends State<AppLoaderWidget> {
*@desc: create loader the desing
*/
_progressHUD = new ProgressHUD(
backgroundColor: Colors.black12,
backgroundColor: widget.containerColor == null ? Colors.black12 : widget.containerColor,
color: Colors.black,
// containerColor: Colors.blue,
borderRadius: 5.0,

@ -461,7 +461,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
version: "0.6.2"
json_annotation:
dependency: transitive
description:

Loading…
Cancel
Save