Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into episode_inpatient_changes

 Conflicts:
	lib/screens/patients/InPatientPage.dart
merge-requests/825/head
Elham Rababh 4 years ago
commit 8fc4b1596b

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
@ -240,6 +240,7 @@ const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue";
const CREATE_DOCTOR_RESPONSE = "Services/DoctorApplication.svc/REST/CreateDoctorResponse";
const GET_DOCTOR_NOT_REPLIED_COUNTS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts";
const ALL_SPECIAL_LAB_RESULT = "services/Patients.svc/REST/GetPatientLabSpecialResultsALL";
const GET_MEDICATION_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient";
const GET_EPISODE_FOR_INPATIENT = "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient";
var selectedPatientType = 1;

@ -0,0 +1,136 @@
class GetMedicationForInPatientModel {
String setupID;
int projectID;
int admissionNo;
int patientID;
int orderNo;
int prescriptionNo;
int lineItemNo;
String prescriptionDatetime;
int itemID;
int directionID;
int refillID;
String dose;
int unitofMeasurement;
String startDatetime;
String stopDatetime;
int noOfDoses;
int routeId;
String comments;
int reviewedPharmacist;
dynamic reviewedPharmacistDatetime;
dynamic discountinueDatetime;
dynamic rescheduleDatetime;
int status;
String statusDescription;
int createdBy;
String createdOn;
dynamic editedBy;
dynamic editedOn;
dynamic strength;
String pHRItemDescription;
String pHRItemDescriptionN;
GetMedicationForInPatientModel(
{this.setupID,
this.projectID,
this.admissionNo,
this.patientID,
this.orderNo,
this.prescriptionNo,
this.lineItemNo,
this.prescriptionDatetime,
this.itemID,
this.directionID,
this.refillID,
this.dose,
this.unitofMeasurement,
this.startDatetime,
this.stopDatetime,
this.noOfDoses,
this.routeId,
this.comments,
this.reviewedPharmacist,
this.reviewedPharmacistDatetime,
this.discountinueDatetime,
this.rescheduleDatetime,
this.status,
this.statusDescription,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.strength,
this.pHRItemDescription,
this.pHRItemDescriptionN});
GetMedicationForInPatientModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
admissionNo = json['AdmissionNo'];
patientID = json['PatientID'];
orderNo = json['OrderNo'];
prescriptionNo = json['PrescriptionNo'];
lineItemNo = json['LineItemNo'];
prescriptionDatetime = json['PrescriptionDatetime'];
itemID = json['ItemID'];
directionID = json['DirectionID'];
refillID = json['RefillID'];
dose = json['Dose'];
unitofMeasurement = json['UnitofMeasurement'];
startDatetime = json['StartDatetime'];
stopDatetime = json['StopDatetime'];
noOfDoses = json['NoOfDoses'];
routeId = json['RouteId'];
comments = json['Comments'];
reviewedPharmacist = json['ReviewedPharmacist'];
reviewedPharmacistDatetime = json['ReviewedPharmacistDatetime'];
discountinueDatetime = json['DiscountinueDatetime'];
rescheduleDatetime = json['RescheduleDatetime'];
status = json['Status'];
statusDescription = json['StatusDescription'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
strength = json['Strength'];
pHRItemDescription = json['PHRItemDescription'];
pHRItemDescriptionN = json['PHRItemDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['AdmissionNo'] = this.admissionNo;
data['PatientID'] = this.patientID;
data['OrderNo'] = this.orderNo;
data['PrescriptionNo'] = this.prescriptionNo;
data['LineItemNo'] = this.lineItemNo;
data['PrescriptionDatetime'] = this.prescriptionDatetime;
data['ItemID'] = this.itemID;
data['DirectionID'] = this.directionID;
data['RefillID'] = this.refillID;
data['Dose'] = this.dose;
data['UnitofMeasurement'] = this.unitofMeasurement;
data['StartDatetime'] = this.startDatetime;
data['StopDatetime'] = this.stopDatetime;
data['NoOfDoses'] = this.noOfDoses;
data['RouteId'] = this.routeId;
data['Comments'] = this.comments;
data['ReviewedPharmacist'] = this.reviewedPharmacist;
data['ReviewedPharmacistDatetime'] = this.reviewedPharmacistDatetime;
data['DiscountinueDatetime'] = this.discountinueDatetime;
data['RescheduleDatetime'] = this.rescheduleDatetime;
data['Status'] = this.status;
data['StatusDescription'] = this.statusDescription;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['Strength'] = this.strength;
data['PHRItemDescription'] = this.pHRItemDescription;
data['PHRItemDescriptionN'] = this.pHRItemDescriptionN;
return data;
}
}

@ -0,0 +1,60 @@
class GetMedicationForInPatientRequestModel {
bool isDentalAllowedBackend;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int deviceTypeID;
String tokenID;
int patientID;
int admissionNo;
String sessionID;
int projectID;
GetMedicationForInPatientRequestModel(
{this.isDentalAllowedBackend,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.deviceTypeID,
this.tokenID,
this.patientID,
this.admissionNo,
this.sessionID,
this.projectID});
GetMedicationForInPatientRequestModel.fromJson(Map<String, dynamic> json) {
isDentalAllowedBackend = json['isDentalAllowedBackend'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
deviceTypeID = json['DeviceTypeID'];
tokenID = json['TokenID'];
patientID = json['PatientID'];
admissionNo = json['AdmissionNo'];
sessionID = json['SessionID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['DeviceTypeID'] = this.deviceTypeID;
data['TokenID'] = this.tokenID;
data['PatientID'] = this.patientID;
data['AdmissionNo'] = this.admissionNo;
data['SessionID'] = this.sessionID;
data['ProjectID'] = this.projectID;
return data;
}
}

@ -1,41 +1,41 @@
import 'package:doctor_app_flutter/widgets/shared/StarRating.dart';
class SickLeavePatientModel {
String setupID;
int projectID;
int patientID;
int patientType;
int clinicID;
int doctorID;
int requestNo;
String requestDate;
int sickLeaveDays;
int appointmentNo;
int admissionNo;
int actualDoctorRate;
String appointmentDate;
String clinicName;
String doctorImageURL;
String doctorName;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
dynamic setupID;
dynamic projectID;
dynamic patientID;
dynamic patientType;
dynamic clinicID;
dynamic doctorID;
dynamic requestNo;
dynamic requestDate;
dynamic sickLeaveDays;
dynamic appointmentNo;
dynamic admissionNo;
dynamic actualDoctorRate;
dynamic appointmentDate;
dynamic clinicName;
dynamic doctorImageURL;
dynamic doctorName;
dynamic doctorRate;
dynamic doctorTitle;
dynamic gender;
dynamic genderDescription;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
dynamic isInOutPatientDescription;
dynamic isInOutPatientDescriptionN;
bool isLiveCareAppointment;
int noOfPatientsRate;
dynamic noOfPatientsRate;
dynamic patientName;
String projectName;
String qR;
dynamic projectName;
dynamic qR;
// List<String> speciality;
String strRequestDate;
String startDate;
String endDate;
dynamic strRequestDate;
dynamic startDate;
dynamic endDate;
dynamic isExtendedLeave;
dynamic noOfDays;
dynamic patientMRN;

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/in_patient_prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
@ -16,11 +18,13 @@ import '../../base/base_service.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List();
List<GetMedicationForInPatientModel> medicationForInPatient = List();
List<PrescriptionsOrder> prescriptionsOrderList = List();
List<PrescriotionInPatient> prescriptionInPatientList = List();
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel =
InPatientPrescriptionRequestModel();
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel();
GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel();
Future getPrescriptionInPatient({int mrn, String adn}) async {
_inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel(
@ -30,12 +34,10 @@ class PrescriptionsService extends BaseService {
hasError = false;
prescriptionInPatientList.clear();
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['List_PrescriptionReportForInPatient'].forEach((prescriptions) {
prescriptionInPatientList
.add(PrescriotionInPatient.fromJson(prescriptions));
prescriptionInPatientList.add(PrescriotionInPatient.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -47,8 +49,7 @@ class PrescriptionsService extends BaseService {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
@ -60,13 +61,10 @@ class PrescriptionsService extends BaseService {
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
appointmentNo: 0, isDentalAllowedBackend: false);
RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
Future getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID;
@ -76,23 +74,18 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.postPatient(
prescriptions.isInOutPatient
? GET_PRESCRIPTION_REPORT_ENH
: GET_PRESCRIPTION_REPORT_NEW,
prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
@ -101,8 +94,7 @@ class PrescriptionsService extends BaseService {
}, body: _requestPrescriptionReport.toJson());
}
RequestGetListPharmacyForPrescriptions
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
@ -110,16 +102,13 @@ class PrescriptionsService extends BaseService {
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
Future getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
Future getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async {
hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId;
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient, onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) {
pharmacyPrescriptionsList
.add(PharmacyPrescriptions.fromJson(prescriptions));
pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -127,16 +116,13 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson());
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(
RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh(
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
@ -151,8 +137,7 @@ class PrescriptionsService extends BaseService {
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) ==
element.appointmentNo) {
if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
@ -168,20 +153,17 @@ class PrescriptionsService extends BaseService {
hasError = false;
await baseAppClient.postPatient(
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
await baseAppClient.postPatient(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
patient: patient, onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh =
PrescriptionReportEnh.fromJson(prescriptions);
PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
@ -195,17 +177,34 @@ class PrescriptionsService extends BaseService {
Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList']
.forEach((prescriptionsOrder) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) {
prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getMedicationForInPatient(PatiantInformtion patient) async {
hasError = false;
_getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel(
isDentalAllowedBackend: false,
admissionNo: int.parse(patient.admissionNo),
tokenID: "@dm!n",
projectID: 15,
);
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
medicationForInPatient.clear();
response['List_GetMedicationForInpatient'].forEach((prescriptions) {
medicationForInPatient.add(GetMedicationForInPatientModel.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _getMedicationForInPatientRequestModel.toJson());
}
}

@ -36,6 +36,8 @@ class UcafViewModel extends BaseViewModel {
List<OrderProcedure> get orderProcedures => _ucafService.orderProcedureList;
Function saveUCAFOnTap;
String selectedLanguage;
String heightCm = "0";
String weightKg = "0";
@ -45,7 +47,11 @@ class UcafViewModel extends BaseViewModel {
String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0";
resetDataInFirst() {
resetDataInFirst({bool firstPage = true}) {
if(firstPage){
_ucafService.patientVitalSignsHistory = [];
_ucafService.patientChiefComplaintList = [];
}
_ucafService.patientAssessmentList = [];
_ucafService.orderProcedureList = [];
_ucafService.prescriptionList = null;
@ -56,7 +62,7 @@ class UcafViewModel extends BaseViewModel {
}
Future getUCAFData(PatiantInformtion patient) async {
setState(ViewState.Busy);
// setState(ViewState.Busy);
String from;
String to;
@ -112,7 +118,7 @@ class UcafViewModel extends BaseViewModel {
Future getPatientAssessment(PatiantInformtion patient) async {
if (patientAssessmentList.isEmpty) {
setState(ViewState.Busy);
// setState(ViewState.Busy);
await _ucafService.getPatientAssessment(patient);
if (_ucafService.hasError) {
error = _ucafService.error;
@ -139,7 +145,7 @@ class UcafViewModel extends BaseViewModel {
Future getOrderProcedures(PatiantInformtion patient) async {
if (orderProcedures.isEmpty) {
setState(ViewState.Busy);
// setState(ViewState.Busy);
await _ucafService.getOrderProcedures(patient);
if (_ucafService.hasError) {
error = _ucafService.error;
@ -152,7 +158,7 @@ class UcafViewModel extends BaseViewModel {
Future getPrescription(PatiantInformtion patient) async {
if (prescriptionList == null) {
setState(ViewState.Busy);
// setState(ViewState.Busy);
await _ucafService.getPrescription(patient);
if (_ucafService.hasError) {
error = _ucafService.error;
@ -190,7 +196,7 @@ class UcafViewModel extends BaseViewModel {
}
Future postUCAF(PatiantInformtion patient) async {
setState(ViewState.Busy);
// setState(ViewState.Busy);
await _ucafService.postUCAF(patient);
if (_ucafService.hasError) {
error = _ucafService.error;

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
@ -26,11 +27,10 @@ class PrescriptionViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
bool hasError = false;
PrescriptionService _prescriptionService = locator<PrescriptionService>();
List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList;
List<GetMedicationResponseModel> get allMedicationList => _prescriptionService.allMedicationList;
List<GetMedicationForInPatientModel> get medicationForInPatient => _prescriptionsService.medicationForInPatient;
List<PrescriptionModel> get prescriptionList =>
_prescriptionService.prescriptionList;
List<PrescriptionModel> get prescriptionList => _prescriptionService.prescriptionList;
List<dynamic> get drugsList => _prescriptionService.doctorsList;
//List<dynamic> get allMedicationList => _prescriptionService.allMedicationList;
List<dynamic> get drugToDrug => _prescriptionService.drugToDrugList;
@ -41,30 +41,22 @@ class PrescriptionViewModel extends BaseViewModel {
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<PrescriptionReport> get prescriptionReportList => _prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<Prescriptions> get prescriptionsList => _prescriptionsService.prescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList =>
_prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList =>
_prescriptionsService.prescriptionReportEnhList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital;
List<PrescriotionInPatient> get inPatientPrescription =>
_prescriptionsService.prescriptionInPatientList;
List<PrescriotionInPatient> get inPatientPrescription => _prescriptionsService.prescriptionInPatientList;
getPrescriptionsInPatient(PatiantInformtion patient) async {
setState(ViewState.Busy);
error = "";
await _prescriptionsService.getPrescriptionInPatient(
mrn: patient.patientId, adn: patient.admissionNo);
await _prescriptionsService.getPrescriptionInPatient(mrn: patient.patientId, adn: patient.admissionNo);
if (_prescriptionsService.hasError) {
error = "No Prescription Found";
setState(ViewState.Error);
@ -100,8 +92,7 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postPrescription(
PostPrescriptionReqModel postProcedureReqModel, int mrn) async {
Future postPrescription(PostPrescriptionReqModel postProcedureReqModel, int mrn) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
@ -125,8 +116,7 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future updatePrescription(
PostPrescriptionReqModel updatePrescriptionReqModel, int mrn) async {
Future updatePrescription(PostPrescriptionReqModel updatePrescriptionReqModel, int mrn) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
@ -152,16 +142,11 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getDrugToDrug(
VitalSignData vital,
List<GetAssessmentResModel> lstAssessments,
List<GetAllergiesResModel> allergy,
PatiantInformtion patient,
List<dynamic> prescription) async {
Future getDrugToDrug(VitalSignData vital, List<GetAssessmentResModel> lstAssessments,
List<GetAllergiesResModel> allergy, PatiantInformtion patient, List<dynamic> prescription) async {
hasError = false;
setState(ViewState.Busy);
await _prescriptionService.getDrugToDrug(
vital, lstAssessments, allergy, patient, prescription);
await _prescriptionService.getDrugToDrug(vital, lstAssessments, allergy, patient, prescription);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
@ -174,12 +159,9 @@ class PrescriptionViewModel extends BaseViewModel {
notifyListeners();
}
getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(
prescriptions: prescriptions, patient: patient);
await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@ -188,11 +170,9 @@ class PrescriptionViewModel extends BaseViewModel {
}
}
getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getListPharmacyForPrescriptions(
itemId: itemId, patient: patient);
await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@ -204,48 +184,39 @@ class PrescriptionViewModel extends BaseViewModel {
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
List<PrescriptionsList> prescriptionsByClinic = _prescriptionsOrderListClinic
.where((elementClinic) => elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
_prescriptionsOrderListClinic[_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
_prescriptionsOrderListClinic
.add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
List<PrescriptionsList> prescriptionsByHospital = _prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
_prescriptionsOrderListHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element));
}
});
}
getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder, patient: patient);
await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@ -280,4 +251,15 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
getMedicationForInPatient(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _prescriptionsService.getMedicationForInPatient(patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
@ -19,21 +20,19 @@ class PrescriptionsViewModel extends BaseViewModel {
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<PrescriptionReport> get prescriptionReportList => _prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<Prescriptions> get prescriptionsList => _prescriptionsService.prescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList =>
_prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList =>
_prescriptionsService.prescriptionReportEnhList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital;
List<GetMedicationForInPatientModel> get medicationForInPatient => _prescriptionsService.medicationForInPatient;
List<PrescriptionsList> _medicationForInPatient = List();
getPrescriptions(PatiantInformtion patient) async {
setState(ViewState.Busy);
@ -62,38 +61,32 @@ class PrescriptionsViewModel extends BaseViewModel {
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
List<PrescriptionsList> prescriptionsByClinic = _prescriptionsOrderListClinic
.where((elementClinic) => elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
_prescriptionsOrderListClinic[_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
_prescriptionsOrderListClinic
.add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
List<PrescriptionsList> prescriptionsByHospital = _prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
_prescriptionsOrderListHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element));
}
});
}
@ -103,12 +96,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners();
}
getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(
prescriptions: prescriptions, patient: patient);
await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@ -117,11 +107,9 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getListPharmacyForPrescriptions(
itemId: itemId, patient: patient);
await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@ -130,12 +118,9 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder, patient: patient);
await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@ -143,4 +128,14 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
getMedicationForInPatient(PatiantInformtion patient) async {
await _prescriptionsService.getMedicationForInPatient(patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -3,8 +3,6 @@ import 'package:doctor_app_flutter/screens/live_care/end_call_screen.dart';
import 'package:doctor_app_flutter/screens/medical-file/health_summary_page.dart';
import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/all_lab_special_result_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart';
@ -22,6 +20,7 @@ import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
import './screens/auth/login_screen.dart';
import 'screens/patients/profile/UCAF/ucaf_pager_screen.dart';
import 'screens/patients/profile/profile_screen/patient_profile_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import 'landing_page.dart';
@ -109,8 +108,8 @@ var routes = {
ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(),
ORDER_PROCEDURE: (_) => ProcedureScreen(),
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFPagerScreen(),
// PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
PATIENT_ECG: (_) => ECGPage(),
ALL_SPECIAL_LAB_RESULT: (_) => AllLabSpecialResult(),
};

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/ucaf_pager_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -22,33 +23,63 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart';
class UcafDetailScreen extends StatefulWidget {
final PatiantInformtion patient;
final UcafViewModel model;
final Function changeLoadingState;
UcafDetailScreen(this.patient, this.model, {this.changeLoadingState});
@override
_UcafDetailScreenState createState() => _UcafDetailScreenState();
_UcafDetailScreenState createState() => _UcafDetailScreenState(this.patient, this.model);
}
class _UcafDetailScreenState extends State<UcafDetailScreen> {
final PatiantInformtion patient;
final UcafViewModel model;
UcafViewModel ucafModel;
int _activeTap = 0;
_UcafDetailScreenState(this.patient, this.model);
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
void initState() {
model.saveUCAFOnTap = () async{
widget.changeLoadingState(true);
await ucafModel.postUCAF(patient);
widget.changeLoadingState(false);
if (ucafModel.state == ViewState.Idle) {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.postUcafSuccessMsg);
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
} else {
DrAppToastMsg.showErrorToast(ucafModel.error);
}
};
super.initState();
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
onModelReady: (model) async {
model.resetDataInFirst();
ucafModel = model;
model.resetDataInFirst(firstPage: false);
await model.getLanguage();
await model.getPatientAssessment(patient);
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
appBarTitle: TranslationBase.of(context).ucaf,
isShowAppBar: false,
body: Column(
children: [
Expanded(
@ -57,35 +88,6 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 2,
screenSize: screenSize,
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.symmetric(
vertical: 16, horizontal: 16),
@ -106,64 +108,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
),
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Colors.white,
color: Colors.white,
fontColor: HexColor("#B8382B"),
fontSize: 2.2,
onPressed: () {
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
},
),
),
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).save,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: HexColor("#B8382B"),
color: HexColor("#B8382B"),
fontColor: Colors.white,
fontSize: 2.0,
onPressed: () async {
await model.postUCAF(patient);
if (model.state == ViewState.Idle) {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.postUcafSuccessMsg);
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
} else {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),
),
],
),
),
],
),
));
@ -209,12 +154,18 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
onTap: () async {
print(__treatmentSteps.indexOf(item));
if (__treatmentSteps.indexOf(item) == 0) {
widget.changeLoadingState(true);
await model.getPatientAssessment(patient);
widget.changeLoadingState(false);
} else if (__treatmentSteps.indexOf(item) == 1) {
widget.changeLoadingState(true);
await model.getPrescription(patient);
widget.changeLoadingState(false);
}
if (__treatmentSteps.indexOf(item) == 2) {
widget.changeLoadingState(true);
await model.getOrderProcedures(patient);
widget.changeLoadingState(false);
}
setState(() {
_activeTap = __treatmentSteps.indexOf(item);
@ -288,6 +239,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
];
}
}
}
class DiagnosisWidget extends StatelessWidget {

@ -19,11 +19,20 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart';
class UCAFInputScreen extends StatefulWidget {
final PatiantInformtion patient;
final Function changeLoadingState;
UCAFInputScreen(this.patient, {this.changeLoadingState});
@override
_UCAFInputScreenState createState() => _UCAFInputScreenState();
_UCAFInputScreenState createState() => _UCAFInputScreenState(this.patient);
}
class _UCAFInputScreenState extends State<UCAFInputScreen> {
final PatiantInformtion patient;
_UCAFInputScreenState(this.patient);
bool _inPatient = false;
bool _emergencyCase = false;
final _durationOfIllnessController = TextEditingController();
@ -53,21 +62,15 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
onModelReady: (model) => model.getUCAFData(patient),
onModelReady: (model) async {
model.resetDataInFirst();
await model.getUCAFData(patient);
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileAppBar(
patient),
appBarTitle: TranslationBase.of(context).ucaf,
isShowAppBar: false,
body: model.patientVitalSignsHistory.length > 0 &&
model.patientChiefComplaintList != null &&
model.patientChiefComplaintList.length > 0
@ -79,31 +82,6 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 1,
screenSize: screenSize,
),
Container(
margin: EdgeInsets.symmetric(
vertical: 0, horizontal: 16),
@ -263,7 +241,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
/* SizedBox(
/* SizedBox(
height: 4,
),
AppText(
@ -323,7 +301,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
SizedBox(
height: 8,
),
/* AppTextFieldCustom(
/* AppTextFieldCustom(
hintText: TranslationBase.of(context).other,
dropDownText: TranslationBase.of(context).none,
enabled: false,
@ -400,21 +378,6 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next,
color: HexColor("#D02127"),
onPressed: () {
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType
});
},
),
),
],
)
: Center(
@ -428,9 +391,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context).chiefComplaintEmptyMsg,
model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context)
.chiefComplaintEmptyMsg,
fontWeight: FontWeight.normal,
textAlign: TextAlign.center,
color: HexColor("#B8382B"),

@ -0,0 +1,214 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import '../../../../routes.dart';
import 'UCAF-detail-screen.dart';
import 'UCAF-input-screen.dart';
class UCAFPagerScreen extends StatefulWidget {
const UCAFPagerScreen({Key key}) : super(key: key);
@override
_UCAFPagerScreenState createState() => _UCAFPagerScreenState();
}
class _UCAFPagerScreenState extends State<UCAFPagerScreen>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 0;
bool _isLoading = true;
PatiantInformtion patient;
String patientType;
String arrivalType;
changePageViewIndex(pageIndex, {isChangeState = true}) {
if (pageIndex != _currentIndex && isChangeState) changeLoadingState(true);
_controller.jumpToPage(pageIndex);
setState(() {
_currentIndex = pageIndex;
});
}
void changeLoadingState(bool isLoading) {
setState(() {
_isLoading = isLoading;
});
}
@override
void initState() {
_controller = new PageController();
super.initState();
}
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isLoading: _isLoading,
appBar: PatientProfileAppBar(patient),
appBarTitle: TranslationBase.of(context).ucaf,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: _currentIndex + 1,
screenSize: screenSize,
),
SizedBox(
height: 10,
),
Expanded(
child: Container(
color: Theme.of(context).scaffoldBackgroundColor,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UCAFInputScreen(
patient,
changeLoadingState: changeLoadingState,
),
UcafDetailScreen(
patient,
model,
changeLoadingState: changeLoadingState,
),
]),
),
),
],
),
),
),
_isLoading
? Container(
height: 0,
)
: ucafButtons(model),
],
),
));
}
Widget ucafButtons(UcafViewModel model) {
switch (_currentIndex) {
case 0:
return Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next,
color: Color(0xFFD02127),
onPressed: () {
changePageViewIndex(1);
// Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, arguments: {
// 'patient': patient,
// 'patientType': patientType,
// 'arrivalType': arrivalType
// });
},
),
);
case 1:
return Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Colors.white,
color: Colors.white,
fontColor: Color(0xFFB8382B),
fontSize: 2.2,
onPressed: () {
Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE;
});
},
),
),
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).save,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Color(0xFFB8382B),
color: Color(0xFFB8382B),
fontColor: Colors.white,
fontSize: 2.0,
onPressed: () {
model.saveUCAFOnTap();
},
),
),
),
],
),
);
default:
return Container();
}
}
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -13,7 +14,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionItemsInPatientPage extends StatelessWidget {
final PrescriotionInPatient prescriptions;
final GetMedicationForInPatientModel prescriptions;
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
@ -36,16 +37,15 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionViewModel>(
onModelReady: (model) async {
if (model.inPatientPrescription.length == 0) {
await model.getPrescriptionsInPatient(patient);
if (model.medicationForInPatient.length == 0) {
await model.getMedicationForInPatient(patient);
}
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100],
baseViewModel: model,
appBar: PatientProfileAppBar(
patient),
appBar: PatientProfileAppBar(patient),
body: SingleChildScrollView(
child: Container(
child: Column(
@ -64,8 +64,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
Container(
margin: EdgeInsets.only(left: 18, right: 18),
child: AppText(
model.inPatientPrescription[prescriptionIndex]
.itemDescription,
prescriptions.pHRItemDescription,
bold: true,
),
),
@ -92,13 +91,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).direction,
color: Colors.grey,
),
Expanded(
child: AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.direction ??
'')),
Expanded(child: AppText(" " + prescriptions.directionID.toString() ?? '')),
],
),
Row(
@ -107,13 +100,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).route,
color: Colors.grey,
),
AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.route
.toString() ??
''),
AppText(" " + prescriptions.routeId.toString() ?? ''),
],
),
Row(
@ -122,13 +109,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).refill,
color: Colors.grey,
),
Expanded(
child: AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.refillType ??
'')),
Expanded(child: AppText(" " + prescriptions.refillID.toString() ?? '')),
],
),
Row(
@ -169,12 +150,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
'UOM',
color: Colors.grey,
),
AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.unitofMeasurementDescription ??
''),
AppText(" " + prescriptions.unitofMeasurement.toString() ?? ''),
],
),
Row(
@ -183,13 +159,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).dailyDoses,
color: Colors.grey,
),
AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.dose
.toString() ??
''),
AppText(" " + prescriptions.dose.toString() ?? ''),
],
),
Row(
@ -198,13 +168,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).status,
color: Colors.grey,
),
AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.statusDescription
.toString() ??
''),
AppText(" " + prescriptions.statusDescription.toString() ?? ''),
],
),
Row(
@ -213,12 +177,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).processed,
color: Colors.grey,
),
AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.processedBy ??
''),
// AppText(" " + prescriptions.editedBy.toString() ?? ''),
],
),
Row(
@ -227,23 +186,13 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
TranslationBase.of(context).dailyDoses,
color: Colors.grey,
),
AppText(" " +
model
.inPatientPrescription[
prescriptionIndex]
.dose
.toString() ??
''),
AppText(" " + prescriptions.dose.toString() ?? ''),
],
),
SizedBox(
height: 12,
),
AppText(model
.inPatientPrescription[
prescriptionIndex]
.comments ??
''),
AppText(prescriptions.comments ?? ''),
],
),
)

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -28,208 +29,196 @@ class PrescriptionsPage extends StatelessWidget {
bool isFromLiveCare = routeArgs['isFromLiveCare'];
bool isSelectInpatient = routeArgs['isSelectInpatient'];
return BaseView<PrescriptionViewModel>(
onModelReady: (model) => isSelectInpatient
? model.getPrescriptionsInPatient(patient)
: model.getPrescriptions(patient, patientType: patientType),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
SizedBox(
height: 12,
),
if (model.prescriptionsList.isNotEmpty &&
patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
),
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
),
if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
BaseAddProcedureTabPage(
patient: patient,
prescriptionModel: model,
procedureType:
ProcedureType.PRESCRIPTION,
),settings: RouteSettings(name: 'AddProcedureTabPage')),
);
},
label: TranslationBase.of(context)
.applyForNewPrescriptionsOrder,
),
...List.generate(
model.prescriptionsList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions:
model.prescriptionsList[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
),
onModelReady: (model) => patient.admissionNo == null
? model.getPrescriptions(patient, patientType: patientType)
: model.getMedicationForInPatient(patient),
builder: (_, model, w) => NetworkBaseView(
baseViewModel: model,
child: AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
SizedBox(
height: 12,
),
if (model.prescriptionsList.isNotEmpty && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
),
child: DoctorCard(
doctorName:
model.prescriptionsList[index].doctorName,
profileUrl: model
.prescriptionsList[index].doctorImageURL,
branch: model.prescriptionsList[index].name,
clinic: model.prescriptionsList[index]
.clinicDescription,
isPrescriptions: true,
appointmentDate:
AppDateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index]
.appointmentDate,
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
))),
if (model.prescriptionsList.isEmpty &&
patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
if (patient.patientStatusType != null && patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context)
.noPrescriptionsFound),
)
],
),
)
],
),
)
: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
// SizedBox(
// height: 12,
// ),
...List.generate(
model.inPatientPrescription.length,
(index) => InkWell(
onTap: () => Navigator.push(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
),
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
FadePage(
page: PrescriptionItemsInPatientPage(
prescriptionIndex: index,
prescriptions: model
.inPatientPrescription[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
startOn: AppDateUtils
.getDateTimeFromServerFormat(
model.inPatientPrescription[index]
.startDatetime,
),
stopOn: AppDateUtils
.getDateTimeFromServerFormat(
model.inPatientPrescription[index]
.stopDatetime,
MaterialPageRoute(
builder: (context) => BaseAddProcedureTabPage(
patient: patient,
prescriptionModel: model,
procedureType: ProcedureType.PRESCRIPTION,
),
settings: RouteSettings(name: 'AddProcedureTabPage')),
);
},
label: TranslationBase.of(context).applyForNewPrescriptionsOrder,
),
...List.generate(
model.prescriptionsList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions: model.prescriptionsList[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
),
),
),
child: DoctorCard(
doctorName: model.prescriptionsList[index].doctorName,
profileUrl: model.prescriptionsList[index].doctorImageURL,
branch: model.prescriptionsList[index].name,
clinic: model.prescriptionsList[index].clinicDescription,
isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index].appointmentDate,
),
))),
if (model.prescriptionsList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
),
child: InPatientDoctorCard(
doctorName: model.inPatientPrescription[index]
.itemDescription,
profileUrl: 'sss',
branch: 'hamza',
clinic: 'basheer',
isPrescriptions: true,
appointmentDate:
AppDateUtils.getDateTimeFromServerFormat(
model.inPatientPrescription[index]
.prescriptionDatetime,
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
)
],
),
createdBy: model.inPatientPrescription[index]
.createdByName,
))),
if (model.inPatientPrescription.length == 0)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context)
.noPrescriptionsFound),
)
],
),
)
: NetworkBaseView(
baseViewModel: model,
child: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
// SizedBox(
// height: 12,
// ),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicationForInPatient.length,
itemBuilder: (context, index) {
//model.medicationForInPatient.length,
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsInPatientPage(
prescriptionIndex: index,
prescriptions: model.medicationForInPatient[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
startOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].startDatetime,
),
stopOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].stopDatetime,
),
),
),
),
child: InPatientDoctorCard(
doctorName: model.medicationForInPatient[index].pHRItemDescription,
profileUrl: 'sss',
branch: 'hamza',
clinic: 'basheer',
isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].prescriptionDatetime,
),
createdBy: model.medicationForInPatient[index].createdBy.toString(),
));
}),
if (model.medicationForInPatient.length == 0)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
)
],
),
)
],
),
)
],
),
)));
),
)),
));
}
}

@ -181,7 +181,7 @@ class AddSickLeavScreen extends StatelessWidget {
children: [
AppText(TranslationBase.of(context).daysSickleave + ": "),
AppText(
item.sickLeaveDays ?? item.noOfDays.toString(),
item.sickLeaveDays.toString() ?? item.noOfDays.toString(),
fontWeight: FontWeight.bold,
),
],
@ -211,10 +211,11 @@ class AddSickLeavScreen extends StatelessWidget {
child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
item.startDate.contains("/Date(")
? AppDateUtils.convertStringToDate(item.endDate)
.add(Duration(days: item.noOfDays))
: DateTime.parse(item.startDate)
.add(Duration(days: item.noOfDays))),
? AppDateUtils.convertStringToDate(item.endDate ?? "")
.add(Duration(
days: item.noOfDays ?? item.sickLeaveDays))
: DateTime.parse(item.startDate ?? "")
.add(Duration(days: item.noOfDays ?? ""))),
fontWeight: FontWeight.bold,
),
)

Loading…
Cancel
Save