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 DOCTOR_ROTATION = 'https://doctorrota.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/';
@ -19,7 +19,7 @@ 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/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_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID";

@ -87,12 +87,10 @@ class PatientMedicalReportService extends BaseService {
? body['SetupID']
: SETUP_ID
: SETUP_ID;
body['AdmissionNo'] = int.parse(patient.admissionNo!);
body['MedicalReportHTML'] = htmlText;
if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile?.projectID;
}
if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID;
body['AdmissionNo'] = int.parse(patient.admissionNo!);
body['MedicalReportHTML'] = htmlText;
body['ProjectID'] = patient.projectId;
body['DoctorID'] = patient.doctorId;
await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
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 = {
"Prescription": {
"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,
"objAllergies": getAllergiesObj(allergy),
"objDiagnosis": getDiagnosisObj(lstAssessments),

@ -11,7 +11,7 @@ import '../../locator.dart';
class VitalSignsViewModel extends BaseViewModel {
VitalSignsService _vitalSignService = locator<VitalSignsService>();
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns!;
VitalSignData? get patientVitalSigns => _vitalSignService.patientVitalSigns;
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 {
hasError = false;
// setState(ViewState.BusyLocal);

@ -74,7 +74,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
(index) => InkWell(
onTap: () {
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(
width: double.maxFinite,

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

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

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

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

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

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

@ -24,25 +24,25 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
@override
Widget build(BuildContext context) {
return Container(
width: widget.width ?? null,
width: widget.width,
child: InkWell(
onTap: widget.elementList != null
? () {
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;
},
);
// 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;
// },
// );
}
: null,
child: AppTextFieldCustom(
@ -53,9 +53,25 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
? widget.element['${widget.keyName}']
: null,
isTextFieldHasSuffix: true,
validationError: widget.elementList!.length != 1 ? widget.elementError! : "",
validationError: widget.elementList!.length != 1 || widget.elementList!.length!=2 ? widget.elementError : "",
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) {},
onFieldSubmitted: () {},
),

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

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

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