hot fixes

merge-requests/547/head
Mohammad Aljammal 5 years ago
parent 9e8aef0835
commit 0ded3a5a03

@ -175,25 +175,25 @@ class PatiantInformtion {
startTime: json["startTime"], startTime: json["startTime"],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'], appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'], appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId'], appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'],
arrivedOn: json['arrivedOn'], arrivedOn: json['arrivedOn'],
clinicGroupId: json['clinicGroupId'], clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'], companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'], dischargeStatus: json['dischargeStatus'],
doctorDetails: json['doctorDetails'], doctorDetails: json['doctorDetails'],
endTime: json['endTime'], endTime: json['endTime'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'], episodeNo: json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'],
fallRiskScore: json['fallRiskScore'], fallRiskScore: json['fallRiskScore'],
isSigned: json['isSigned'], isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'], medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'], nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ?? json['PatientMRN'], patientMRN: json['patientMRN'] ?? json['PatientMRN'],
visitType: json['visitType'] ?? json['visitType'], visitType: json['visitType'] ?? json['visitType']?? json['visitType'],
nationalityFlagURL: nationalityFlagURL:
json['NationalityFlagURL'] ?? json['NationalityFlagURL'], json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
patientStatusType: patientStatusType:
json['patientStatusType'] ?? json['patientStatusType'], json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'], visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'], startTimes: json['StartTime'] ?? json['StartTime'],
); );
} }

@ -31,7 +31,7 @@ class LabsHomePage extends StatelessWidget {
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
print(arrivalType); print(arrivalType);
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient,isArrived: (patientType != null && patientType == '7' && patient.patientStatusType == 43)), onModelReady: (model) => model.getLabs(patient,isArrived: ( patient.patientStatusType == 43)),
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],

