|
|
|
|
@ -87,13 +87,18 @@ class PatientService extends BaseService {
|
|
|
|
|
ClinicByProjectIdRequest();
|
|
|
|
|
ReferToDoctorRequest _referToDoctorRequest;
|
|
|
|
|
|
|
|
|
|
Future<dynamic> getPatientList( patient, patientType) async {
|
|
|
|
|
Future<dynamic> getPatientList(patient, patientType, {isView}) async {
|
|
|
|
|
hasError = false;
|
|
|
|
|
int val = int.parse(patientType);
|
|
|
|
|
|
|
|
|
|
var url;
|
|
|
|
|
if (isView == false && patientType == '1') {
|
|
|
|
|
url = PRM_SEARCH_PATIENT;
|
|
|
|
|
} else {
|
|
|
|
|
url = GET_PATIENT + SERVICES_PATIANT[val];
|
|
|
|
|
}
|
|
|
|
|
dynamic localRes;
|
|
|
|
|
await baseAppClient.post(
|
|
|
|
|
GET_PATIENT + SERVICES_PATIANT[val],
|
|
|
|
|
url,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
localRes = response;
|
|
|
|
|
},
|
|
|
|
|
@ -101,7 +106,9 @@ class PatientService extends BaseService {
|
|
|
|
|
hasError = true;
|
|
|
|
|
super.error = error;
|
|
|
|
|
},
|
|
|
|
|
body:val ==7?patient: {
|
|
|
|
|
body: val == 7
|
|
|
|
|
? patient
|
|
|
|
|
: {
|
|
|
|
|
"ProjectID": patient.ProjectID,
|
|
|
|
|
"ClinicID": patient.ClinicID,
|
|
|
|
|
"DoctorID": patient.DoctorID,
|
|
|
|
|
|