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_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 = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

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

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

Loading…
Cancel
Save