ipd-changes-for-vida-plus
haroon amjad 2 days ago
parent 9f8482176b
commit aa7f69cfc4

@ -43,7 +43,14 @@ class BaseAppClient {
bool callLog = true;
try {
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);
if(!isCustomRequest) {

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

Loading…
Cancel
Save