|
|
|
|
@ -26,6 +26,7 @@ import '../../../routes.dart';
|
|
|
|
|
class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
bool isFromSearch = false;
|
|
|
|
|
bool isInpatient = false;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -40,6 +41,9 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
if (routeArgs.containsKey("isSearch")) {
|
|
|
|
|
isFromSearch = routeArgs['isSearch'];
|
|
|
|
|
}
|
|
|
|
|
if (routeArgs.containsKey("isInpatient")) {
|
|
|
|
|
isInpatient = routeArgs['isInpatient'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return BaseView<PatientViewModel>(
|
|
|
|
|
onModelReady: (patientViewModel) async {
|
|
|
|
|
@ -66,14 +70,14 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
PatientOutSA: false);
|
|
|
|
|
|
|
|
|
|
if (patientType == "1" &&
|
|
|
|
|
(patient.admissionNo == null ||
|
|
|
|
|
patient.admissionNo == "0")) {
|
|
|
|
|
(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;
|
|
|
|
|
List<PatiantInformtion> patientList =
|
|
|
|
|
ModelResponse.fromJson(response['List_MyInPatient']).list;
|
|
|
|
|
patient.admissionNo = patientList[0].admissionNo;
|
|
|
|
|
patient.admissionDate = patientList[0].admissionDate;
|
|
|
|
|
} else {
|
|
|
|
|
@ -81,7 +85,7 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catchError((error) {
|
|
|
|
|
print(error);
|
|
|
|
|
print(error);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -108,16 +112,16 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
isFromSearch
|
|
|
|
|
? ProfileMedicalInfoWidgetSearch(
|
|
|
|
|
isInpatient
|
|
|
|
|
? ProfileMedicalInfoWidgetInPatient(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
)
|
|
|
|
|
: patientType == "1"
|
|
|
|
|
? ProfileMedicalInfoWidgetInPatient(
|
|
|
|
|
: isFromSearch
|
|
|
|
|
? ProfileMedicalInfoWidgetSearch(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
@ -139,7 +143,8 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (patient.patientStatusType !=null && patient.patientStatusType == 43 )
|
|
|
|
|
if (patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43)
|
|
|
|
|
BaseView<SOAPViewModel>(
|
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
|
builder: (_, model, w) => Positioned(
|
|
|
|
|
|