fix add prescription

in_patient_soap
hussam al-habibeh 4 years ago
parent de6936efb8
commit a845f5b48d

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

@ -424,7 +424,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
PrescriptionTextFiled( PrescriptionTextFiled(
width: MediaQuery.of(context).size.width * 0.517, width: MediaQuery.of(context).size.width * 0.517,
element: units, element: model.itemMedicineListUnit.length == 1
? model.itemMedicineListUnit[0]
: units,
elementError: unitError, elementError: unitError,
keyName: 'description', keyName: 'description',
keyId: 'parameterCode', keyId: 'parameterCode',
@ -443,7 +445,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
SizedBox(height: spaceBetweenTextFileds), SizedBox(height: spaceBetweenTextFileds),
PrescriptionTextFiled( PrescriptionTextFiled(
elementList: model.itemMedicineListRoute, elementList: model.itemMedicineListRoute,
element: route, element: model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]
: route,
elementError: routeError, elementError: routeError,
keyId: 'parameterCode', keyId: 'parameterCode',
keyName: 'description', keyName: 'description',
@ -644,11 +648,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
eventCategory: "Add Prescription Form", eventCategory: "Add Prescription Form",
eventAction: "Add Prescription", eventAction: "Add Prescription",
); );
if (route != null && if (duration != null &&
duration != null &&
doseTime != null && doseTime != null &&
frequency != null && frequency != null &&
units != null &&
selectedDate != null && selectedDate != null &&
strengthController.text != "") { strengthController.text != "") {
if (_selectedMedication.isNarcotic == true) { if (_selectedMedication.isNarcotic == true) {

@ -43,10 +43,10 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
list: widget.elementList, list: widget.elementList,
attributeName: '${widget.keyName}', attributeName: '${widget.keyName}',
attributeValueId: '${widget.keyId}', attributeValueId:
widget.elementList.length == 1 ? widget.elementList[0]['${widget.keyId}'] : '${widget.keyId}',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => okFunction: (selectedValue) => widget.okFunction(selectedValue),
widget.okFunction(selectedValue),
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
@ -65,8 +65,7 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
? widget.element['${widget.keyName}'] ? widget.element['${widget.keyName}']
: null, : null,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: validationError: widget.elementList.length != 1 ? widget.elementError : null,
widget.elementList.length != 1 ? widget.elementError : null,
enabled: false, enabled: false,
), ),
), ),

Loading…
Cancel
Save