Merge branch 'fix-issues' into 'development'

Fix issues

See merge request Cloud_Solution/doctor_app_flutter!360
merge-requests/361/merge
Mohammad Aljammal 4 years ago
commit f74eadd987

@ -1,18 +1,21 @@
class PrescriptionReqModel {
String vidaAuthTokenID;
dynamic patientMRN;
dynamic appNo;
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN});
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN, this.appNo});
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN'];
appNo = json['AppointmentNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appNo;
return data;
}
}

@ -82,7 +82,9 @@ class PrescriptionService extends LookupService {
}
Future getPrescription({int mrn}) async {
_prescriptionReqModel = PrescriptionReqModel(patientMRN: mrn);
_prescriptionReqModel = PrescriptionReqModel(
patientMRN: mrn,
);
hasError = false;
_prescriptionList.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST,

@ -31,128 +31,122 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Center(
child: Container(
color: Colors.white,
child: Column(
// mainAxisAlignment: model.medicalFileList.length != 0 &&
// model.medicalFileList != null
// ? MainAxisAlignment.start
// : MainAxisAlignment.center,
children: [
PatientPageHeaderWidget(patient),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
(model.medicalFileList.length != 0 &&
model.medicalFileList != null)
? ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicalFileList[0].entityList[0]
.timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context)
.branch +
": ",
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.doctorName
.toUpperCase() +
": ",
fontWeight: FontWeight.w700,
),
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
),
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(
child: Container(
color: Colors.white,
child: Column(
// mainAxisAlignment: model.medicalFileList.length != 0 &&
// model.medicalFileList != null
// ? MainAxisAlignment.start
// : MainAxisAlignment.center,
children: [
PatientPageHeaderWidget(patient),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
(model.medicalFileList != null &&
model.medicalFileList.length != 0)
? ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicalFileList[0].entityList[0]
.timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).branch +
": ",
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.doctorName
.toUpperCase() +
": ",
fontWeight: FontWeight.w700,
),
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
.doctorName,
fontWeight: FontWeight.w700,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
),
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender:
patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
)),
);
},
),
);
})
: Center(
child: Container(
child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
)),
);
},
),
),
)
],
),
);
})
: Container(
child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
),
)
],
),
),
),

@ -35,7 +35,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescription(mrn: 0),
onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
builder:
(BuildContext context, PrescriptionViewModel model, Widget child) =>
AppScaffold(

@ -26,7 +26,6 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
crossAxisCount: 2,
childAspectRatio: 1.5,
children: [
PatientProfileButton(
key: key,
patient: patient,
@ -66,22 +65,21 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
// nameLine1: TranslationBase.of(context).admission,
// nameLine2: TranslationBase.of(context).request,
// icon: 'heartbeat.png'),
// (int.parse(patientType) == 7 || int.parse(patientType) == 6)
// ? PatientProfileButton(
// key: key,
// patient: patient,
// route: ORDER_PRESCRIPTION,
// nameLine1: TranslationBase.of(context).orders,
// nameLine2: TranslationBase.of(context).prescription,
// icon: 'lab.png')
// :
PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION_HISTORY,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png'),
(int.parse(patientType) == 7 || int.parse(patientType) == 6)
? PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png')
: PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION_HISTORY,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,

Loading…
Cancel
Save