fix Prescriptions Service and design issues

merge-update-with-lab-changes
Mohammad Aljammal 5 years ago committed by Mohammad Aljammal
parent 62b923b25e
commit 2f77592bac

@ -1192,4 +1192,8 @@ const Map localizedValues = {
"en": "Dr. ",
"ar": "الدكتور."
},
"sendSuc":{
"en":"A copy has been sent to the email",
"ar":"تم إرسال نسخة إلى البريد الإلكتروني"
},
};

@ -82,7 +82,7 @@ class RequestPrescriptionReport {
data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID;
// data['DischargeNo'] = this.dischargeNo;
data['DischargeNo'] = this.dischargeNo;
return data;
}
}

@ -72,6 +72,7 @@ class PrescriptionsService extends BaseService {
prescriptionReportEnhList.clear();
if(prescriptions.isInOutPatient){
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{

@ -119,6 +119,7 @@ class PrescriptionsViewModel extends BaseViewModel {
int patientID,
String clinicName,
String doctorName,
String mes,
int projectID}) async {
setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(
@ -128,7 +129,7 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal);
AppToast.showErrorToast(message: error);
} else {
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail');
AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle);
}
}

@ -80,7 +80,7 @@ class RadiologyViewModel extends BaseViewModel {
}
sendRadReportEmail(
{FinalRadiology finalRadiology}) async {
{FinalRadiology finalRadiology,String mes}) async {
setState(ViewState.BusyLocal);
await _radiologyService.sendRadReportEmail(
finalRadiology: finalRadiology
@ -89,7 +89,7 @@ class RadiologyViewModel extends BaseViewModel {
error = _radiologyService.error;
AppToast.showErrorToast(message: error);
} else {
AppToast.showSuccessToast(message: 'A copy has been sent to the email');
AppToast.showSuccessToast(message: mes);
}
setState(ViewState.Idle);
}

@ -63,6 +63,7 @@ class PrescriptionItemsPage extends StatelessWidget {
height: 70,
),
),
SizedBox(width: 10,),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
@ -121,6 +122,7 @@ class PrescriptionItemsPage extends StatelessWidget {
height: 70,
),
),
SizedBox(width: 10,),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
@ -133,6 +135,11 @@ class PrescriptionItemsPage extends StatelessWidget {
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
@ -157,6 +164,7 @@ class PrescriptionItemsPage extends StatelessWidget {
patientID: prescriptions.patientID,
clinicName: prescriptions.companyName,
doctorName: prescriptions.doctorName,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID),
loading: model.state == ViewState.BusyLocal,
),

@ -60,6 +60,7 @@ class RadiologyDetailsPage extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () => model.sendRadReportEmail(
mes: TranslationBase.of(context).sendSuc,
finalRadiology: finalRadiology),
label: TranslationBase.of(context).sendCopyRad,
loading: model.state == ViewState.BusyLocal,

@ -146,7 +146,7 @@ class PharmaciesList extends StatelessWidget {
child: InkWell(
child: Icon(
Icons.phone,
color: Colors.red,
color: Theme.of(context).primaryColor,
),
onTap: () => launch("tel://" +
model.pharmacyList[index].phoneNumber),
@ -157,7 +157,7 @@ class PharmaciesList extends StatelessWidget {
child: InkWell(
child: Icon(
Icons.local_pharmacy,
color: Colors.red,
color: Theme.of(context).primaryColor,
),
onTap: () {
MapsLauncher.launchCoordinates(

@ -949,6 +949,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get notActive => localizedValues['not-active'][locale.languageCode];
String get cardDetail => localizedValues['card-detail'][locale.languageCode];
String get dr => localizedValues['Dr'][locale.languageCode];
String get sendSuc => localizedValues['sendSuc'][locale.languageCode];
}

@ -50,6 +50,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
),
),
),
SizedBox(width: 10,),
Expanded(
child: Center(
child: Padding(

Loading…
Cancel
Save