adding missing fields for medication

merge-requests/827/head
hussam al-habibeh 3 years ago
parent c5eac79522
commit 763686fc76

@ -30,6 +30,11 @@ class GetMedicationForInPatientModel {
dynamic strength;
String pHRItemDescription;
String pHRItemDescriptionN;
String doctorName;
String uomDescription;
String routeDescription;
String directionDescription;
String refillDescription;
GetMedicationForInPatientModel(
{this.setupID,
@ -62,11 +67,22 @@ class GetMedicationForInPatientModel {
this.editedOn,
this.strength,
this.pHRItemDescription,
this.pHRItemDescriptionN});
this.pHRItemDescriptionN,
this.doctorName,
this.uomDescription,
this.routeDescription,
this.directionDescription,
this.refillDescription});
GetMedicationForInPatientModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
doctorName = json['DoctorName'];
refillDescription = json['RefillDescription'];
directionDescription = json['DirectionDescription'];
routeDescription = json['RouteDescription'];
uomDescription = json['UOMDescription'];
admissionNo = json['AdmissionNo'];
patientID = json['PatientID'];
orderNo = json['OrderNo'];
@ -101,6 +117,11 @@ class GetMedicationForInPatientModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['DoctorName'] = this.doctorName;
data['RefillDescription'] = this.refillDescription;
data['RouteDescription'] = this.routeDescription;
data['DirectionDescription'] = this.directionDescription;
data['UOMDescription'] = this.uomDescription;
data['ProjectID'] = this.projectID;
data['AdmissionNo'] = this.admissionNo;
data['PatientID'] = this.patientID;

@ -108,7 +108,9 @@ class ProcedureService extends BaseService {
}
Future getProcedure({int mrn, int appointmentNo}) async {
_getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(patientMRN: mrn, appointmentNo: appointmentNo);
_getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(
patientMRN: mrn,
);
hasError = false;
_procedureList.clear();
await baseAppClient.post(GET_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) {

@ -91,7 +91,8 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).direction,
color: Colors.grey,
),
Expanded(child: AppText(" " + prescriptions.directionID.toString() ?? '')),
Expanded(
child: AppText(" " + prescriptions.directionDescription.toString() ?? '')),
],
),
Row(
@ -100,7 +101,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).route,
color: Colors.grey,
),
AppText(" " + prescriptions.routeId.toString() ?? ''),
AppText(" " + prescriptions.routeDescription.toString() ?? ''),
],
),
Row(
@ -109,7 +110,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).refill,
color: Colors.grey,
),
Expanded(child: AppText(" " + prescriptions.refillID.toString() ?? '')),
Expanded(child: AppText(" " + prescriptions.refillDescription.toString() ?? '')),
],
),
Row(
@ -150,7 +151,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
'UOM',
color: Colors.grey,
),
AppText(" " + prescriptions.unitofMeasurement.toString() ?? ''),
AppText(" " + prescriptions.uomDescription.toString() ?? ''),
],
),
Row(
@ -177,18 +178,18 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).processed,
color: Colors.grey,
),
// AppText(" " + prescriptions.editedBy.toString() ?? ''),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).dailyDoses,
color: Colors.grey,
),
AppText(" " + prescriptions.dose.toString() ?? ''),
AppText(" " + prescriptions.doctorName.toString() ?? ''),
],
),
// Row(
// children: [
// AppText(
// TranslationBase.of(context).num,
// color: Colors.grey,
// ),
// AppText(" " + prescriptions.dose.toString() ?? ''),
// ],
// ),
SizedBox(
height: 12,
),

@ -196,7 +196,7 @@ class PrescriptionsPage extends StatelessWidget {
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].prescriptionDatetime,
),
createdBy: model.medicationForInPatient[index].createdBy.toString(),
createdBy: model.medicationForInPatient[index].doctorName.toString(),
));
}),
if (model.medicationForInPatient.length == 0)

Loading…
Cancel
Save