bug fixes for latest version

flutter_3.16.0_zoom
Sultan khan 2 years ago
parent d2c26df4d0
commit dd396e50f2

@ -7,7 +7,7 @@ const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://livecareuat.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/';
@ -19,7 +19,7 @@ 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/DoctorApplicathttps://uat.hmgwebservices.com/Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorAppion.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor"; const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID";

@ -87,12 +87,10 @@ class PatientMedicalReportService extends BaseService {
? body['SetupID'] ? body['SetupID']
: SETUP_ID : SETUP_ID
: SETUP_ID; : SETUP_ID;
body['AdmissionNo'] = int.parse(patient.admissionNo!); body['AdmissionNo'] = int.parse(patient.admissionNo!);
body['MedicalReportHTML'] = htmlText; body['MedicalReportHTML'] = htmlText;
if (body['ProjectID'] == null) { body['ProjectID'] = patient.projectId;
body['ProjectID'] = doctorProfile?.projectID; body['DoctorID'] = patient.doctorId;
}
if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID;
await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -169,11 +169,11 @@ class PrescriptionService extends LookupService {
); );
} }
Future getDrugToDrug(VitalSignData vital, List<GetAssessmentResModel> lstAssessments, List<GetAllergiesResModel> allergy, PatiantInformtion patient, List<dynamic> prescription) async { Future getDrugToDrug(VitalSignData? vital, List<GetAssessmentResModel> lstAssessments, List<GetAllergiesResModel> allergy, PatiantInformtion patient, List<dynamic> prescription) async {
Map<String, dynamic> request = { Map<String, dynamic> request = {
"Prescription": { "Prescription": {
"objPatientInfo": {"Gender": patient.gender == 1 ? 'Male' : 'Female', "Age": AppDateUtils.convertDateFromServerFormat(patient.dateofBirth!, 'dd/MM/yyyy')}, "objPatientInfo": {"Gender": patient.gender == 1 ? 'Male' : 'Female', "Age": AppDateUtils.convertDateFromServerFormat(patient.dateofBirth!, 'dd/MM/yyyy')},
"objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg}, "objVitalSign": {"Height": vital?.heightCm ?? "", "Weight": vital?.weightKg ?? ""},
"objPrescriptionItems": prescription, "objPrescriptionItems": prescription,
"objAllergies": getAllergiesObj(allergy), "objAllergies": getAllergiesObj(allergy),
"objDiagnosis": getDiagnosisObj(lstAssessments), "objDiagnosis": getDiagnosisObj(lstAssessments),

@ -11,7 +11,7 @@ import '../../locator.dart';
class VitalSignsViewModel extends BaseViewModel { class VitalSignsViewModel extends BaseViewModel {
VitalSignsService _vitalSignService = locator<VitalSignsService>(); VitalSignsService _vitalSignService = locator<VitalSignsService>();
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns!; VitalSignData? get patientVitalSigns => _vitalSignService.patientVitalSigns;
List<VitalSignHistory> get patientVitalSignsHistory => _vitalSignService.patientVitalSignsHistory; List<VitalSignHistory> get patientVitalSignsHistory => _vitalSignService.patientVitalSignsHistory;

@ -80,7 +80,7 @@ class PrescriptionViewModel extends BaseViewModel {
} }
} }
Future getDrugToDrug(VitalSignData vital, List<GetAssessmentResModel> lstAssessments, List<GetAllergiesResModel> allergy, PatiantInformtion patient, List<dynamic> prescription, Future getDrugToDrug(VitalSignData? vital, List<GetAssessmentResModel> lstAssessments, List<GetAllergiesResModel> allergy, PatiantInformtion patient, List<dynamic> prescription,
{bool isLocalBusy = false}) async { {bool isLocalBusy = false}) async {
hasError = false; hasError = false;
// setState(ViewState.BusyLocal); // setState(ViewState.BusyLocal);

@ -74,7 +74,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
(index) => InkWell( (index) => InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed(PATIENTS_PROFILE, Navigator.of(context).pushNamed(PATIENTS_PROFILE,
arguments: {"patient": model.filterData[index], "patientType": "1", "isSearch": false, "isInpatient": true, "isDischargedPatient": true}); arguments: {"patient": model.filterData[index], "patientType": "1", "arrivalType":"1", "isSearch": false, "isInpatient": true, "isDischargedPatient": true});
}, },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,

@ -212,8 +212,8 @@ class ProfileGridForInPatient extends StatelessWidget {
patient: patient!, patient: patient!,
patientType: patientType!, patientType: patientType!,
arrivalType: arrivalType!, arrivalType: arrivalType!,
from: from!, from: from ??"",
to: to!, to: to ??"",
nameLine1: item.nameLine1, nameLine1: item.nameLine1,
nameLine2: item.nameLine2, nameLine2: item.nameLine2,
route: item.route, route: item.route,

@ -100,7 +100,7 @@ class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
isReferralClinic: true, isReferralClinic: true,
referralClinic: "${model.myReferralPatients[index].referringClinicDescription}", referralClinic: "${model.myReferralPatients[index].referringClinicDescription}",
remark: model.myReferralPatients[index].referringDoctorRemarks!, remark: model.myReferralPatients[index].referringDoctorRemarks!,
nationality: model.myReferralPatients[index].nationalityName!, nationality: model.myReferralPatients[index].nationalityName ?? model.myReferralPatients[index].nationalityID ,
nationalityFlag: model.myReferralPatients[index].nationalityFlagURL!, nationalityFlag: model.myReferralPatients[index].nationalityFlagURL!,
doctorAvatar: model.myReferralPatients[index].doctorImageURL!, doctorAvatar: model.myReferralPatients[index].doctorImageURL!,
referralDoctorName: model.myReferralPatients[index].referringDoctorName!, referralDoctorName: model.myReferralPatients[index].referringDoctorName!,

@ -305,7 +305,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
MasterKeyDailog dialog = MasterKeyDailog( MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisType!, list: model.listOfDiagnosisType!,
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
selectedValue: widget.mySelectedAssessment.selectedDiagnosisType!, selectedValue: widget.mySelectedAssessment.selectedDiagnosisType !=null ? widget.mySelectedAssessment.selectedDiagnosisType : null,
okFunction: (MasterKeyModel selectedValue) { okFunction: (MasterKeyModel selectedValue) {
setState(() { setState(() {
widget.mySelectedAssessment.selectedDiagnosisType = selectedValue; widget.mySelectedAssessment.selectedDiagnosisType = selectedValue;
@ -325,7 +325,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
hintText: TranslationBase.of(context).dType, hintText: TranslationBase.of(context).dType,
maxLines: 1, maxLines: 1,
minLines: 1, minLines: 1,
enabled: false, enabled: true,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
controller: typeController, controller: typeController,
hasBorder: true, hasBorder: true,

@ -65,9 +65,9 @@ class _AddAllergiesState extends State<AddAllergies> {
model: model, model: model,
masterList: model.allergiesList, masterList: model.allergiesList,
removeAllergy: (master) { removeAllergy: (master) {
setState(() { // setState(() {
removeAllergyFromLocalList(master); // removeAllergyFromLocalList(master);
}); // });
}, },
addAllergy: (MySelectedAllergy mySelectedAllergy) { addAllergy: (MySelectedAllergy mySelectedAllergy) {
addAllergyLocally(mySelectedAllergy); addAllergyLocally(mySelectedAllergy);

@ -73,8 +73,13 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState extends State<MasterKeyCheckb
// filterSearchResults(value); // filterSearchResults(value);
}, },
onFieldSubmitted: () { onFieldSubmitted: () {
widget.model.getMasterLookup(MasterKeysService.Allergies, searchKey: filteredSearchController.text);
widget.model.getMasterLookup(MasterKeysService.AllergySeverity, searchKey: ""); // widget.model.getMasterLookup(
// MasterKeysService.Allergies,
// searchKey: filteredSearchController.text);
// widget.model.getMasterLookup(
// MasterKeysService.AllergySeverity,
// searchKey: "");
}, },
// onFieldSubmitted: (value) { // onFieldSubmitted: (value) {
// widget.model.getMasterLookup(MasterKeysService.Allergies!, searchKey: filteredSearchController.text!); // widget.model.getMasterLookup(MasterKeysService.Allergies!, searchKey: filteredSearchController.text!);
@ -86,6 +91,7 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState extends State<MasterKeyCheckb
color: Colors.black, color: Colors.black,
), ),
onPressed: () { onPressed: () {
widget.model.getMasterLookup(MasterKeysService.Allergies, searchKey: filteredSearchController.text); widget.model.getMasterLookup(MasterKeysService.Allergies, searchKey: filteredSearchController.text);
widget.model.getMasterLookup(MasterKeysService.AllergySeverity, searchKey: ""); widget.model.getMasterLookup(MasterKeysService.AllergySeverity, searchKey: "");
}, },

@ -28,7 +28,9 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
changeAllState() { changeAllState() {
setState(() {}); setState(() {
print(widget.myAllergiesList);
});
} }
return Column( return Column(
@ -72,7 +74,7 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
// fontHeight:0.18 , // fontHeight:0.18 ,
), ),
AppText( AppText(
projectViewModel.isArabic ? selectedAllergy.selectedAllergySeverity!.nameAr! : selectedAllergy.selectedAllergySeverity!.nameEn!.toUpperCase(), projectViewModel.isArabic ? selectedAllergy.selectedAllergySeverity!.nameAr! : selectedAllergy.selectedAllergySeverity!.nameEn ?? ""!.toUpperCase(),
textDecoration: selectedAllergy.isChecked! ? TextDecoration.none : TextDecoration.lineThrough, textDecoration: selectedAllergy.isChecked! ? TextDecoration.none : TextDecoration.lineThrough,
color: Color(0xFFCC9B14), color: Color(0xFFCC9B14),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
@ -94,7 +96,7 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
child: Row( child: Row(
children: [ children: [
RemarkText( RemarkText(
remark: selectedAllergy.remark!, remark: selectedAllergy.remark ?? "",
), ),
], ],
), ),
@ -151,12 +153,12 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
}); });
if (isAllDataFilled) { if (isAllDataFilled) {
mySelectedAllergy.forEach((element) { mySelectedAllergy.forEach((element) {
if (( if (
widget.myAllergiesList!.singleWhere( widget.myAllergiesList!.singleWhere(
(it) => it.selectedAllergy!.id == element.selectedAllergy!.id, (it) => it.selectedAllergy!.id == element.selectedAllergy!.id,
orElse: () => MySelectedAllergy(), orElse: () => MySelectedAllergy(),
), ).selectedAllergySeverity
) == ==
null) { null) {
widget.myAllergiesList!.add(element); widget.myAllergiesList!.add(element);
} }
@ -165,12 +167,12 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
/// remove items. /// remove items.
List<MySelectedAllergy> removedList = []; List<MySelectedAllergy> removedList = [];
widget.myAllergiesList!.forEach((element) { widget.myAllergiesList!.forEach((element) {
if (( if (
mySelectedAllergy.singleWhere( mySelectedAllergy.singleWhere(
(it) => it.selectedAllergy!.id == element.selectedAllergy!.id, (it) => it.selectedAllergy!.id == element.selectedAllergy!.id,
orElse: () => MySelectedAllergy(), orElse: () => MySelectedAllergy(),
), )
) == .selectedAllergySeverity ==
null) { null) {
removedList.add(element); removedList.add(element);
} }
@ -180,6 +182,7 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
removeAllergy(element); removeAllergy(element);
}); });
changeParentState(); changeParentState();
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
Utils.showErrorToast(TranslationBase.of(context).requiredMsg); Utils.showErrorToast(TranslationBase.of(context).requiredMsg);

@ -24,25 +24,25 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: widget.width ?? null, width: widget.width,
child: InkWell( child: InkWell(
onTap: widget.elementList != null onTap: widget.elementList != null
? () { ? () {
Utils.hideKeyboard(context); // Utils.hideKeyboard(context);
ListSelectDialog dialog = ListSelectDialog( // ListSelectDialog dialog = ListSelectDialog(
list: widget.elementList!, // list: widget.elementList!,
attributeName: '${widget.keyName}', // attributeName: '${widget.keyName}',
attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}', // attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}',
okText: TranslationBase.of(context).ok, // okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => widget.okFunction!(selectedValue), // okFunction: (selectedValue) => widget.okFunction!(selectedValue),
); // );
showDialog( // showDialog(
barrierDismissible: false, // barrierDismissible: false,
context: context, // context: context,
builder: (BuildContext context) { // builder: (BuildContext context) {
return dialog; // return dialog;
}, // },
); // );
} }
: null, : null,
child: AppTextFieldCustom( child: AppTextFieldCustom(
@ -53,9 +53,25 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
? widget.element['${widget.keyName}'] ? widget.element['${widget.keyName}']
: null, : null,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: widget.elementList!.length != 1 ? widget.elementError! : "", validationError: widget.elementList!.length != 1 || widget.elementList!.length!=2 ? widget.elementError : "",
enabled: false, enabled: false,
onClick: () {}, onClick: () {
Utils.hideKeyboard(context);
ListSelectDialog dialog = ListSelectDialog(
list: widget.elementList!,
attributeName: '${widget.keyName}',
attributeValueId: widget.elementList!.length == 1 ? widget.elementList![0]['${widget.keyId}'].toString() : '${widget.keyId}',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => widget.okFunction!(selectedValue),
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
},
onChanged: (value) {}, onChanged: (value) {},
onFieldSubmitted: () {}, onFieldSubmitted: () {},
), ),

@ -110,7 +110,7 @@ class _EntityListCheckboxSearchFavProceduresWidgetState extends State<EntityList
removeFavProcedure: widget.removeFavProcedure!, removeFavProcedure: widget.removeFavProcedure!,
addFavProcedure: widget.addFavProcedure!, addFavProcedure: widget.addFavProcedure!,
selectProcedures: widget.selectProcedures!, selectProcedures: widget.selectProcedures!,
isEntityListSelected: widget.isEntityListSelected!, isEntityListSelected: widget.isEntityListSelected,
isEntityFavListSelected: widget.isEntityFavListSelected!, isEntityFavListSelected: widget.isEntityFavListSelected!,
isProcedure: widget.isProcedure, isProcedure: widget.isProcedure,
groupProcedures: widget.groupProcedures!); groupProcedures: widget.groupProcedures!);

@ -84,7 +84,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
@override @override
void dispose() { void dispose() {
_focusNode.dispose(); // _focusNode.dispose();
super.dispose(); super.dispose();
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save