@ -43,57 +43,47 @@ class PatientProfileScreen extends StatelessWidget {
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(
onModelReady: (patientViewModel) async { onModelReady: (patientViewModel) async {
PatientModel patientReq = PatientModel( PatientModel patientReq = PatientModel(
ProjectID: 0, ProjectID: 0,
ClinicID: 0, ClinicID: 0,
DoctorID: 0, DoctorID: 0,
FirstName: "0", FirstName: "0",
MiddleName: "0", MiddleName: "0",
LastName: "0", LastName: "0",
PatientMobileNumber: "0", PatientMobileNumber: "0",
PatientIdentificationID: "0", PatientIdentificationID: "0",
PatientID: patient.patientId, PatientID: patient.patientId,
From: "0", From: "0",
To: "0", To: "0",
LanguageID: 2, LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z", stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11", IPAdress: "11.11.11.11",
VersionID: 1.2, VersionID: 1.2,
Channel: 9, Channel: 9,
TokenID: "@dm!n", TokenID: "@dm!n",
SessionID: "5G0yXn0Jnq", SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true, IsLoginForDoctorApp: true,
PatientOutSA: false); PatientOutSA: false);
if(patient.patientType ==1 || patient.admissionNo==null || patient.admissionNo =="0" ) { if (patientType == "1" &&
patientViewModel.getPatientList(patientReq, "1", isBusyLocal: false).then((response) { (patient.admissionNo == null ||
if (response['MessageStatus'] == 1) { patient.admissionNo == "0")) {
patientViewModel
if (response['List_MyInPatient'] != null) { .getPatientList(patientReq, "1", isBusyLocal: false)
.then((response) {
List<PatiantInformtion> patientList = if (response['MessageStatus'] == 1) {
ModelResponse.fromJson(response['List_MyInPatient']) if (response['List_MyInPatient'] != null) {
.list; List<PatiantInformtion> patientList = ModelResponse.fromJson(response['List_MyInPatient']).list;
patient.admissionNo = patientList[0].admissionNo; patient.admissionNo = patientList[0].admissionNo;
patient.admissionDate = patientList[0].admissionDate; patient.admissionDate = patientList[0].admissionDate;
} else { } else {
DrAppToastMsg.showErrorToast('No patient');
DrAppToastMsg.showErrorToast('No patient');
}
} }
}
}).catchError((error) { }).catchError((error) {
// setState(() { print(error);
// isLoading = false; });
// }); }
Helpers.showErrorToast(error.message);
//DrAppToastMsg.showErrorToast(error);
});
}
}, },
builder: (_, patientViewModel, w) => AppScaffold( builder: (_, patientViewModel, w) => AppScaffold(
baseViewModel: patientViewModel, baseViewModel: patientViewModel,
@ -109,9 +99,9 @@ class PatientProfileScreen extends StatelessWidget {
children: [ children: [
!isFromSearch && patientType == "1" !isFromSearch && patientType == "1"
? PatientProfileHeaderNewDesignInPatient( ? PatientProfileHeaderNewDesignInPatient(
patient, patientType, arrivalType) patient, patientType, arrivalType)
: PatientProfileHeaderNewDesign( : PatientProfileHeaderNewDesign(
patient, patientType, arrivalType), patient, patientType, arrivalType),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
@ -120,8 +110,8 @@ class PatientProfileScreen extends StatelessWidget {
children: [ children: [
isFromSearch isFromSearch
? ProfileMedicalInfoWidgetSearch( ? ProfileMedicalInfoWidgetSearch(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
@ -149,82 +139,89 @@ class PatientProfileScreen extends StatelessWidget {
], ],
), ),
), ),
if (int.parse(patientType) == 7 || if (patient.patientStatusType !=null && patient.patientStatusType == 43 )
int.parse(patientType) == 6) BaseView<SOAPViewModel>(
BaseView<SOAPViewModel>( onModelReady: (model) async {},
onModelReady: (model) async { builder: (_, model, w) => Positioned(
}, top: 175,
builder: (_, model, w) => Positioned( left: 20,
top: 175, right: 20,
left: 20, child: Row(
right: 20, children: [
child: Row( Expanded(child: Container()),
children: [ if (patient.episodeNo == 0)
Expanded(child: Container()), AppButton(
if (patient.episodeNo == 0) title:
AppButton( "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
title: color: patient.patientStatusType == 43
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", ? Colors.red.shade700
color: patient.patientStatusType == 43 : Colors.grey.shade700,
? Colors.red.shade700 fontColor: Colors.white,
: Colors.grey.shade700, vPadding: 8,
fontColor: Colors.white, radius: 30,
vPadding: 8, hPadding: 20,
radius: 30, fontWeight: FontWeight.normal,
hPadding: 20, fontSize: 1.6,
fontWeight: FontWeight.normal, icon: Image.asset(
fontSize: 1.6, "assets/images/create-episod.png",
icon: Image.asset( color: Colors.white,
"assets/images/create-episod.png", height: 30,
color: Colors.white, ),
height: 30, onPressed: () async {
if (patient.patientStatusType == 43) {
PostEpisodeReqModel
postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo:
patient.appointmentNo,
patientMRN:
patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(
context);
await model.postEpisode(
postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(
context);
patient.episodeNo = model.episodeID;
Navigator.of(context).pushNamed(
CREATE_EPISODE,
arguments: {
'patient': patient
});
}
},
),
if (patient.episodeNo != 0)
AppButton(
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
hPadding: 20,
fontWeight: FontWeight.normal,
fontSize: 1.6,
icon: Image.asset(
"assets/images/modilfy-episode.png",
color: Colors.white,
height: 30,
),
onPressed: () {
if (patient.patientStatusType ==
43) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {
'patient': patient
});
}
}),
],
), ),
onPressed: () async { )),
if (patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo:
patient.appointmentNo,
patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context);
await model
.postEpisode(postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(context);
patient.episodeNo = model.episodeID;
Navigator.of(context).pushNamed(
CREATE_EPISODE,
arguments: {'patient': patient});
}
},
),
if (patient.episodeNo != 0)
AppButton(
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
hPadding: 20,
fontWeight: FontWeight.normal,
fontSize: 1.6,
icon: Image.asset(
"assets/images/modilfy-episode.png",
color: Colors.white,
height: 30,
),
onPressed: () {
if (patient.patientStatusType == 43) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {'patient': patient});
}
}),
],
),
)),
], ],
), ),
), ),
@ -254,4 +251,3 @@ class AvatarWidget extends StatelessWidget {
); );
} }
} }

Loading…
Cancel
Save