Merge branch 'app_translation' into 'development'

App translation

See merge request Cloud_Solution/doctor_app_flutter!653
merge-requests/654/merge
Mohammad Aljammal 5 years ago
commit 349226861a

@ -1,29 +0,0 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientMuseService extends BaseService {
List<PatientMuseResultsModel> patientMuseResultsModelList = List();
getECGPatient({int patientType, int patientOutSA,int patientID}) async {
Map<String,dynamic> body = Map();
body['PatientType'] = patientType==7 ? 1: patientType;
body['PatientOutSA'] = patientOutSA;
body['PatientID'] = patientID;
hasError = false;
await baseAppClient.post(
GET_ECG,
onSuccess: (dynamic response, int statusCode) {
patientMuseResultsModelList.clear();
response['HIS_GetPatientMuseResultsList'].forEach((v) {
patientMuseResultsModelList.add(PatientMuseResultsModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body
);
}
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/model/auth/imei_details.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/user_model.dart';

@ -1,14 +1,14 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/model/referral/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class DischargedPatientService extends BaseService {
List<PatiantInformtion> myDischargedPatients = List();
List<DischargeReferralPatient> myDischargeReferralPatients = List();
Future getDischargedPatient() async {
Future getDischargedPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile(isGetProfile: true);
@ -63,14 +63,14 @@ class DischargedPatientService extends BaseService {
myDischargeReferralPatients.clear();
await baseAppClient.post(GET_MY_DISCHARGE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargeReferralPatient'] != null) {
response['List_MyDischargeReferralPatient'].forEach((v) {
myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
if (response['List_MyDischargeReferralPatient'] != null) {
response['List_MyDischargeReferralPatient'].forEach((v) {
myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart';
@ -42,23 +42,25 @@ class MyReferralInPatientService extends BaseService {
);
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async {
Future replay(
String referredDoctorRemarks, MyReferralPatientModel referral) async {
hasError = false;
await getDoctorProfile();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks =
RequestAddReferredDoctorRemarks();
_requestAddReferredDoctorRemarks.projectID = referral.projectID;
_requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.admissionNo =
referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.patientID = referral.patientID;
_requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor;
await baseAppClient.post(
ADD_REFERRED_DOCTOR_REMARKS,
body: _requestAddReferredDoctorRemarks.toJson(),
onSuccess: (dynamic body, int statusCode) {
},
onSuccess: (dynamic body, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -0,0 +1,25 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientMuseService extends BaseService {
List<PatientMuseResultsModel> patientMuseResultsModelList = List();
getECGPatient({int patientType, int patientOutSA, int patientID}) async {
Map<String, dynamic> body = Map();
body['PatientType'] = patientType == 7 ? 1 : patientType;
body['PatientOutSA'] = patientOutSA;
body['PatientID'] = patientID;
hasError = false;
await baseAppClient.post(GET_ECG,
onSuccess: (dynamic response, int statusCode) {
patientMuseResultsModelList.clear();
response['HIS_GetPatientMuseResultsList'].forEach((v) {
patientMuseResultsModelList.add(PatientMuseResultsModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -1,9 +1,8 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/ReferralRequest.dart';
import 'package:doctor_app_flutter/core/model/referral/ReferralRequest.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class ReferralService extends BaseService {
Future referralPatient(
{int admissionNo,
String roomID,

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -7,8 +7,8 @@ class OutPatientService extends BaseService {
List<PatiantInformtion> _patientList = [];
List<PatiantInformtion> get patientList => _patientList;
Future getOutPatient(PatientSearchRequestModel patientSearchRequestModel) async {
Future getOutPatient(
PatientSearchRequestModel patientSearchRequestModel) async {
hasError = false;
await baseAppClient.post(
GET_MY_OUT_PATIENT,
@ -25,7 +25,9 @@ class OutPatientService extends BaseService {
body: patientSearchRequestModel.toJson(),
);
}
Future getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel) async {
Future getPatientFileInformation(
PatientSearchRequestModel patientSearchRequestModel) async {
hasError = false;
await baseAppClient.post(
PRM_SEARCH_PATIENT,

@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patien
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
import 'base/lookup-service.dart';
import '../base/lookup-service.dart';
class PatientReferralService extends LookupService {
List<dynamic> projectsList = [];
@ -56,7 +56,8 @@ class PatientReferralService extends LookupService {
Map<String, dynamic> body = Map();
body['isSameBranch'] = false;
await baseAppClient.post(GET_REFERRAL_FACILITIES, onSuccess: (response, statusCode) async {
await baseAppClient.post(GET_REFERRAL_FACILITIES,
onSuccess: (response, statusCode) async {
projectsList = response['ProjectInfo'];
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -102,7 +103,8 @@ class PatientReferralService extends LookupService {
);
}
Future getDoctorsList(PatiantInformtion patient ,int clinicId, int branchId) async {
Future getDoctorsList(
PatiantInformtion patient, int clinicId, int branchId) async {
hasError = false;
DoctorsByClinicIdRequest _doctorsByClinicIdRequest =
DoctorsByClinicIdRequest();
@ -112,22 +114,16 @@ class PatientReferralService extends LookupService {
_doctorsByClinicIdRequest.patientID = patient.patientId;
_doctorsByClinicIdRequest.gender = patient.gender;
await baseAppClient.postPatient(
PATIENT_GET_DOCTOR_BY_CLINIC_Hospital,
onSuccess: (dynamic response, int statusCode) {
doctorsList.clear();
response['DoctorList'].forEach((v) {
doctorsList.add(ClinicDoctor.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: _doctorsByClinicIdRequest.toJson(),
patient: patient
);
await baseAppClient.postPatient(PATIENT_GET_DOCTOR_BY_CLINIC_Hospital,
onSuccess: (dynamic response, int statusCode) {
doctorsList.clear();
response['DoctorList'].forEach((v) {
doctorsList.add(ClinicDoctor.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _doctorsByClinicIdRequest.toJson(), patient: patient);
}
Future getMyReferredPatient() async {
@ -215,7 +211,8 @@ class PatientReferralService extends LookupService {
);
}
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
Future responseReferral(
PendingReferral pendingReferral, bool isAccepted) async {
hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile();
@ -242,13 +239,8 @@ class PatientReferralService extends LookupService {
);
}
Future makeReferral(
PatiantInformtion patient,
String isoStringDate,
int projectID,
int clinicID,
int doctorID,
String remarks) async {
Future makeReferral(PatiantInformtion patient, String isoStringDate,
int projectID, int clinicID, int doctorID, String remarks) async {
hasError = false;
Map<String, dynamic> body = Map();
@ -304,8 +296,8 @@ class PatientReferralService extends LookupService {
);
}
Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async {
Future verifyReferralDoctorRemarks(
MyReferredPatientModel referredPatient) async {
hasError = false;
Map<String, dynamic> body = Map();
@ -315,9 +307,7 @@ class PatientReferralService extends LookupService {
await baseAppClient.post(
Verify_Referral_Doctor_Remarks,
onSuccess: (dynamic response, int statusCode) {
},
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -14,7 +14,7 @@ class PatientInPatientService extends BaseService {
if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID;
}else {
} else {
requestModel.doctorID = 0;
}

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/insurance_approval_request_model.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';

@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/core/model/labs/request_patient_lab_special_r
import 'package:doctor_app_flutter/core/model/labs/request_send_lab_report_email.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'base/base_service.dart';
import '../../base/base_service.dart';
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List();
@ -25,16 +25,16 @@ class LabsService extends BaseService {
body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS;
}
patientLabOrdersList=[];
patientLabOrdersList = [];
patientLabOrdersList.clear();
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList=[];
patientLabOrdersList = [];
if (!isInpatient) {
response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
var asd="";
var asd = "";
} else {
response['List_GetLabOreders'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
@ -69,14 +69,13 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.orderNo = orderNo;
body = _requestPatientLabSpecialResult.toJson();
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -84,7 +83,9 @@ class LabsService extends BaseService {
}
Future getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
{PatientLabOrders patientLabOrder,
PatiantInformtion patient,
bool isInpatient}) async {
hasError = false;
String url = "";
@ -107,16 +108,15 @@ class LabsService extends BaseService {
patientLabSpecialResult.clear();
labResultList.clear();
if(isInpatient){
if (isInpatient) {
response['List_GetLabNormal'].forEach((hospital) {
labResultList.add(LabResult.fromJson(hospital));
});
}else {
} else {
response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/medical_file_request_model.dart';
import 'package:doctor_app_flutter/core/model/medical_report/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/medical_report/medical_file_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class MedicalFileService extends BaseService {

@ -1,12 +1,14 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
@ -109,7 +111,7 @@ class PrescriptionService extends LookupService {
}, body: _drugRequestModel.toJson());
}
Future getMedicationList({String drug =''}) async {
Future getMedicationList({String drug = ''}) async {
hasError = false;
_drugRequestModel.search = ["$drug"];
await baseAppClient.post(SEARCH_DRUG,

@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
import 'base/base_service.dart';
import '../../base/base_service.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List();

@ -0,0 +1,57 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
import '../../base/base_service.dart';
class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List();
String url = '';
Future getRadImageURL(
{int invoiceNo,
int lineItem,
int projectId,
@required PatiantInformtion patient}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo;
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient,
onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getPatientRadOrders(PatiantInformtion patient,
{isInPatient = false}) async {
String url = GET_PATIENT_ORDERS;
final Map<String, dynamic> body = new Map<String, dynamic>();
if (isInPatient) {
url = GET_IN_PATIENT_ORDERS;
body['ProjectID'] = patient.projectId;
}
hasError = false;
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList = [];
String label = "ListRAD";
if (isInPatient) {
label = "List_GetRadOreders";
}
response[label].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -1,13 +1,12 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/model/sick_leave_patient_request_model.dart';
import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/viewModel/leave_rechdule_response.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
// import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
class SickLeaveService extends BaseService {
Map get sickLeavestatisitics => _statistics;
@ -31,7 +30,6 @@ class SickLeaveService extends BaseService {
dynamic get sickLeaveResponse => _sickLeaveResponse;
dynamic _sickLeaveResponse;
List<SickLeavePatientModel> getAllSickLeavePatient = List();
SickLeavePatientRequestModel _sickLeavePatientRequestModel =
@ -101,8 +99,8 @@ class SickLeaveService extends BaseService {
await baseAppClient.postPatient(
GET_SICK_LEAVE,
onSuccess: (dynamic response, int statusCode) {
// Future.value(response);
getAllSickLeavePatient=[];
// Future.value(response);
getAllSickLeavePatient = [];
response['List_SickLeave'].forEach((v) {
getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v));
});
@ -119,7 +117,7 @@ class SickLeaveService extends BaseService {
_sickLeavePatientRequestModel = SickLeavePatientRequestModel(
patientID: patientMRN, patientTypeID: 2, patientType: 1);
hasError = false;
getAllSickLeavePatient =[];
getAllSickLeavePatient = [];
getAllSickLeavePatient.clear();
await baseAppClient.postPatient(
GET_SICK_LEAVE_PATIENT,

@ -22,15 +22,15 @@ import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'base/lookup-service.dart';
import '../../base/lookup-service.dart';
class SOAPService extends LookupService {
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
List<GetAllergiesResModel> patientAllergiesList = [];
List<GetHistoryResModel> patientHistoryList = [];
List<GetPhysicalExamResModel> patientPhysicalExamList = [];
List<GetPatientProgressNoteResModel> patientProgressNoteList = [];
List<GetAssessmentResModel> patientAssessmentList = [];
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
List<GetAllergiesResModel> patientAllergiesList = [];
List<GetHistoryResModel> patientHistoryList = [];
List<GetPhysicalExamResModel> patientPhysicalExamList = [];
List<GetPatientProgressNoteResModel> patientProgressNoteList = [];
List<GetAssessmentResModel> patientAssessmentList = [];
int episodeID;
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
@ -55,13 +55,12 @@ class SOAPService extends LookupService {
await baseAppClient.post(POST_EPISODE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
episodeID = response['EpisodeID'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postEpisodeReqModel.toJson());
print("Success");
episodeID = response['EpisodeID'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postEpisodeReqModel.toJson());
}
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
@ -69,11 +68,11 @@ class SOAPService extends LookupService {
await baseAppClient.post(POST_ALLERGY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postAllergyRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postAllergyRequestModel.toJson());
}
Future postHistories(
@ -81,11 +80,11 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(POST_HISTORY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postHistoriesRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postHistoriesRequestModel.toJson());
}
Future postChiefComplaint(
@ -93,7 +92,7 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(POST_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -136,18 +135,16 @@ class SOAPService extends LookupService {
}, body: postAssessmentRequestModel.toJson());
}
Future patchAllergy(PostAllergyRequestModel patchAllergyRequestModel) async {
hasError = false;
await baseAppClient.post(PATCH_ALLERGY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchAllergyRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchAllergyRequestModel.toJson());
}
Future patchHistories(
@ -155,11 +152,11 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(PATCH_HISTORY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchHistoriesRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchHistoriesRequestModel.toJson());
}
Future patchChiefComplaint(
@ -167,11 +164,11 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(PATCH_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchChiefComplaintRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchChiefComplaintRequestModel.toJson());
}
Future patchPhysicalExam(
@ -179,11 +176,11 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(PATCH_PHYSICAL_EXAM,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchPhysicalExamRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchPhysicalExamRequestModel.toJson());
}
Future patchProgressNote(
@ -191,11 +188,11 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(PATCH_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchProgressNoteRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchProgressNoteRequestModel.toJson());
}
Future patchAssessment(
@ -203,111 +200,106 @@ class SOAPService extends LookupService {
hasError = false;
await baseAppClient.post(PATCH_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchAssessmentRequestModel.toJson());
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patchAssessmentRequestModel.toJson());
}
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async {
hasError = false;
await baseAppClient.post (GET_ALLERGY,
await baseAppClient.post(GET_ALLERGY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientAllergiesList.clear();
print("Success");
patientAllergiesList.clear();
response['List_Allergies']['entityList'].forEach((v) {
patientAllergiesList.add(GetAllergiesResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: generalGetReqForSOAP.toJson());
response['List_Allergies']['entityList'].forEach((v) {
patientAllergiesList.add(GetAllergiesResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: generalGetReqForSOAP.toJson());
}
Future getPatientHistories(
GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async {
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel,
{bool isFirst = false}) async {
hasError = false;
await baseAppClient.post(GET_HISTORY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
if (isFirst)
patientHistoryList.clear();
if (isFirst) patientHistoryList.clear();
response['List_History']['entityList'].forEach((v) {
patientHistoryList.add(GetHistoryResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getHistoryReqModel.toJson());
super.error = error;
}, body: getHistoryReqModel.toJson());
}
Future getPatientChiefComplaint(
GetChiefComplaintReqModel getChiefComplaintReqModel) async {
hasError = false;
await baseAppClient.post (GET_CHIEF_COMPLAINT,
await baseAppClient.post(GET_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getChiefComplaintReqModel.toJson());
print("Success");
patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getChiefComplaintReqModel.toJson());
}
Future getPatientPhysicalExam(
GetPhysicalExamReqModel getPhysicalExamReqModel) async {
hasError = false;
await baseAppClient.post (GET_PHYSICAL_EXAM,
await baseAppClient.post(GET_PHYSICAL_EXAM,
onSuccess: (dynamic response, int statusCode) {
patientPhysicalExamList.clear();
response['PhysicalExamList']['entityList'].forEach((v) {
patientPhysicalExamList.add(GetPhysicalExamResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getPhysicalExamReqModel.toJson());
patientPhysicalExamList.clear();
response['PhysicalExamList']['entityList'].forEach((v) {
patientPhysicalExamList.add(GetPhysicalExamResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getPhysicalExamReqModel.toJson());
}
Future getPatientProgressNote(
GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
hasError = false;
await baseAppClient.post (GET_PROGRESS_NOTE,
await baseAppClient.post(GET_PROGRESS_NOTE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientProgressNoteList.clear();
response['ProgressNoteList']['entityList'].forEach((v) {
patientProgressNoteList.add(GetPatientProgressNoteResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getGetProgressNoteReqModel.toJson());
print("Success");
patientProgressNoteList.clear();
response['ProgressNoteList']['entityList'].forEach((v) {
patientProgressNoteList.add(GetPatientProgressNoteResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getGetProgressNoteReqModel.toJson());
}
Future getPatientAssessment(
GetAssessmentReqModel getAssessmentReqModel) async {
hasError = false;
await baseAppClient.post (GET_ASSESSMENT,
await baseAppClient.post(GET_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) {
patientAssessmentList.add(GetAssessmentResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getAssessmentReqModel.toJson());
print("Success");
patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) {
patientAssessmentList.add(GetAssessmentResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getAssessmentReqModel.toJson());
}
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
@ -8,11 +8,10 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
class UcafService extends LookupService {
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
List<VitalSignHistory> patientVitalSignsHistory = [];
List<GetAssessmentResModel> patientAssessmentList = [];
List<OrderProcedure> orderProcedureList = [];
List<GetAssessmentResModel> patientAssessmentList = [];
List<OrderProcedure> orderProcedureList = [];
PrescriptionModel prescriptionList;
Future getPatientChiefComplaint(PatiantInformtion patient) async {
@ -23,27 +22,28 @@ class UcafService extends LookupService {
body['EpisodeID'] = patient.episodeNo;
body['DoctorID'] = "";
await baseAppClient.post (GET_CHIEF_COMPLAINT,
await baseAppClient.post(GET_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
print("Success");
patientChiefComplaintList.clear();
response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async {
Future getInPatientVitalSignHistory(
PatiantInformtion patient, bool isInPatient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId;
body['PatientTypeID'] = 1;
if(isInPatient){
if (isInPatient) {
body['InOutPatientType'] = 1;
}else {
} else {
body['InOutPatientType'] = 2;
}
@ -104,17 +104,17 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post (GET_ASSESSMENT,
await baseAppClient.post(GET_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) {
patientAssessmentList.add(GetAssessmentResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
print("Success");
patientAssessmentList.clear();
response['AssessmentList']['entityList'].forEach((v) {
patientAssessmentList.add(GetAssessmentResModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getPrescription(PatiantInformtion patient) async {
@ -129,11 +129,12 @@ class UcafService extends LookupService {
prescriptionList = null;
await baseAppClient.post(GET_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) {
prescriptionList = PrescriptionModel.fromJson(response['PrescriptionList']);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
prescriptionList =
PrescriptionModel.fromJson(response['PrescriptionList']);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getOrderProcedures(PatiantInformtion patient) async {
@ -143,17 +144,17 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post (GET_ORDER_PROCEDURE,
await baseAppClient.post(GET_ORDER_PROCEDURE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
orderProcedureList.clear();
response['OrderedProcedureList']['entityList'].forEach((v) {
orderProcedureList.add(OrderProcedure.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
print("Success");
orderProcedureList.clear();
response['OrderedProcedureList']['entityList'].forEach((v) {
orderProcedureList.add(OrderProcedure.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future postUCAF(PatiantInformtion patient) async {
@ -162,13 +163,12 @@ class UcafService extends LookupService {
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
await baseAppClient.post (POST_UCAF,
await baseAppClient.post(POST_UCAF,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}
}

@ -1,59 +0,0 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
import 'base/base_service.dart';
class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List();
String url = '';
Future getRadImageURL({int invoiceNo, int lineItem, int projectId,@required PatiantInformtion patient}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo;
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getPatientRadOrders(PatiantInformtion patient , {isInPatient = false}) async {
String url = GET_PATIENT_ORDERS;
final Map<String, dynamic> body = new Map<String, dynamic>();
if(isInPatient) {
url = GET_IN_PATIENT_ORDERS;
body['ProjectID'] = patient.projectId;
}
hasError = false;
await baseAppClient.postPatient(url,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList = [];
String label = "ListRAD";
if(isInPatient) {
label ="List_GetRadOreders";
}
response[label].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body:body);
}
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart';
import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
@ -12,7 +12,6 @@ class DischargedPatientViewModel extends BaseViewModel {
List<PatiantInformtion> get myDischargedPatient =>
_dischargedPatientService.myDischargedPatients;
List<PatiantInformtion> filterData = [];
searchData(String str) {
@ -39,16 +38,16 @@ class DischargedPatientViewModel extends BaseViewModel {
}
}
Future getDischargedPatient() async {
setState(ViewState.Busy);
await _dischargedPatientService.getDischargedPatient();
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else{
} else {
filterData = myDischargedPatient;
setState(ViewState.Idle);}
setState(ViewState.Idle);
}
}
Future gtMyDischargeReferralPatient() async {

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/InsuranceCardService.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart';
import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/insurance/InsuranceCardService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';

@ -1,15 +1,15 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/PatientMuseService.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/patient/PatientMuseService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import '../../locator.dart';
class PatientMuseViewModel extends BaseViewModel {
PatientMuseService _patientMuseService = locator<PatientMuseService>();
List<PatientMuseResultsModel> get patientMuseResultsModelList => _patientMuseService.patientMuseResultsModelList;
List<PatientMuseResultsModel> get patientMuseResultsModelList =>
_patientMuseService.patientMuseResultsModelList;
getECGPatient({int patientType, int patientOutSA, int patientID}) async {
setState(ViewState.Busy);

@ -1,9 +1,9 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart';
import 'package:doctor_app_flutter/core/service/patientInPatientService.dart';
import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
@ -85,11 +85,12 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
getPatientBasedOnDate (
{item, PatientSearchRequestModel patientSearchRequestModel, PatientType selectedPatientType,
bool isSearchWithKeyInfo,OutPatientFilterType outPatientFilterType })async {
getPatientBasedOnDate(
{item,
PatientSearchRequestModel patientSearchRequestModel,
PatientType selectedPatientType,
bool isSearchWithKeyInfo,
OutPatientFilterType outPatientFilterType}) async {
String dateTo;
String dateFrom;
if (OutPatientFilterType.Previous == outPatientFilterType) {
@ -144,7 +145,7 @@ class PatientSearchViewModel extends BaseViewModel {
Future getInPatientList(PatientSearchRequestModel requestModel,
{bool isMyInpatient = false}) async {
await getDoctorProfile();
setState(ViewState.Busy);
setState(ViewState.Busy);
if (inPatientList.length == 0)
await _inPatientService.getInPatientList(requestModel, false);
@ -161,12 +162,11 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.BusyLocal);
await getDoctorProfile();
filteredInPatientItems.clear();
if (inPatientList.length > 0)
filteredInPatientItems.addAll(inPatientList);
if (inPatientList.length > 0) filteredInPatientItems.addAll(inPatientList);
setState(ViewState.Idle);
}
void clearPatientList(){
void clearPatientList() {
_inPatientService.inPatientList = [];
_inPatientService.myInPatientList = [];
}

@ -1,8 +1,9 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/SOAP_service.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/soap/SOAP_service.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart';
@ -39,10 +40,10 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get allergySeverityList =>
_SOAPService.allergySeverityList;
List<MasterKeyModel> get historyFamilyList => _SOAPService.historyFamilyList;
List<MasterKeyModel> get historyMedicalList => _SOAPService.historyMedicalList;
List<MasterKeyModel> get historyMedicalList =>
_SOAPService.historyMedicalList;
List<MasterKeyModel> get historySportList => _SOAPService.historySportList;
@ -82,8 +83,7 @@ class SOAPViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList =>
_SOAPService.patientAssessmentList;
int get episodeID =>
_SOAPService.episodeID;
int get episodeID => _SOAPService.episodeID;
get medicationStrengthList => _SOAPService.medicationStrengthListWithModel;
get medicationDoseTimeList => _SOAPService.medicationDoseTimeListWithModel;
@ -102,11 +102,12 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getMasterLookup(MasterKeysService masterKeys, {bool isBusyLocal = false}) async {
if(isBusyLocal){
Future getMasterLookup(MasterKeysService masterKeys,
{bool isBusyLocal = false}) async {
if (isBusyLocal) {
setState(ViewState.Busy);
} else
setState(ViewState.Busy);
}else
setState(ViewState.Busy);
await _SOAPService.getMasterLookup(masterKeys);
if (_SOAPService.hasError) {
error = _SOAPService.error;
@ -115,7 +116,6 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postEpisode(postEpisodeReqModel);
@ -136,7 +136,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postHistories(PostHistoriesRequestModel postHistoriesRequestModel) async {
Future postHistories(
PostHistoriesRequestModel postHistoriesRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postHistories(postHistoriesRequestModel);
if (_SOAPService.hasError) {
@ -146,7 +147,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postChiefComplaint(PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
Future postChiefComplaint(
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postChiefComplaint(postChiefComplaintRequestModel);
if (_SOAPService.hasError) {
@ -156,7 +158,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
Future postPhysicalExam(
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postPhysicalExam(postPhysicalExamRequestModel);
if (_SOAPService.hasError) {
@ -166,7 +169,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async {
Future postProgressNote(
PostProgressNoteRequestModel postProgressNoteRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postProgressNote(postProgressNoteRequestModel);
if (_SOAPService.hasError) {
@ -176,7 +180,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postAssessment(PostAssessmentRequestModel postAssessmentRequestModel) async {
Future postAssessment(
PostAssessmentRequestModel postAssessmentRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postAssessment(postAssessmentRequestModel);
if (_SOAPService.hasError) {
@ -186,7 +191,6 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchAllergy(PostAllergyRequestModel patchAllergyRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchAllergy(patchAllergyRequestModel);
@ -197,7 +201,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchHistories(PostHistoriesRequestModel patchHistoriesRequestModel) async {
Future patchHistories(
PostHistoriesRequestModel patchHistoriesRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchHistories(patchHistoriesRequestModel);
if (_SOAPService.hasError) {
@ -207,7 +212,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchChiefComplaint(PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async {
Future patchChiefComplaint(
PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchChiefComplaint(patchChiefComplaintRequestModel);
if (_SOAPService.hasError) {
@ -217,7 +223,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchPhysicalExam(PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
Future patchPhysicalExam(
PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchPhysicalExam(patchPhysicalExamRequestModel);
if (_SOAPService.hasError) {
@ -227,7 +234,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchProgressNote(PostProgressNoteRequestModel patchProgressNoteRequestModel) async {
Future patchProgressNote(
PostProgressNoteRequestModel patchProgressNoteRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchProgressNote(patchProgressNoteRequestModel);
if (_SOAPService.hasError) {
@ -237,7 +245,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchAssessment(PatchAssessmentReqModel patchAssessmentRequestModel) async {
Future patchAssessment(
PatchAssessmentReqModel patchAssessmentRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchAssessment(patchAssessmentRequestModel);
if (_SOAPService.hasError) {
@ -259,7 +268,7 @@ class SOAPViewModel extends BaseViewModel {
if (isLocalBusy) {
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Error);
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
@ -271,16 +280,19 @@ class SOAPViewModel extends BaseViewModel {
masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
if(selectedAllergy != null && element.isChecked)
allergiesString +=
(isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn )+ ' , ';
if (selectedAllergy != null && element.isChecked)
allergiesString +=
(isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn) +
' , ';
});
return allergiesString;
}
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async {
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel,
{bool isFirst = false}) async {
setState(ViewState.Busy);
await _SOAPService.getPatientHistories(getHistoryReqModel, isFirst: isFirst);
await _SOAPService.getPatientHistories(getHistoryReqModel,
isFirst: isFirst);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.Error);
@ -299,7 +311,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getPatientPhysicalExam(GetPhysicalExamReqModel getPhysicalExamReqModel) async {
Future getPatientPhysicalExam(
GetPhysicalExamReqModel getPhysicalExamReqModel) async {
setState(ViewState.Busy);
await _SOAPService.getPatientPhysicalExam(getPhysicalExamReqModel);
if (_SOAPService.hasError) {
@ -309,7 +322,8 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getPatientProgressNote(GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
Future getPatientProgressNote(
GetGetProgressNoteReqModel getGetProgressNoteReqModel) async {
setState(ViewState.Busy);
await _SOAPService.getPatientProgressNote(getGetProgressNoteReqModel);
if (_SOAPService.hasError) {
@ -339,6 +353,7 @@ class SOAPViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
// ignore: missing_return
MasterKeyModel getOneMasterKey(
{@required MasterKeysService masterKeys, dynamic id, int typeId}) {
@ -391,7 +406,8 @@ class SOAPViewModel extends BaseViewModel {
break;
case MasterKeysService.HistorySurgical:
List<MasterKeyModel> result = historySurgicalList.where((element) {
return element.id == id;}).toList();
return element.id == id;
}).toList();
if (result.isNotEmpty) {
return result.first;
}
@ -414,12 +430,12 @@ class SOAPViewModel extends BaseViewModel {
return result.first;
}
break;
// case MasterKeysService.physiotherapyGoals:
// listOfPhysiotherapyGoals.clear();
// entryList.forEach((v) {
// listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
// });
// break;
// case MasterKeysService.physiotherapyGoals:
// listOfPhysiotherapyGoals.clear();
// entryList.forEach((v) {
// listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
// });
// break;
case MasterKeysService.DiagnosisType:
List<MasterKeyModel> result = listOfDiagnosisType.where((element) {
@ -441,7 +457,7 @@ class SOAPViewModel extends BaseViewModel {
break;
case MasterKeysService.ICD10:
List<MasterKeyModel> result = listOfICD10.where((element) {
return element.code == id ;
return element.code == id;
}).toList();
if (result.isNotEmpty) {
return result.first;
@ -450,6 +466,4 @@ class SOAPViewModel extends BaseViewModel {
break;
}
}
}

@ -1,8 +1,8 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/model/insert_imei_model.dart';
import 'package:doctor_app_flutter/core/model/auth/imei_details.dart';
import 'package:doctor_app_flutter/core/model/auth/insert_imei_model.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/auth/activation_Code_req_model.dart';
import 'package:doctor_app_flutter/models/auth/check_activation_code_request_model.dart';

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import '../../locator.dart';
import 'base_view_model.dart';

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
import '../../locator.dart';
@ -8,7 +8,8 @@ import 'base_view_model.dart';
class DoctorReplayViewModel extends BaseViewModel {
DoctorReplyService _doctorReplyService = locator<DoctorReplyService>();
List<ListGtMyPatientsQuestions> get listDoctorWorkingHoursTable => _doctorReplyService.listDoctorWorkingHoursTable;
List<ListGtMyPatientsQuestions> get listDoctorWorkingHoursTable =>
_doctorReplyService.listDoctorWorkingHoursTable;
Future getDoctorReply() async {
setState(ViewState.Busy);
@ -20,7 +21,8 @@ class DoctorReplayViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future replay(String referredDoctorRemarks, ListGtMyPatientsQuestions model) async {
Future replay(
String referredDoctorRemarks, ListGtMyPatientsQuestions model) async {
setState(ViewState.BusyLocal);
await _doctorReplyService.replay(referredDoctorRemarks, model);
if (_doctorReplyService.hasError) {

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/service/auth_service.dart';
import 'package:doctor_app_flutter/core/model/auth/imei_details.dart';
import 'package:doctor_app_flutter/core/service/home/auth_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/doctor/user_model.dart';

@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
import 'package:doctor_app_flutter/core/service/labs_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/lab_order/labs_service.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
@ -116,10 +116,14 @@ class LabsViewModel extends BaseViewModel {
}
getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
{PatientLabOrders patientLabOrder,
PatiantInformtion patient,
bool isInpatient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabResult(
patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient);
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/service/medical_file_service.dart';
import 'package:doctor_app_flutter/core/model/medical_report/medical_file_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/medical_report/medical_file_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';

@ -1,8 +1,9 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/medicine_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';

@ -1,38 +1,43 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/admission-request.dart';
import 'package:doctor_app_flutter/core/service/patient-admission-request-service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import '../../locator.dart';
class AdmissionRequestViewModel extends BaseViewModel{
AdmissionRequestService _admissionRequestService = locator<AdmissionRequestService>();
class AdmissionRequestViewModel extends BaseViewModel {
AdmissionRequestService _admissionRequestService =
locator<AdmissionRequestService>();
List<dynamic> get clinicList => _admissionRequestService.clinicList;
List<dynamic> get doctorsList => _admissionRequestService.doctorsList;
List<dynamic> get speciality => _admissionRequestService.specialityList;
List<dynamic> get speciality => _admissionRequestService.specialityList;
List<dynamic> get floorList => _admissionRequestService.floorList;
List<dynamic> get floorList => _admissionRequestService.floorList;
List<dynamic> get wardList => _admissionRequestService.wardList;
List<dynamic> get wardList => _admissionRequestService.wardList;
List<dynamic> get roomCategoryList => _admissionRequestService.roomCategoryList;
List<dynamic> get roomCategoryList =>
_admissionRequestService.roomCategoryList;
List<dynamic> get admissionTypeList => _admissionRequestService.listOfAdmissionType;
List<dynamic> get admissionTypeList =>
_admissionRequestService.listOfAdmissionType;
List<dynamic> get diagnosisTypesList => _admissionRequestService.diagnosisTypesList;
List<dynamic> get diagnosisTypesList =>
_admissionRequestService.diagnosisTypesList;
List<dynamic> get allergiesList => _admissionRequestService.allergiesLookupList;
List<dynamic> get allergiesList =>
_admissionRequestService.allergiesLookupList;
List<dynamic> get dietTypesList => _admissionRequestService.dietTypesList;
List<dynamic> get dietTypesList => _admissionRequestService.dietTypesList;
List<dynamic> get icdCodes => _admissionRequestService.icdCodes;
List<dynamic> get icdCodes => _admissionRequestService.icdCodes;
List<dynamic> get listOfDiagnosisSelectionTypes => _admissionRequestService.listOfDiagnosisSelectionTypes;
List<dynamic> get listOfDiagnosisSelectionTypes =>
_admissionRequestService.listOfDiagnosisSelectionTypes;
AdmissionRequest admissionRequestData;
@ -131,7 +136,7 @@ class AdmissionRequestViewModel extends BaseViewModel{
setState(ViewState.Idle);
}
Future makeAdmissionRequest() async{
Future makeAdmissionRequest() async {
setState(ViewState.Busy);
await _admissionRequestService.makeAdmissionRequest(admissionRequestData);
if (_admissionRequestService.hasError) {
@ -151,4 +156,4 @@ class AdmissionRequestViewModel extends BaseViewModel{
setState(ViewState.Idle);
}
}
}
}

@ -1,11 +1,11 @@
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart';
import 'package:doctor_app_flutter/core/service/MyReferralPatientService.dart';
import 'package:doctor_app_flutter/core/service/ReferralService.dart';
import 'package:doctor_app_flutter/core/service/patient-doctor-referral-service.dart';
import 'package:doctor_app_flutter/core/model/referral/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService.dart';
import 'package:doctor_app_flutter/core/service/patient/MyReferralPatientService.dart';
import 'package:doctor_app_flutter/core/service/patient/ReferralService.dart';
import 'package:doctor_app_flutter/core/service/patient/patient-doctor-referral-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
@ -26,7 +26,8 @@ class PatientReferralViewModel extends BaseViewModel {
MyReferralInPatientService _myReferralService =
locator<MyReferralInPatientService>();
DischargedPatientService _dischargedPatientService = locator<DischargedPatientService>();
DischargedPatientService _dischargedPatientService =
locator<DischargedPatientService>();
List<DischargeReferralPatient> get myDischargeReferralPatient =>
_dischargedPatientService.myDischargeReferralPatients;
@ -165,9 +166,11 @@ class PatientReferralViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async{
Future replay(
String referredDoctorRemarks, MyReferralPatientModel referral) async {
setState(ViewState.Busy);
await _myReferralService.replay(referredDoctorRemarks,referral);
await _myReferralService.replay(referredDoctorRemarks, referral);
if (_myReferralService.hasError) {
error = _myReferralService.error;
setState(ViewState.ErrorLocal);
@ -366,7 +369,8 @@ class PatientReferralViewModel extends BaseViewModel {
patient.roomId = referredPatient.roomID;
patient.bedId = referredPatient.bedID;
patient.nationalityName = referredPatient.nationalityName;
patient.nationalityFlagURL = '';// TODO from backend referredPatient.nationalityFlagURL;
patient.nationalityFlagURL =
''; // TODO from backend referredPatient.nationalityFlagURL;
patient.age = referredPatient.age;
patient.clinicDescription = referredPatient.clinicDescription;
return patient;

@ -1,8 +1,8 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/prescription_model.dart';
import 'package:doctor_app_flutter/core/service/patient-ucaf-service.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
@ -45,7 +45,7 @@ class UcafViewModel extends BaseViewModel {
String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0";
resetDataInFirst(){
resetDataInFirst() {
_ucafService.patientAssessmentList = [];
_ucafService.orderProcedureList = [];
_ucafService.prescriptionList = null;

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient-vital-signs-service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
@ -52,12 +52,10 @@ class VitalSignsViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
if (isInPatient) {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
} else {
await _vitalSignService.getOutPatientVitalSignHistory(patient, from, to);
await _vitalSignService.getOutPatientVitalSignHistory(patient, from, to);
}
if (_vitalSignService.hasError) {
@ -97,7 +95,7 @@ class VitalSignsViewModel extends BaseViewModel {
oxygenation == null ||
oxygenation == 'null') {
oxygenation =
"${element.sAO2.toString()}";/* - ${element.fIO2.toString()}*/
"${element.sAO2.toString()}"; /* - ${element.fIO2.toString()}*/
}
if (painScore == null || painScore == "-") {
painScore = element.painScore.toString() != 'null'

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart';
@ -42,7 +42,8 @@ class PatientViewModel extends BaseViewModel {
get insuranceApporvalsList => _patientService.insuranceApporvalsList;
List<NoteModel> get patientProgressNoteList => _patientService.patientProgressNoteList;
List<NoteModel> get patientProgressNoteList =>
_patientService.patientProgressNoteList;
List<dynamic> get clinicsList => _patientService.clinicsList;
@ -65,7 +66,7 @@ class PatientViewModel extends BaseViewModel {
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.Error);
} else{
} else {
setState(ViewState.Idle);
}
return localRes;
@ -142,18 +143,18 @@ class PatientViewModel extends BaseViewModel {
}
Future getPatientProgressNote(patient, {bool isLocalBusy = false}) async {
if(isLocalBusy) {
if (isLocalBusy) {
setState(ViewState.BusyLocal);
}else{
} else {
setState(ViewState.Busy);
}
await _patientService.getPatientProgressNote(patient);
if (_patientService.hasError) {
error = _patientService.error;
if(isLocalBusy) {
if (isLocalBusy) {
setState(ViewState.ErrorLocal);
}else{
} else {
setState(ViewState.Error);
}
} else

@ -1,16 +1,18 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/prescriptions_service.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
@ -59,7 +61,7 @@ class PrescriptionViewModel extends BaseViewModel {
getPrescriptionsInPatient(PatiantInformtion patient) async {
setState(ViewState.Busy);
error="";
error = "";
await _prescriptionsService.getPrescriptionInPatient(
mrn: patient.patientId, adn: patient.admissionNo);
if (_prescriptionsService.hasError) {

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmac
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/service/prescriptions_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/material.dart';
@ -19,16 +19,16 @@ class PrescriptionsViewModel extends BaseViewModel {
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList ;
List<PrescriptionReportEnh> get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList =>
_prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList =>
_prescriptionsService.prescriptionReportEnhList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
@ -48,6 +48,7 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
_getPrescriptionsOrders() async {
await _prescriptionsService.getPrescriptionsOrders();
if (_prescriptionsService.hasError) {
@ -97,15 +98,17 @@ class PrescriptionsViewModel extends BaseViewModel {
});
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
getPrescriptionReport({Prescriptions prescriptions,@required PatiantInformtion patient}) async {
getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions,patient: patient);
await _prescriptionsService.getPrescriptionReport(
prescriptions: prescriptions, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@ -114,11 +117,11 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
getListPharmacyForPrescriptions({int itemId,@required PatiantInformtion patient}) async {
getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId,patient: patient);
await _prescriptionsService.getListPharmacyForPrescriptions(
itemId: itemId, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@ -127,11 +130,12 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder,@required PatiantInformtion patient}) async {
getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder,patient: patient);
await _prescriptionsService.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@ -139,7 +143,4 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
}

@ -11,9 +11,9 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_request_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/service/labs_service.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
import 'package:doctor_app_flutter/core/service/radiology_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/lab_order/labs_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/procedure/procedure_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/radiology/radiology_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -43,7 +43,8 @@ class ProcedureViewModel extends BaseViewModel {
List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList;
List<PatientLabOrders> get patientLabOrdersList => _labsService.patientLabOrdersList;
List<PatientLabOrders> get patientLabOrdersList =>
_labsService.patientLabOrdersList;
List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList;
@ -51,16 +52,14 @@ class ProcedureViewModel extends BaseViewModel {
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
Future getProcedure({int mrn,String patientType}) async {
Future getProcedure({int mrn, String patientType}) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _procedureService.getProcedure(mrn: mrn);
if (_procedureService.hasError) {
error = _procedureService.error;
if(patientType=="7")
if (patientType == "7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
@ -135,15 +134,16 @@ class ProcedureViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
//await getProcedure(mrn: mrn);
}
void getPatientRadOrders(PatiantInformtion patient,{String patientType, bool isInPatient = false}) async {
void getPatientRadOrders(PatiantInformtion patient,
{String patientType, bool isInPatient = false}) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
await _radiologyService.getPatientRadOrders(patient,
isInPatient: isInPatient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
if(patientType=="7")
if (patientType == "7")
setState(ViewState.ErrorLocal);
else
setState(ViewState.ErrorLocal);
@ -221,8 +221,6 @@ class ProcedureViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom {
return labResultLists;
}
@ -232,7 +230,7 @@ class ProcedureViewModel extends BaseViewModel {
await _labsService.getPatientLabOrdersList(patient, isInpatient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/service/radiology_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/radiology/radiology_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/foundation.dart';
@ -20,9 +20,11 @@ class RadiologyViewModel extends BaseViewModel {
? _finalRadiologyListClinic
: _finalRadiologyListHospital;
void getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
void getPatientRadOrders(PatiantInformtion patient,
{isInPatient = false}) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
await _radiologyService.getPatientRadOrders(patient,
isInPatient: isInPatient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);

@ -1,14 +1,16 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/referral_patient_service.dart';
import 'package:doctor_app_flutter/core/service/patient/referral_patient_service.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class ReferralPatientViewModel extends BaseViewModel {
ReferralPatientService _referralPatientService = locator<ReferralPatientService>();
ReferralPatientService _referralPatientService =
locator<ReferralPatientService>();
List<MyReferralPatientModel> get listMyReferralPatientModel => _referralPatientService.listMyReferralPatientModel;
List<MyReferralPatientModel> get listMyReferralPatientModel =>
_referralPatientService.listMyReferralPatientModel;
Future getMyReferralPatient() async {
setState(ViewState.Busy);
@ -20,7 +22,8 @@ class ReferralPatientViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel model) async {
Future replay(
String referredDoctorRemarks, MyReferralPatientModel model) async {
setState(ViewState.BusyLocal);
await _referralPatientService.replay(referredDoctorRemarks, model);
if (_referralPatientService.hasError) {

@ -1,14 +1,16 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/referred_patient_service.dart';
import 'package:doctor_app_flutter/core/service/patient/referred_patient_service.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class ReferredPatientViewModel extends BaseViewModel {
ReferredPatientService _referralPatientService = locator<ReferredPatientService>();
ReferredPatientService _referralPatientService =
locator<ReferredPatientService>();
List<MyReferredPatientModel> get listMyReferredPatientModel => _referralPatientService.listMyReferredPatientModel;
List<MyReferredPatientModel> get listMyReferredPatientModel =>
_referralPatientService.listMyReferredPatientModel;
Future getMyReferredPatient() async {
setState(ViewState.Busy);
@ -19,5 +21,4 @@ class ReferredPatientViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
}

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/schedule_service.dart';
import 'package:doctor_app_flutter/core/service/home/schedule_service.dart';
import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart';
import '../../locator.dart';
@ -8,7 +8,8 @@ import 'base_view_model.dart';
class ScheduleViewModel extends BaseViewModel {
ScheduleService _scheduleService = locator<ScheduleService>();
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable => _scheduleService.listDoctorWorkingHoursTable;
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
_scheduleService.listDoctorWorkingHoursTable;
Future getDoctorSchedule() async {
setState(ViewState.Busy);

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/sick_leave/sickleave_service.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/screens/QR_reader_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/doctor_reply_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart';
import 'package:doctor_app_flutter/screens/home/home_screen.dart';
import 'package:doctor_app_flutter/screens/qr_reader/QR_reader_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart';

@ -1,10 +1,3 @@
import 'package:doctor_app_flutter/core/service/auth_service.dart';
import 'package:doctor_app_flutter/core/service/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/medical_file_service.dart';
import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
@ -14,26 +7,33 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart';
import 'core/service/DischargedPatientService.dart';
import 'core/service/InsuranceCardService.dart';
import 'core/service/MyReferralPatientService.dart';
import 'core/service/PatientMuseService.dart';
import 'core/service/ReferralService.dart';
import 'core/service/SOAP_service.dart';
import 'core/service/doctor_reply_service.dart';
import 'core/service/labs_service.dart';
import 'core/service/medicine_service.dart';
import 'core/service/patient-admission-request-service.dart';
import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/patient-ucaf-service.dart';
import 'core/service/patient-vital-signs-service.dart';
import 'core/service/home/auth_service.dart';
import 'core/service/home/dasboard_service.dart';
import 'core/service/patient/DischargedPatientService.dart';
import 'core/service/patient/patient_service.dart';
import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart';
import 'core/service/patient/MyReferralPatientService.dart';
import 'core/service/patient/PatientMuseService.dart';
import 'core/service/patient/ReferralService.dart';
import 'core/service/patient_medical_file/medical_report/medical_file_service.dart';
import 'core/service/patient_medical_file/prescription/prescription_service.dart';
import 'core/service/patient_medical_file/procedure/procedure_service.dart';
import 'core/service/patient_medical_file/sick_leave/sickleave_service.dart';
import 'core/service/patient_medical_file/soap/SOAP_service.dart';
import 'core/service/home/doctor_reply_service.dart';
import 'core/service/patient_medical_file/lab_order/labs_service.dart';
import 'core/service/patient_medical_file/prescription/medicine_service.dart';
import 'core/service/patient_medical_file/admission_request/patient-admission-request-service.dart';
import 'core/service/patient/patient-doctor-referral-service.dart';
import 'core/service/patient_medical_file/ucaf/patient-ucaf-service.dart';
import 'core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart';
import 'core/service/patient/out_patient_service.dart';
import 'core/service/patientInPatientService.dart';
import 'core/service/prescriptions_service.dart';
import 'core/service/radiology_service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart';
import 'core/service/patient/patientInPatientService.dart';
import 'core/service/patient_medical_file/prescription/prescriptions_service.dart';
import 'core/service/patient_medical_file/radiology/radiology_service.dart';
import 'core/service/patient/referral_patient_service.dart';
import 'core/service/patient/referred_patient_service.dart';
import 'core/service/home/schedule_service.dart';
import 'core/viewModel/DischargedPatientViewModel.dart';
import 'core/viewModel/InsuranceViewModel.dart';
import 'core/viewModel/PatientMuseViewModel.dart';

@ -3,7 +3,7 @@ import 'dart:io';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/service/auth_service.dart';
import 'package:doctor_app_flutter/core/service/home/auth_service.dart';
import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';

@ -3,7 +3,8 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart';
@ -503,7 +504,9 @@ class _HomeScreenState extends State<HomeScreen> {
Container(
padding: EdgeInsets.all(10),
child: AppText(
"My\n"+TranslationBase.of(context).inPatient,
"My\n" +
TranslationBase.of(context)
.inPatient,
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 15,

@ -3,7 +3,7 @@ import 'dart:math';
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart';

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -16,8 +16,8 @@ class PatientInPatientScreen extends StatefulWidget {
_PatientInPatientScreenState createState() => _PatientInPatientScreenState();
}
class _PatientInPatientScreenState extends State<PatientInPatientScreen> with SingleTickerProviderStateMixin{
class _PatientInPatientScreenState extends State<PatientInPatientScreen>
with SingleTickerProviderStateMixin {
TabController _tabController;
int _activeTab = 0;
@ -85,7 +85,8 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
child: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070),
preferredSize: Size.fromHeight(
MediaQuery.of(context).size.height * 0.070),
child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: BoxDecoration(
@ -103,12 +104,18 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
indicatorWeight: 1.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0),
labelPadding: EdgeInsets.only(
top: 0, left: 0, right: 0, bottom: 0),
unselectedLabelColor: Colors.grey[800],
tabs: [
tabWidget(screenSize, _activeTab == 0, TranslationBase.of(context).inPatientAll, counter: model.inPatientList.length),
tabWidget(screenSize, _activeTab == 1, "My InPatients", counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 2, TranslationBase.of(context).discharged),
tabWidget(screenSize, _activeTab == 0,
TranslationBase.of(context).inPatientAll,
counter: model.inPatientList.length),
tabWidget(
screenSize, _activeTab == 1, "My InPatients",
counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 2,
TranslationBase.of(context).discharged),
],
),
),
@ -137,15 +144,13 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
);
}
Widget tabWidget(Size screenSize, bool isActive, String title, {int counter = -1}){
Widget tabWidget(Size screenSize, bool isActive, String title,
{int counter = -1}) {
return Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
isActive ? Color(0xFFD02127 /*B8382B*/) : Color(0xFFEAEAEA),
isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
@ -164,9 +169,7 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
width: 15,
height: 15,
decoration: BoxDecoration(
color: isActive
? Colors.white
: Color(0xFFD02127),
color: isActive ? Colors.white : Color(0xFFD02127),
shape: BoxShape.circle,
),
child: Center(

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/model/referral/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -13,12 +13,12 @@ import 'package:flutter/material.dart';
import '../../routes.dart';
class ReferralDischargedPatientDetails extends StatelessWidget {
final DischargeReferralPatient referredPatient;
ReferralDischargedPatientDetails(this.referredPatient,);
ReferralDischargedPatientDetails(
this.referredPatient,
);
@override
Widget build(BuildContext context) {
@ -68,16 +68,19 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
InkWell(
onTap: () {
PatiantInformtion patient =
model.getPatientFromDischargeReferralPatient(referredPatient);
model.getPatientFromDischargeReferralPatient(
referredPatient);
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient,
"patientType": "1",
"isInpatient": true,
"arrivalType": "1",
"isDischargedPatient":true,
"from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"isDischargedPatient": true,
"from": DateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
});
},
child: Icon(
@ -87,7 +90,6 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
)
]),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -124,7 +126,9 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
: Colors.red[700],
),
AppText(
DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,),
DateUtils.getDayMonthYearDateFormatted(
referredPatient.referralDate,
),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier,
@ -132,7 +136,6 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -152,7 +155,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -177,7 +180,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -196,11 +199,11 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
),
Expanded(
child: AppText(
"${DateUtils.convertStringToDate(referredPatient.dischargeDate).difference(DateUtils.convertStringToDate(referredPatient.admissionDate)).inDays+1}",
"${DateUtils.convertStringToDate(referredPatient.dischargeDate).difference(DateUtils.convertStringToDate(referredPatient.admissionDate)).inDays + 1}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -223,20 +226,19 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
@ -244,7 +246,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize:
1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
@ -252,17 +254,16 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
@ -270,7 +271,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
MainAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).refClinic}: ",
@ -293,13 +294,13 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.frequency +
.frequency +
": ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
@ -343,13 +344,12 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -363,11 +363,12 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
),
Expanded(
child: AppText(
referredPatient.referringClinicDescription,
referredPatient
.referringClinicDescription,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -390,13 +391,12 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -414,15 +414,12 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize:
1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -462,40 +459,40 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
width: 30,
),
),
//TODO from backend
// Container(
// margin: EdgeInsets.only(
// left: 0,
// top: 25,
// right: 0,
// bottom: 0),
// padding: EdgeInsets.only(
// left: 4.0, right: 4.0),
// child: referredPatient.doctorImageURL !=
// null
// ? ClipRRect(
// borderRadius:
// BorderRadius.circular(20.0),
// child: Image.network(
// referredPatient.doctorImageURL,
// height: 25,
// width: 30,
// errorBuilder:
// (BuildContext context,
// Object exception,
// StackTrace stackTrace) {
// return Text('No Image');
// },
// ))
// : Container(
// child: Image.asset(
// referredPatient.gender == 1
// ? 'assets/images/male_avatar.png'
// : 'assets/images/female_avatar.png',
// fit: BoxFit.cover,
// ),
// ),
// ),
//TODO from backend
// Container(
// margin: EdgeInsets.only(
// left: 0,
// top: 25,
// right: 0,
// bottom: 0),
// padding: EdgeInsets.only(
// left: 4.0, right: 4.0),
// child: referredPatient.doctorImageURL !=
// null
// ? ClipRRect(
// borderRadius:
// BorderRadius.circular(20.0),
// child: Image.network(
// referredPatient.doctorImageURL,
// height: 25,
// width: 30,
// errorBuilder:
// (BuildContext context,
// Object exception,
// StackTrace stackTrace) {
// return Text('No Image');
// },
// ))
// : Container(
// child: Image.asset(
// referredPatient.gender == 1
// ? 'assets/images/male_avatar.png'
// : 'assets/images/female_avatar.png',
// fit: BoxFit.cover,
// ),
// ),
// ),
Expanded(
flex: 4,
child: Container(
@ -575,13 +572,11 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
SizedBox(
height: 8,
),
],
),
),
),
),
],
),
),

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
@ -16,7 +16,6 @@ class FilterDatePage extends StatefulWidget {
final OutPatientFilterType outPatientFilterType;
final PatientSearchViewModel patientSearchViewModel;
const FilterDatePage(
{Key key, this.outPatientFilterType, this.patientSearchViewModel})
: super(key: key);
@ -34,19 +33,13 @@ class _FilterDatePageState extends State<FilterDatePage> {
@override
Widget build(BuildContext context) {
var screenSize;
return AppScaffold(
isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery
.of(context)
.size
.height * 1.0,
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
@ -54,7 +47,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
children: [
BottomSheetTitle(
title: (OutPatientFilterType.Previous ==
widget.outPatientFilterType)
widget.outPatientFilterType)
? " Filter Previous Out Patient"
: "Filter Nextweek Out Patient",
),
@ -69,24 +62,18 @@ class _FilterDatePageState extends State<FilterDatePage> {
Container(
color: Colors.white,
child: InkWell(
onTap: () =>
selectDate(
context, firstDate: getFirstDate(
widget.outPatientFilterType),
lastDate: getLastDate(
widget.outPatientFilterType)),
onTap: () => selectDate(context,
firstDate:
getFirstDate(widget.outPatientFilterType),
lastDate:
getLastDate(widget.outPatientFilterType)),
child: TextField(
decoration:
textFieldSelectorDecoration(
TranslationBase
.of(
context)
.fromDate,
widget.patientSearchViewModel.selectedFromDate != null
? "${DateUtils
.convertStringToDateFormat(
widget.patientSearchViewModel.selectedFromDate.toString(),
"yyyy-MM-dd")}"
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).fromDate,
widget.patientSearchViewModel
.selectedFromDate !=
null
? "${DateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
@ -97,29 +84,25 @@ class _FilterDatePageState extends State<FilterDatePage> {
),
),
),
SizedBox(height: 10,),
SizedBox(
height: 10,
),
Container(
color: Colors.white,
child: InkWell(
onTap: () =>
selectDate(
context, isFromDate: false,
firstDate: getFirstDate(
widget.outPatientFilterType),
lastDate: getLastDate(
widget.outPatientFilterType)),
onTap: () => selectDate(context,
isFromDate: false,
firstDate:
getFirstDate(widget.outPatientFilterType),
lastDate:
getLastDate(widget.outPatientFilterType)),
child: TextField(
decoration:
textFieldSelectorDecoration(
TranslationBase
.of(
context)
.toDate,
widget.patientSearchViewModel.selectedToDate != null
? "${DateUtils
.convertStringToDateFormat(
widget.patientSearchViewModel.selectedToDate.toString(),
"yyyy-MM-dd")}"
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).toDate,
widget.patientSearchViewModel
.selectedToDate !=
null
? "${DateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
@ -147,10 +130,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
@ -162,10 +142,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
widthFactor: .80,
child: Center(
child: AppButton(
title:
TranslationBase
.of(context)
.search,
title: TranslationBase.of(context).search,
padding: 10,
color: Color(0xFF359846),
onPressed: () async {
@ -178,8 +155,8 @@ class _FilterDatePageState extends State<FilterDatePage> {
} else {
Duration difference = widget
.patientSearchViewModel.selectedToDate
.difference(
widget.patientSearchViewModel.selectedFromDate);
.difference(widget
.patientSearchViewModel.selectedFromDate);
if (difference.inDays > 90) {
Helpers.showErrorToast(
"The difference between from date and end date must be less than 3 months");
@ -219,8 +196,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
),
],
),
)
);
));
}
selectDate(BuildContext context,
@ -241,9 +217,9 @@ class _FilterDatePageState extends State<FilterDatePage> {
setState(() {
this.widget.patientSearchViewModel.selectedFromDate = picked;
var date = picked.add(Duration(days: 30));
if(date.isBefore(lastDate)){
if (date.isBefore(lastDate)) {
this.widget.patientSearchViewModel.selectedToDate = date;
}else
} else
this.widget.patientSearchViewModel.selectedToDate = lastDate;
});
} else {
@ -257,43 +233,25 @@ class _FilterDatePageState extends State<FilterDatePage> {
getFirstDate(OutPatientFilterType outPatientFilterType) {
if (outPatientFilterType == OutPatientFilterType.Previous) {
return DateTime(
DateTime
.now()
.year -20, DateTime
.now()
.month, DateTime
.now()
.day);
DateTime.now().year - 20, DateTime.now().month, DateTime.now().day);
} else {
return DateTime(
DateTime
.now()
.year, DateTime
.now()
.month, DateTime
.now()
.day + 1);
DateTime.now().year, DateTime.now().month, DateTime.now().day + 1);
}
}
getLastDate(OutPatientFilterType outPatientFilterType) {
if (outPatientFilterType == OutPatientFilterType.Previous) {
return DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day-1);
return DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
} else {
return DateTime(
DateTime
.now()
.year, DateTime
.now()
.month, DateTime
.now()
.day + 7);
DateTime.now().year, DateTime.now().month, DateTime.now().day + 7);
}
}
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown,
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
@ -311,11 +269,11 @@ class _FilterDatePageState extends State<FilterDatePage> {
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
: null,
hintStyle: TextStyle(
fontSize: 13,

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -41,18 +43,19 @@ class OutPatientsScreen extends StatefulWidget {
final bool isSearchAndOut;
final String searchKey;
OutPatientsScreen(
{this.patientSearchForm,
this.selectedType,
this.isAppbar = true,
this.arrivalType,
this.isView,
this.selectedPatientType,
this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
this.isInpatient = false, this.searchKey, this.isSearchAndOut=false});
this.selectedType,
this.isAppbar = true,
this.arrivalType,
this.isView,
this.selectedPatientType,
this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
this.isInpatient = false,
this.searchKey,
this.isSearchAndOut = false});
@override
_OutPatientsScreenState createState() => _OutPatientsScreenState();
@ -81,20 +84,11 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
Widget build(BuildContext context) {
authProvider = Provider.of(context);
_times = [
TranslationBase
.of(context)
.previous,
TranslationBase
.of(context)
.today,
TranslationBase
.of(context)
.nextWeek,
TranslationBase.of(context).previous,
TranslationBase.of(context).today,
TranslationBase.of(context).nextWeek,
];
final screenSize = MediaQuery
.of(context)
.size;
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
@ -105,148 +99,155 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
isShowAppBar: true,
appBar: PatientSearchHeader(
title: "My Out patient",
),
baseViewModel: model,
body: Column(
children: [
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils
.containerBorderDecoration(
Color(0Xffffffff),
Color(0xFFCCCCCC),
borderRadius: 4,
borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _times.map((item) {
bool _isActive = _times[_activeLocation] == item
? true
: false;
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _times.map((item) {
bool _isActive =
_times[_activeLocation] == item ? true : false;
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeLocation = _times.indexOf(item);
outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==1?OutPatientFilterType.Today:OutPatientFilterType.NextWeek;
_controller.text="";
});
model.searchData("");
FocusScope.of(context).requestFocus(new FocusNode());
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo, outPatientFilterType: outPatientFilterType);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
_isActive&&_activeLocation!=0&&model.state == ViewState.Idle ?Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.symmetric(horizontal: 5),
decoration:
new BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(
50),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
model.filterData.length.toString(),
style: new TextStyle(
color: Colors.red,
fontSize: 10
),
textAlign:
TextAlign.center,
),
):Container(),
],
),
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeLocation = _times.indexOf(item);
outPatientFilterType = _activeLocation == 0
? OutPatientFilterType.Previous
: _activeLocation == 1
? OutPatientFilterType.Today
: OutPatientFilterType.NextWeek;
_controller.text = "";
});
model.searchData("");
FocusScope.of(context).requestFocus(new FocusNode());
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(
item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel:
widget.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo,
outPatientFilterType: outPatientFilterType);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration:
TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive
? Color(0xFFD02127)
: Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive
? Colors.white
: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
_isActive &&
_activeLocation != 0 &&
model.state == ViewState.Idle
? Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.symmetric(
horizontal: 5),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(50),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
model.filterData.length.toString(),
style: new TextStyle(
color: Colors.red,
fontSize: 10),
textAlign: TextAlign.center,
),
)
: Container(),
],
),
),
),
),
);
}).toList(),
),
),
);
}).toList(),
),
),
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"),
),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
padding: EdgeInsets.only(left: 10, top: 10),
child: AppText(
TranslationBase.of(
context)
.searchPatientName,
TranslationBase.of(context).searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white
,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
_activeLocation !=0
_activeLocation != 0
? DoctorApp.filter_1
: FontAwesomeIcons.slidersH,
color: Colors.black,
),
iconSize: 20,
padding:
EdgeInsets.only(
bottom: 30),
onPressed: _activeLocation !=0 ? null : () {
Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) =>
FilterDatePage(outPatientFilterType: outPatientFilterType,patientSearchViewModel: model,)));
},
padding: EdgeInsets.only(bottom: 30),
onPressed: _activeLocation != 0
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
FilterDatePage(
outPatientFilterType:
outPatientFilterType,
patientSearchViewModel:
model,
)));
},
),
onChanged: (String str) {
model.searchData(str);
}),
@ -254,58 +255,60 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
SizedBox(
height: 10.0,
),
Expanded(
child: Container(
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
),
)
: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) {
if(_activeLocation !=0 || (model.filterData[index].patientStatusType !=null && model.filterData[index].patientStatusType==43))
return
Padding(
padding: EdgeInsets.all(8.0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
isFromSearch:widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": model.filterData[index],
"patientType": "1",
"from": widget
.patientSearchRequestModel.from,
"to": widget
.patientSearchRequestModel.from,
"isSearch": false,
"isInpatient": false,
"arrivalType": "7",
"isSearchAndOut": false,
});
},
// isFromSearch: widget.isSearch,
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
),
);
else
return SizedBox();
})),
)
: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) {
if (_activeLocation != 0 ||
(model.filterData[index].patientStatusType !=
null &&
model.filterData[index]
.patientStatusType ==
43))
return Padding(
padding: EdgeInsets.all(8.0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
isFromSearch: widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": model.filterData[index],
"patientType": "1",
"from": widget
.patientSearchRequestModel.from,
"to": widget
.patientSearchRequestModel.from,
"isSearch": false,
"isInpatient": false,
"arrivalType": "7",
"isSearchAndOut": false,
});
},
// isFromSearch: widget.isSearch,
),
);
else
return SizedBox();
})),
),
],
)
),
)),
);
}
}

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -14,7 +14,9 @@ import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
@ -29,10 +31,8 @@ class PatientsSearchResultScreen extends StatefulWidget {
final bool isSearchAndOut;
final String searchKey;
PatientsSearchResultScreen(
{
this.selectedPatientType,
{this.selectedPatientType,
this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
@ -50,7 +50,6 @@ class _PatientsSearchResultScreenState
int clinicId;
AuthViewModel authProvider;
String patientType;
String patientTypeTitle;
var selectedFilter = 1;
@ -61,77 +60,69 @@ class _PatientsSearchResultScreenState
PatientModel patient;
@override
Widget build(BuildContext context) {
authProvider = Provider.of(context);
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
if(!widget.isSearchWithKeyInfo && widget.selectedPatientType == PatientType.OutPatient) {
if (!widget.isSearchWithKeyInfo &&
widget.selectedPatientType == PatientType.OutPatient) {
await model.getOutPatient(widget.patientSearchRequestModel);
} else {
await model.getPatientFileInformation(widget.patientSearchRequestModel);
await model
.getPatientFileInformation(widget.patientSearchRequestModel);
}
},
builder: (_, model, w) => AppScaffold(
appBarTitle: "Search Patient",
isShowAppBar: true,
appBarTitle: "Search Patient",
isShowAppBar: true,
appBar: PatientSearchHeader(
title: "Search for ${widget.searchKey}",
),
baseViewModel: model,
body: Column(
children: [
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"),
),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
child: AppText(
TranslationBase.of(
context)
.searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
baseViewModel: model,
body: Column(
children: [
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"),
),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 10, top: 10),
child: AppText(
TranslationBase.of(context).searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
),
iconSize: 20,
padding:
EdgeInsets.only(
bottom: 30),
),
onChanged: (String str) {
model.searchData(str);
}),
])),
SizedBox(
height: 10.0,
),
Expanded(
child: Container(
onChanged: (String str) {
model.searchData(str);
}),
])),
SizedBox(
height: 10.0,
),
Expanded(
child: Container(
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
@ -150,8 +141,8 @@ class _PatientsSearchResultScreenState
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
isFromSearch:widget.isSearchAndOut,
isInpatient: widget.isInpatient,
isFromSearch: widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
@ -166,17 +157,17 @@ class _PatientsSearchResultScreenState
"isSearch": widget.isSearch,
"isInpatient": widget.isInpatient,
"arrivalType": "7",
"isSearchAndOut": widget.isSearchAndOut,
"isSearchAndOut":
widget.isSearchAndOut,
});
},
// isFromSearch: widget.isSearch,
// isFromSearch: widget.isSearch,
),
);
})),
),
],
)
),
],
)),
);
}
}

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -33,7 +33,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
@override
Widget build(BuildContext context) {
authProvider =Provider.of(context);
authProvider = Provider.of(context);
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => AppScaffold(
@ -68,23 +68,23 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
isTextFieldHasSuffix: false,
maxLines: 1,
minLines: 1,
inputType:TextInputType.number,
inputType: TextInputType.number,
hasBorder: true,
controller: patientFileInfoController,
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS))
],
onChanged: (_){},
validationError: (isFormSubmitted && (
patientFileInfoController
onChanged: (_) {},
validationError: (isFormSubmitted &&
(patientFileInfoController
.text.isEmpty &&
firstNameInfoController
.text.isEmpty &&
middleNameInfoController
.text.isEmpty &&
lastNameFileInfoController
.text.isEmpty))
firstNameInfoController
.text.isEmpty &&
middleNameInfoController
.text.isEmpty &&
lastNameFileInfoController
.text.isEmpty))
? TranslationBase.of(context).emptyMessage
: null,
),
@ -147,11 +147,21 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
isFormSubmitted = true;
});
PatientSearchRequestModel patientSearchRequestModel =
PatientSearchRequestModel(doctorID: authProvider.doctorProfile.doctorID);
PatientSearchRequestModel(
doctorID: authProvider.doctorProfile.doctorID);
if (showOther) {
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty?"0":firstNameInfoController.text.trim();
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty?"0":middleNameInfoController.text.trim();
patientSearchRequestModel.lastName = lastNameFileInfoController.text.isEmpty?"0":lastNameFileInfoController.text.trim();
patientSearchRequestModel.firstName =
firstNameInfoController.text.trim().isEmpty
? "0"
: firstNameInfoController.text.trim();
patientSearchRequestModel.middleName =
middleNameInfoController.text.trim().isEmpty
? "0"
: middleNameInfoController.text.trim();
patientSearchRequestModel.lastName =
lastNameFileInfoController.text.isEmpty
? "0"
: lastNameFileInfoController.text.trim();
}
if (patientFileInfoController.text.isNotEmpty) {
@ -194,7 +204,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
isSearchWithKeyInfo:
patientFileInfoController.text.isNotEmpty ? true : false,
isSearch: true,
isSearchAndOut:true,
isSearchAndOut: true,
searchKey: patientFileInfoController.text,
isInpatient: false,
),

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
@ -13,15 +13,18 @@ class TimeBar extends StatefulWidget {
final PatientSearchRequestModel patientSearchRequestModel;
final bool isSearchWithKeyInfo;
const TimeBar({Key key, this.model, this.selectedPatientType, this.patientSearchRequestModel, this.isSearchWithKeyInfo}) : super(key: key);
const TimeBar(
{Key key,
this.model,
this.selectedPatientType,
this.patientSearchRequestModel,
this.isSearchWithKeyInfo})
: super(key: key);
@override
_TimeBarState createState() => _TimeBarState();
}
class _TimeBarState extends State<TimeBar> {
@override
Widget build(BuildContext context) {
List _locations = [
@ -74,25 +77,30 @@ class _TimeBarState extends State<TimeBar> {
),
)),
),
onTap: () async{
onTap: () async {
setState(() {
_activeLocation = _locations.indexOf(item);
});
GifLoaderDialogUtils.showMyDialog(context);
await widget.model.getPatientBasedOnDate(item:item,selectedPatientType:widget.selectedPatientType, patientSearchRequestModel:widget.patientSearchRequestModel, isSearchWithKeyInfo:widget.isSearchWithKeyInfo);
await widget.model.getPatientBasedOnDate(
item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel:
widget.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context);
}),
_isActive
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10),
topRight: Radius.circular(10)),
color: Colors.white),
alignment: Alignment.center,
height: 1,
width: SizeConfig.screenWidth * 0.23,
)
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10),
topRight: Radius.circular(10)),
color: Colors.white),
alignment: Alignment.center,
height: 1,
width: SizeConfig.screenWidth * 0.23,
)
: Container()
]);
}).toList(),

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
@ -107,7 +107,7 @@ class _AddReplayOnReferralPatientState
),
),
bottomSheet: Container(
height: replayOnReferralController.text.isNotEmpty? 130:70,
height: replayOnReferralController.text.isNotEmpty ? 130 : 70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Column(
children: <Widget>[

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -19,7 +19,8 @@ import 'AddReplayOnReferralPatient.dart';
class ReferralPatientDetailScreen extends StatelessWidget {
final MyReferralPatientModel referredPatient;
final PatientReferralViewModel patientReferralViewModel;
ReferralPatientDetailScreen(this.referredPatient, this.patientReferralViewModel);
ReferralPatientDetailScreen(
this.referredPatient, this.patientReferralViewModel);
@override
Widget build(BuildContext context) {
@ -68,16 +69,18 @@ class ReferralPatientDetailScreen extends StatelessWidget {
),
InkWell(
onTap: () {
PatiantInformtion patient =
model.getPatientFromReferralO(referredPatient);
PatiantInformtion patient = model
.getPatientFromReferralO(referredPatient);
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient,
"patientType": "1",
"isInpatient": true,
"arrivalType": "1",
"from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"from": DateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
});
},
child: Icon(
@ -94,16 +97,18 @@ class ReferralPatientDetailScreen extends StatelessWidget {
children: [
InkWell(
onTap: () {
PatiantInformtion patient =
model.getPatientFromReferralO(referredPatient);
PatiantInformtion patient = model
.getPatientFromReferralO(referredPatient);
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient,
"patientType": "1",
"isInpatient": true,
"arrivalType": "1",
"from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"from": DateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
});
},
child: Padding(
@ -153,7 +158,9 @@ class ReferralPatientDetailScreen extends StatelessWidget {
: Colors.red[700],
),
AppText(
DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,),
DateUtils.getDayMonthYearDateFormatted(
referredPatient.referralDate,
),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier,
@ -189,7 +196,9 @@ class ReferralPatientDetailScreen extends StatelessWidget {
],
),
AppText(
DateUtils.getTimeHHMMA(referredPatient.referralDate,),
DateUtils.getTimeHHMMA(
referredPatient.referralDate,
),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier,
@ -469,7 +478,6 @@ class ReferralPatientDetailScreen extends StatelessWidget {
SizedBox(
height: 8,
),
],
),
),
@ -489,7 +497,12 @@ class ReferralPatientDetailScreen extends StatelessWidget {
Navigator.push(
context,
SlideUpPageRoute(
widget: AddReplayOnReferralPatient(patientReferralViewModel: patientReferralViewModel,myReferralInPatientModel: referredPatient,),),);
widget: AddReplayOnReferralPatient(
patientReferralViewModel: patientReferralViewModel,
myReferralInPatientModel: referredPatient,
),
),
);
},
),
),

@ -1,7 +1,7 @@
// ignore: must_be_immutable
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';

@ -2,9 +2,10 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';

@ -1,8 +1,9 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -664,7 +665,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
child: TextField(
decoration: Helpers
.textFieldSelectorDecoration(
DateUtils.getDateFormatted(
DateUtils.getDateFormatted(
DateTime.parse(
widget.startDate)),
selectedDate != null

@ -15,8 +15,8 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../routes.dart';
import 'base/base_view.dart';
import '../../routes.dart';
import '../base/base_view.dart';
Helpers helpers = Helpers();
@ -94,7 +94,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
height: 35,
),
AppButton(
title : TranslationBase.of(context).scanQr,
title: TranslationBase.of(context).scanQr,
onPressed: () {
_scanQrAndGetPatient(context, model);
},

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
@ -51,11 +52,11 @@ class AddSickLeavScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(!projectsProvider.isArabic)
AppText(
TranslationBase.of(context).patient,
fontWeight: FontWeight.bold,
),
if (!projectsProvider.isArabic)
AppText(
TranslationBase.of(context).patient,
fontWeight: FontWeight.bold,
),
AppText(
TranslationBase.of(context).sickLeave,
fontSize: 24,
@ -194,9 +195,10 @@ class AddSickLeavScreen extends StatelessWidget {
),
Flexible(
child: AppText(
DateUtils.getDayMonthYearDateFormatted(DateUtils
.convertStringToDate(
item.startDate)),
DateUtils.getDayMonthYearDateFormatted(
DateUtils
.convertStringToDate(
item.startDate)),
fontWeight:
FontWeight.bold,
),
@ -213,8 +215,10 @@ class AddSickLeavScreen extends StatelessWidget {
),
Flexible(
child: AppText(
DateUtils.getDayMonthYearDateFormatted(DateUtils
.convertStringToDate(
DateUtils
.getDayMonthYearDateFormatted(
DateUtils
.convertStringToDate(
item.endDate,
)),
fontWeight:

@ -1,7 +1,7 @@
import 'dart:io' show Platform;
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/imei_details.dart';
import 'package:doctor_app_flutter/core/model/auth/imei_details.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/auth/activation_Code_req_model.dart';
import 'package:doctor_app_flutter/models/auth/check_activation_code_request_model.dart';

@ -77,7 +77,7 @@ class SMSOTP {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.all(12),
padding: EdgeInsets.all(13),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [

@ -615,7 +615,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -907,7 +907,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.1"
sticky_headers:
dependency: "direct main"
description:
@ -1098,5 +1098,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <=2.11.0-213.1.beta"
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save