show the list of prescription

new_prescreption
Elham Rababh 4 years ago
parent 9461d3d4a1
commit 954402fe52

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL =

@ -1135,4 +1135,5 @@ const Map<String, Map<String, String>> localizedValues = {
"sorryNoMatch": {"en": "Sorry No Match", "ar": "عذرا لا يوجد تطابق"},
"thousandIsTheMAXForTheStrength": {"en": "1000 Is The MAX For The Strength", "ar": "ألف هو القيمة الأعلى"},
"strengthCanNotBeZero": {"en": "Strength Can't Be Zero", "ar": "القوة لا يمكن أن تكون صفر "},
"old": {"en": "Old", "ar":"القديمه"},
};

@ -0,0 +1,145 @@
class PrescriptionEntityModel {
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;
dynamic pharmacistRemarks;
dynamic pharmacyInervention;
dynamic refill;
dynamic mediSpanGPICode;
PrescriptionEntityModel(
{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,
this.pharmacistRemarks,
this.mediSpanGPICode,
this.pharmacyInervention,
this.refill});
PrescriptionEntityModel.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'];
pharmacistRemarks = json['pharmacistRemarks'];
mediSpanGPICode = json['mediSpanGPICode'];
refill = json['refill'];
pharmacyInervention = json['interventionID'];
}
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;
data['pharmacistRemarks'] = this.pharmacistRemarks;
data['mediSpanGPICode'] = this.mediSpanGPICode;
data['refill'] = this.refill;
data['interventionID'] = this.pharmacyInervention;
return data;
}
}

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
class PrescriptionModel {
List<EntityList> entityList;
List<PrescriptionEntityModel> entityList;
dynamic rowcount;
dynamic statusMessage;
@ -7,9 +9,9 @@ class PrescriptionModel {
PrescriptionModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) {
entityList = new List<EntityList>();
entityList = new List<PrescriptionEntityModel>();
json['entityList'].forEach((v) {
entityList.add(new EntityList.fromJson(v));
entityList.add(new PrescriptionEntityModel.fromJson(v));
});
}
rowcount = json['rowcount'];
@ -26,149 +28,3 @@ class PrescriptionModel {
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;
dynamic pharmacistRemarks;
dynamic pharmacyInervention;
dynamic refill;
dynamic mediSpanGPICode;
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,
this.pharmacistRemarks,
this.mediSpanGPICode,
this.pharmacyInervention,
this.refill});
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'];
pharmacistRemarks = json['pharmacistRemarks'];
mediSpanGPICode = json['mediSpanGPICode'];
refill = json['refill'];
pharmacyInervention = json['interventionID'];
}
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;
data['pharmacistRemarks'] = this.pharmacistRemarks;
data['mediSpanGPICode'] = this.mediSpanGPICode;
data['refill'] = this.refill;
data['interventionID'] = this.pharmacyInervention;
return data;
}
}

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_i
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
@ -31,6 +32,11 @@ class PrescriptionService extends LookupService {
List<PrescriptionModel> _prescriptionList = List();
List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<PrescriptionEntityModel> _prescriptionListNew = List();
List<PrescriptionEntityModel> get prescriptionListNew => _prescriptionListNew;
List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList;
@ -99,10 +105,16 @@ class PrescriptionService extends LookupService {
);
hasError = false;
_prescriptionList.clear();
_prescriptionListNew.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) {
_prescriptionList
.add(PrescriptionModel.fromJson(response['PrescriptionList']));
if(response['PrescriptionList']!=null){
response['PrescriptionList']["entityList"].forEach((prescriptions) {
_prescriptionListNew.add(PrescriptionEntityModel.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
@ -29,6 +30,8 @@ class PrescriptionViewModel extends BaseViewModel {
List<PrescriptionModel> get prescriptionList =>
_prescriptionService.prescriptionList;
List<PrescriptionEntityModel> get prescriptionListNew =>
_prescriptionService.prescriptionListNew;
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionService.prescriptionReportList;

@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/live_care/live-care_transfer_to_admin.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart';
import 'package:doctor_app_flutter/util/VideoChannel.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_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/model/Prescriptions/prescription_entity_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
@ -339,7 +340,7 @@ class DiagnosisWidget extends StatelessWidget {
class MedicationWidget extends StatelessWidget {
final UcafViewModel model;
final EntityList prescription;
final PrescriptionEntityModel prescription;
MedicationWidget(this.model, this.prescription);

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
@ -60,13 +60,13 @@ class ProfileGridForInPatient extends StatelessWidget {
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription +"Elham",
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW_By_Elham,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
@ -58,13 +58,13 @@ class ProfileGridForOther extends StatelessWidget {
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription +"Elham",
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW_By_Elham,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
@ -55,13 +55,13 @@ class ProfileGridForSearch extends StatelessWidget {
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription +"Elham",
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW_By_Elham,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -11,8 +12,10 @@ import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
@ -26,188 +29,152 @@ class NewPrescriptionsPage extends StatelessWidget {
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
bool isFromLiveCare = routeArgs['isFromLiveCare'];
return BaseView<PrescriptionViewModel>(
onModelReady: (model) async {
model.getPrescriptionListNew(
mrn: patient.patientMRN, appNo: patient.appointmentNo);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ServiceTitle(
title: TranslationBase.of(context).orders,
subTitle:
TranslationBase.of(context).prescriptions,
),
],
),
),
if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
SlideUpPageRoute(
widget: BaseAddProcedureTabPage(
patient: patient,
prescriptionModel: model,
procedureType:
ProcedureType.PRESCRIPTION,
),
settingRoute: 'AddProcedureTabPage'),
);
},
label: TranslationBase.of(context)
.applyForNewPrescriptionsOrder,
),
ListView.builder(
physics: BouncingScrollPhysics(),
itemCount: model.prescriptionsList.length,
shrinkWrap: true,
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions: model
.prescriptionsList[index],
patient: patient,
arrivalType: arrivalType,
),
),
),
child: Column(
children: [
DoctorCard(
doctorName:
Helpers.convertToTitleCase(model
.prescriptionsList[index]
.doctorName),
profileUrl: model
.prescriptionsList[index]
.doctorImageURL,
branch: model
.prescriptionsList[index].name,
clinic: model.prescriptionsList[index]
.clinicDescription,
isPrescriptions: true,
appointmentDate: AppDateUtils
.getDateTimeFromServerFormat(
model.prescriptionsList[index]
.appointmentDate,
),
),
],
));
}),
if (model.prescriptionsList.isEmpty &&
patient.patientStatusType != 43)
Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.noPrescriptionsFound,
))
],
),
onModelReady: (model) async {
model.getPrescriptionListNew(
mrn: patient.patientMRN, appNo: patient.appointmentNo);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: FractionallySizedBox(
widthFactor: 1.0,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ServiceTitle(
title: TranslationBase.of(context).orders,
subTitle: TranslationBase.of(context).prescriptions,
),
],
),
),
if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
SlideUpPageRoute(
widget: BaseAddProcedureTabPage(
patient: patient,
prescriptionModel: model,
procedureType: ProcedureType.PRESCRIPTION,
),
settingRoute: 'AddProcedureTabPage'),
);
},
label: TranslationBase.of(context)
.applyForNewPrescriptionsOrder,
),
)
: NetworkBaseView(
baseViewModel: model,
Center(
child: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
model.medicationForInPatient.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.noPrescriptionsFound,
))
: ListView.builder(
scrollDirection: Axis.vertical,
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount:
model.medicationForInPatient.length,
itemBuilder: (context, index) {
//model.medicationForInPatient.length,
return InkWell(
child: InPatientDoctorCard(
doctorName: Helpers.convertToTitleCase(
model.medicationForInPatient[index]
.pHRItemDescription),
profileUrl: 'sss',
branch: 'hamza',
clinic: 'basheer',
isPrescriptions: true,
appointmentDate: AppDateUtils
.getDateTimeFromServerFormat(
model.medicationForInPatient[index]
.prescriptionDatetime,
),
createdBy: Helpers.convertToTitleCase(
model.medicationForInPatient[index]
.doctorName
.toString()),
),
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsInPatientPage(
prescriptionIndex: index,
prescriptions: model
.medicationForInPatient[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
startOn: AppDateUtils
.getDateTimeFromServerFormat(
model
.medicationForInPatient[index]
.startDatetime,
),
stopOn: AppDateUtils
.getDateTimeFromServerFormat(
model
.medicationForInPatient[index]
.stopDatetime,
),
),
),
),
);
}),
],
),
widthFactor: 0.92,
child: ListView.builder(
physics: BouncingScrollPhysics(),
itemCount: model.prescriptionListNew.length,
shrinkWrap: true,
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
child: CardWithBgWidget(
bgColor: Colors.transparent,
widget: Column(
children: [
CustomRow(
label: "",
value: Helpers.convertToTitleCase(model
.prescriptionListNew[index]
.medicationName),
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
),
SizedBox(
height: 10,
),
CustomRow(
label: "Doctor Name :",
value: model
.prescriptionListNew[index].doctorName,
),
CustomRow(
label: "Order Type Description :",
value: model.prescriptionListNew[index]
.orderTypeDescription,
),
CustomRow(
label: "status :",
value:
model.prescriptionListNew[index].status,
),
CustomRow(
label: "indication :",
value: model
.prescriptionListNew[index].indication,
),
CustomRow(
label: "doseDetail :",
value: model
.prescriptionListNew[index].doseDetail,
),
CustomRow(
label: "quantity :",
value: model
.prescriptionListNew[index].quantity
.toString(),
),CustomRow(
label: "start Date :",
value: model
.prescriptionListNew[index].startDate
.toString(),
),CustomRow(
label: "stop Date :",
value: model
.prescriptionListNew[index].stopDate
.toString(),
),
if(model
.prescriptionListNew[index].remarks != null&& model
.prescriptionListNew[index].remarks!= "")
CustomRow(
label: "Remark :",
value: model
.prescriptionListNew[index].remarks
.toString(),
),
],
),
));
}),
),
)));
),
if (model.prescriptionListNew.isEmpty &&
patient.patientStatusType != 43)
Center(
child: ErrorMessage(
error: TranslationBase.of(context).noPrescriptionsFound,
))
],
),
),
)),
);
}
}

@ -1709,6 +1709,7 @@ class TranslationBase {
String get thousandIsTheMAXForTheStrength => localizedValues['thousandIsTheMAXForTheStrength'][locale.languageCode];
String get strengthCanNotBeZero => localizedValues['strengthCanNotBeZero'][locale.languageCode];
String get old => localizedValues['old'][locale.languageCode];
}

@ -77,7 +77,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
nameLine2:TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
icon: 'assets/images/svgs/profile_screen/order prescription.svg'),
PatientProfileButton(
key: key,
@ -86,7 +86,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW_By_Elham,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription +"Elham",
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg'),
PatientProfileButton(
key: key,

Loading…
Cancel
Save