|
|
|
|
@ -26,6 +26,7 @@ import '../../../routes.dart';
|
|
|
|
|
class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
bool isFromSearch = false;
|
|
|
|
|
bool isInpatient = false;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -39,52 +40,10 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
String to = routeArgs['to'];
|
|
|
|
|
if (routeArgs.containsKey("isSearch")) {
|
|
|
|
|
isFromSearch = routeArgs['isSearch'];
|
|
|
|
|
isInpatient = routeArgs['isInpatient'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return BaseView<PatientViewModel>(
|
|
|
|
|
onModelReady: (patientViewModel) async {
|
|
|
|
|
PatientModel patientReq = PatientModel(
|
|
|
|
|
ProjectID: 0,
|
|
|
|
|
ClinicID: 0,
|
|
|
|
|
DoctorID: 0,
|
|
|
|
|
FirstName: "0",
|
|
|
|
|
MiddleName: "0",
|
|
|
|
|
LastName: "0",
|
|
|
|
|
PatientMobileNumber: "0",
|
|
|
|
|
PatientIdentificationID: "0",
|
|
|
|
|
PatientID: patient.patientId,
|
|
|
|
|
From: "0",
|
|
|
|
|
To: "0",
|
|
|
|
|
LanguageID: 2,
|
|
|
|
|
stamp: "2020-03-02T13:56:39.170Z",
|
|
|
|
|
IPAdress: "11.11.11.11",
|
|
|
|
|
VersionID: 1.2,
|
|
|
|
|
Channel: 9,
|
|
|
|
|
TokenID: "@dm!n",
|
|
|
|
|
SessionID: "5G0yXn0Jnq",
|
|
|
|
|
IsLoginForDoctorApp: true,
|
|
|
|
|
PatientOutSA: false);
|
|
|
|
|
|
|
|
|
|
if (patientType == "1" &&
|
|
|
|
|
(patient.admissionNo == null ||
|
|
|
|
|
patient.admissionNo == "0")) {
|
|
|
|
|
patientViewModel
|
|
|
|
|
.getPatientList(patientReq, "1", isBusyLocal: false)
|
|
|
|
|
.then((response) {
|
|
|
|
|
if (response['MessageStatus'] == 1) {
|
|
|
|
|
if (response['List_MyInPatient'] != null) {
|
|
|
|
|
List<PatiantInformtion> patientList = ModelResponse.fromJson(response['List_MyInPatient']).list;
|
|
|
|
|
patient.admissionNo = patientList[0].admissionNo;
|
|
|
|
|
patient.admissionDate = patientList[0].admissionDate;
|
|
|
|
|
} else {
|
|
|
|
|
DrAppToastMsg.showErrorToast('No patient');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catchError((error) {
|
|
|
|
|
print(error);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
builder: (_, patientViewModel, w) => AppScaffold(
|
|
|
|
|
baseViewModel: patientViewModel,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).patientProfile,
|
|
|
|
|
@ -115,21 +74,27 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
isInpatient:false
|
|
|
|
|
// isFromSearch:isFromSearch
|
|
|
|
|
)
|
|
|
|
|
: patientType == "1"
|
|
|
|
|
: isInpatient
|
|
|
|
|
? ProfileMedicalInfoWidgetInPatient(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
)
|
|
|
|
|
isInpatient:isInpatient,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
: ProfileMedicalInfoWidget(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
isInpatient:isInpatient
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|