ipd-changes-for-vida-plus
haroon amjad 3 weeks ago
parent 9f8482176b
commit aa7f69cfc4

@ -43,7 +43,14 @@ class BaseAppClient {
bool callLog = true; bool callLog = true;
try { try {
Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE); Map<String, dynamic>? profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (body?['MemberID'] == null) body?['MemberID'] = HospitalsService.memberId; // changed from null; because create update episode not working
if (profile != null) {
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (body?['MemberID'] == null)
body?['MemberID'] = HospitalsService.memberId.isNotEmpty ? HospitalsService.memberId : doctorProfile.doctorID; // changed from null; because create update episode not working
}
// if (body?['MemberID'] == null) body?['MemberID'] = HospitalsService.memberId; // changed from null; because create update episode not working
String? token = await sharedPref.getString(TOKEN); String? token = await sharedPref.getString(TOKEN);
if(!isCustomRequest) { if(!isCustomRequest) {

@ -65,6 +65,7 @@ class PatientSearchViewModel extends BaseViewModel {
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
patientSearchRequestModel.loginDoctorID = doctorProfile!.doctorID; patientSearchRequestModel.loginDoctorID = doctorProfile!.doctorID;
patientSearchRequestModel.doctorID = doctorProfile!.doctorID; patientSearchRequestModel.doctorID = doctorProfile!.doctorID;
patientSearchRequestModel.clinicID = doctorProfile!.clinicID; // Added clinic filter to avoid fetching all based on DoctorIDh
await _outPatientService.getOutPatient(patientSearchRequestModel); await _outPatientService.getOutPatient(patientSearchRequestModel);
if (_outPatientService.hasError) { if (_outPatientService.hasError) {
error = _outPatientService.error; error = _outPatientService.error;

Loading…
Cancel
Save