fix Prescriptions

merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
parent 221091c5f0
commit 67cc5e2033

@ -244,8 +244,8 @@ const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw'; const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false; const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 2; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 2; const PATIENT_TYPE_ID = 1;
var DEVICE_TOKEN = ""; var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2; var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;

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

@ -57,13 +57,14 @@ class PrescriptionsService extends BaseService {
List<PrescriptionReport> prescriptionReportList = List(); List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport( Future getPrescriptionReport(
{int dischargeNo, int projectId, int clinicID, String setupID,int episodeID}) async { {Prescriptions prescriptions}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = projectId; _requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = clinicID; _requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = setupID; _requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = episodeID; _requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.post(GET_PRESCRIPTION_REPORT, await baseAppClient.post(GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -103,9 +103,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID,int episodeID}) async { getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID,episodeID: episodeID); await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -20,7 +20,7 @@ class PrescriptionItemsPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo,setupID:prescriptions.setupID,clinicID: prescriptions.clinicID,projectId: prescriptions.projectID,episodeID: prescriptions.episodeID), model.getPrescriptionReport(prescriptions: prescriptions),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions, appBarTitle: TranslationBase.of(context).prescriptions,

Loading…
Cancel
Save