hot fixes

merge-requests/614/head
Mohammad Aljammal 5 years ago
parent 17e77c2754
commit 1dd668ed70

@ -11,7 +11,7 @@ class DischargedPatientService extends BaseService {
Future getDischargedPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile();
await getDoctorProfile(isGetProfile: true);
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";

@ -15,7 +15,17 @@ class BaseService {
List<PatiantInformtion> patientArrivalList = [];
//TODO add the user login model when we need it
Future<DoctorProfileModel> getDoctorProfile() async {
Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
if(isGetProfile)
{
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile);
if (doctorProfile != null) {
return doctorProfile;
}
}
}
if (doctorProfile == null) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {

@ -25,7 +25,8 @@ class LabsService extends BaseService {
body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS;
}
patientLabOrdersList=[];
patientLabOrdersList.clear();
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList=[];
@ -33,6 +34,7 @@ class LabsService extends BaseService {
response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
var asd="";
} else {
response['List_GetLabOreders'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));

@ -17,7 +17,7 @@ class SickLeaveService extends BaseService {
List get getReasons => reasonse;
List reasonse = [];
List<GetAllSickLeaveResponse> get getAllSickLeave => _getAllsickLeave;
List<GetAllSickLeaveResponse> _getAllsickLeave = [];
List<GetAllSickLeaveResponse> _getAllsickLeave = List();
List get coveringDoctorsList => _coveringDoctors;
List _coveringDoctors = [];
@ -31,9 +31,8 @@ class SickLeaveService extends BaseService {
dynamic get sickLeaveResponse => _sickLeaveResponse;
dynamic _sickLeaveResponse;
List<SickLeavePatientModel> get getAllSickLeavePatient =>
_getAllsickLeavePatient;
List<SickLeavePatientModel> _getAllsickLeavePatient = [];
List<SickLeavePatientModel> getAllSickLeavePatient = List();
SickLeavePatientRequestModel _sickLeavePatientRequestModel =
SickLeavePatientRequestModel();
@ -98,13 +97,14 @@ class SickLeaveService extends BaseService {
Future getSickLeave(patientMRN) async {
hasError = false;
getAllSickLeavePatient = [];
await baseAppClient.postPatient(
GET_SICK_LEAVE,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
_getAllsickLeavePatient.clear();
// Future.value(response);
getAllSickLeavePatient=[];
response['List_SickLeave'].forEach((v) {
_getAllsickLeavePatient.add(SickLeavePatientModel.fromJson(v));
getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
@ -119,13 +119,15 @@ class SickLeaveService extends BaseService {
_sickLeavePatientRequestModel = SickLeavePatientRequestModel(
patientID: patientMRN, patientTypeID: 2, patientType: 1);
hasError = false;
getAllSickLeavePatient =[];
getAllSickLeavePatient.clear();
await baseAppClient.postPatient(
GET_SICK_LEAVE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
_getAllsickLeavePatient.clear();
getAllSickLeavePatient.clear();
response['List_SickLeave'].forEach((v) {
_getAllsickLeavePatient.add(SickLeavePatientModel.fromJson(v));
getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {

@ -43,16 +43,15 @@ class ProcedureViewModel extends BaseViewModel {
List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList;
List<PatientLabOrders> get patientLabOrdersList => _labsService.patientLabOrdersList;
List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
List<PatientLabOrdersList> get patientLabOrdersList =>
filterType == FilterType.Clinic
? _patientLabOrdersListClinic
: _patientLabOrdersListHospital;
Future getProcedure({int mrn,String patientType}) async {
hasError = false;
@ -222,6 +221,8 @@ class ProcedureViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom {
return labResultLists;
}
@ -233,45 +234,6 @@ class ProcedureViewModel extends BaseViewModel {
error = _labsService.error;
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic =
_patientLabOrdersListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic
.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(
filterName: element.clinicDescription,
patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital =
_patientLabOrdersListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital
.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(
filterName: element.projectName,
patientDoctorAppointment: element));
}
});
setState(ViewState.Idle);
}
}

@ -27,6 +27,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
onModelReady: (model) => model.getDischargedPatient(),
builder: (_, model, w) => AppScaffold(
appBarTitle: 'Discharged Patient',
subtitle: "Last Three Months",
backgroundColor: Colors.grey[200],
isShowAppBar: true,
baseViewModel: model,

@ -75,6 +75,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
"patientType": "1",
"isInpatient": true,
"arrivalType": "1",
"isDischargedPatient":true,
"from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
});

@ -55,46 +55,46 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
SizedBox(
height: 16,
),
AppText(
'Patient Type',
fontWeight: FontWeight.w600,
),
Row(
children: [
Row(
children: [
Radio(
activeColor: Color(0xFFB9382C),
value: PatientType.inPatient,
groupValue: selectedPatientType,
onChanged: (value) {
setState(() {
selectedPatientType =
PatientType.inPatient;
});
},
),
Text('InPatient'),
],
),
Row(
children: [
Radio(
activeColor: Color(0xFFB9382C),
value: PatientType.OutPatient,
groupValue: selectedPatientType,
onChanged: (value) {
setState(() {
selectedPatientType =
PatientType.OutPatient;
});
},
),
Text('OutPatient'),
],
),
],
),
// AppText(
// 'Patient Type',
// fontWeight: FontWeight.w600,
// ),
// Row(
// children: [
// Row(
// children: [
// Radio(
// activeColor: Color(0xFFB9382C),
// value: PatientType.inPatient,
// groupValue: selectedPatientType,
// onChanged: (value) {
// setState(() {
// selectedPatientType =
// PatientType.inPatient;
// });
// },
// ),
// Text('InPatient'),
// ],
// ),
// Row(
// children: [
// Radio(
// activeColor: Color(0xFFB9382C),
// value: PatientType.OutPatient,
// groupValue: selectedPatientType,
// onChanged: (value) {
// setState(() {
// selectedPatientType =
// PatientType.OutPatient;
// });
// },
// ),
// Text('OutPatient'),
// ],
// ),
// ],
// ),
SizedBox(
height: 10,
),
@ -299,8 +299,9 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
isSearchWithKeyInfo:
patientFileInfoController.text.isNotEmpty ? true : false,
isSearch: true,
isSearchAndOut:true,
searchKey: patientFileInfoController.text,
isInpatient: selectedPatientType != PatientType.OutPatient,
isInpatient: false,
),
),
);

@ -33,6 +33,7 @@ class PatientsScreenNew extends StatefulWidget {
final bool isSearchWithKeyInfo;
final bool isSearch;
final bool isInpatient;
final bool isSearchAndOut;
final String searchKey;
@ -46,7 +47,7 @@ class PatientsScreenNew extends StatefulWidget {
this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
this.isInpatient = false, this.searchKey});
this.isInpatient = false, this.searchKey, this.isSearchAndOut=false});
@override
_PatientsScreenNewState createState() => _PatientsScreenNewState();
@ -226,7 +227,8 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
isInpatient: widget.isInpatient,
isFromSearch:widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
@ -241,9 +243,10 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
"isSearch": widget.isSearch,
"isInpatient": widget.isInpatient,
"arrivalType": "7",
"isSearchAndOut": widget.isSearchAndOut,
});
},
isFromSearch: widget.isSearch,
// isFromSearch: widget.isSearch,
),
);
})),

@ -114,87 +114,79 @@ class _LabsHomePageState extends State<LabsHomePage> {
),
...List.generate(
model.patientLabOrdersList.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model
.patientLabOrdersList[index].patientLabOrdersList
.map((labOrder) {
return Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
(index) => Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: model.patientLabOrdersList[index].isLiveCareAppointment
? Colors.red[900]
: !model.patientLabOrdersList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: labOrder.isLiveCareAppointment
? Colors.red[900]
: !labOrder.isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
labOrder.isLiveCareAppointment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !labOrder.isInOutPatient
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: labOrder,
patient: patient,
arrivalType: arrivalType,
patientType: patientType,
),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patient: patient,
arrivalType: arrivalType,
patientType: patientType,
),
doctorName: labOrder.doctorName,
invoiceNO: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL,
branch: labOrder.projectName,
clinic: labOrder.clinicDescription,
appointmentDate: labOrder.orderDate,
orderNo: labOrder.orderNo,
isShowTime: false,
),
),
],
doctorName: model.patientLabOrdersList[index].doctorName,
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
branch: model.patientLabOrdersList[index].projectName,
clinic: model.patientLabOrdersList[index].clinicDescription,
appointmentDate: model.patientLabOrdersList[index].orderDate,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),
),
);
}).toList(),
],
),
),
),
if (model.patientLabOrdersList.isEmpty &&

@ -30,6 +30,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
bool isInpatient = false;
bool isDischargedPatient = false;
bool isSearchAndOut = false;
String patientType;
String arrivalType;
String from;
@ -66,6 +67,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
}
if (routeArgs.containsKey("isDischargedPatient")) {
isDischargedPatient = routeArgs['isDischargedPatient'];
}if (routeArgs.containsKey("isSearchAndOut")) {
isSearchAndOut = routeArgs['isSearchAndOut'];
}
if (isInpatient)
_activeTab = 0;
@ -101,24 +104,22 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
? 210
: 0,
),
if(isFromSearch)
tabsBar(context, screenSize),
Container(
height: isFromSearch ? MediaQuery
height: !isSearchAndOut ? MediaQuery
.of(context)
.size
.height * 0.60 : MediaQuery
.height * 0.70 : MediaQuery
.of(context)
.size
.height * 0.69,
child: ListView(
children: [
Container(
child: isFromSearch
child: isSearchAndOut
? Column(
children: [
if (_activeTab == 0)
Padding(
padding:
const EdgeInsets.symmetric(
@ -134,6 +135,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
@ -153,17 +156,17 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.signs,
route:
VITAL_SIGN_DETAILS,
isInPatient: true,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1:
TranslationBase
.of(
@ -195,10 +198,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
TranslationBase
.of(
context)
.result,
.service,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
@ -206,15 +211,11 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
arrivalType,
route:
ORDER_PRESCRIPTION_NEW,
isSelectInpatient:
_activeTab == 0,
isInPatient:
isInpatient,
nameLine1:
TranslationBase
.of(
context)
.patient,
.orders,
nameLine2:
TranslationBase
.of(
@ -222,222 +223,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.prescription,
icon:
'patient/order_prescription.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient:
isDischargedPatient,
nameLine1:
TranslationBase
.of(
context)
.progress,
nameLine2:
TranslationBase
.of(
context)
.note,
icon:
'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: ORDER_NOTE,
isDischargedPatient:
isDischargedPatient,
nameLine1:
"Order",
//"Text",
nameLine2:
"Sheet",
//TranslationBase.of(context).orders,
icon:
'patient/Progress_notes.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: ORDER_PROCEDURE,
isInPatient:
isInpatient,
nameLine1:
TranslationBase
.of(
context)
.orders,
nameLine2:
TranslationBase
.of(
context)
.procedures,
icon:
'patient/Order_Procedures.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health",
isInPatient:
isInpatient,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
isDisable: true,
route: MEDICAL_FILE,
nameLine1:
"Medical",
//Health
isInPatient:
isInpatient,
nameLine2:
"Report",
//Report
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
isDisable:
isDischargedPatient ||
isFromSearch,
nameLine1:
TranslationBase
.of(
context)
.referral,
nameLine2:
TranslationBase
.of(
context)
.patient,
icon:
'patient/refer_patient.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1:
TranslationBase
.of(
context)
.insurance,
nameLine2:
TranslationBase
.of(
context)
.approvals,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon:
'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: ADD_SICKLEAVE,
nameLine1:
TranslationBase
.of(
context)
.patientSick,
nameLine2:
TranslationBase
.of(
context)
.leave,
icon:
'patient/patient_sick_leave.png'),
],
),
),
if (_activeTab == 1)
Padding(
padding:
const EdgeInsets.symmetric(
vertical: 15.0,
horizontal: 15),
child: GridView.count(
shrinkWrap: true,
physics:
NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
from: from,
to: to,
nameLine1:
TranslationBase
.of(
context)
.vital,
nameLine2:
TranslationBase
.of(
context)
.signs,
route:
VITAL_SIGN_DETAILS,
icon:
'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
isInPatient:
isInpatient,
@ -455,50 +240,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: LAB_RESULT,
nameLine1:
TranslationBase
.of(
context)
.lab,
nameLine2:
TranslationBase
.of(
context)
.result,
icon:
'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
isInPatient:
isInpatient,
route:
RADIOLOGY_PATIENT,
nameLine1:
TranslationBase
.of(
context)
.radiology,
nameLine2:
TranslationBase
.of(
context)
.service,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
@ -516,29 +257,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
nameLine2: "ECG",
icon:
'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
ORDER_PRESCRIPTION_NEW,
nameLine1:
TranslationBase
.of(
context)
.orders,
nameLine2:
TranslationBase
.of(
context)
.prescription,
icon:
'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient:
isInpatient,
@ -560,7 +278,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.procedures,
icon:
'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient:
isInpatient,
@ -583,7 +300,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.service,
icon:
'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient:
isInpatient,
@ -987,24 +703,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
VITAL_SIGN_DETAILS,
icon:
'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: MEDICAL_FILE,
nameLine1:
"Health",
//TranslationBase.of(context).medicalReport,
nameLine2:
"Summary",
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
@ -1026,7 +724,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.result,
icon:
'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
patient: patient,
patientType:
@ -1057,15 +754,20 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
patientType,
arrivalType:
arrivalType,
route: PATIENT_ECG,
route:
ORDER_PRESCRIPTION_NEW,
nameLine1:
TranslationBase
.of(
context)
.patient,
nameLine2: "ECG",
.orders,
nameLine2:
TranslationBase
.of(
context)
.prescription,
icon:
'patient/patient_sick_leave.png'),
'patient/order_prescription.png'),
PatientProfileButton(
isInPatient:
isInpatient,
@ -1074,33 +776,41 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
patientType,
arrivalType:
arrivalType,
route:
ORDER_PRESCRIPTION_NEW,
isSelectInpatient:
false,
route: MEDICAL_FILE,
nameLine1:
TranslationBase
.of(
context)
.orders,
"Health",
//TranslationBase.of(context).medicalReport,
nameLine2:
"Summary",
//TranslationBase.of(context).summaryReport,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: PATIENT_ECG,
nameLine1:
TranslationBase
.of(
context)
.prescription,
.patient,
nameLine2: "ECG",
icon:
'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
ORDER_PROCEDURE,
isInPatient:
isInpatient,
route: ORDER_PROCEDURE,
nameLine1:
TranslationBase
.of(
@ -1113,7 +823,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.procedures,
icon:
'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient:
isInpatient,
@ -1136,7 +845,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.service,
icon:
'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
isInPatient:
isInpatient,

@ -453,7 +453,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
),
),
),
bottomSheet: Container(
bottomSheet:Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
@ -462,55 +462,67 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
border: Border.all(
color: HexColor('#707070'),
width: 0),
), child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: TranslationBase
.of(context)
.previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(1);
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.05,
),
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
if (widget.mySelectedAssessmentList.isEmpty) {
Helpers.showErrorToast(
TranslationBase
.of(context)
.assessmentErrorMsg);
} else {
widget.changePageViewIndex(3);
widget.changeLoadingState(true);
}
},
),
height: 80,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(1);
},
)
,
),
SizedBox(width: 5,),
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
if (widget.mySelectedAssessmentList.isEmpty) {
Helpers.showErrorToast(
TranslationBase
.of(context)
.assessmentErrorMsg);
} else {
widget.changePageViewIndex(3);
widget.changeLoadingState(true);
}
},
),
),
],
),
),
],
),
),
),
),),
SizedBox(
height: 5,
),
],
),)
),
);
}

@ -143,7 +143,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
),
),
),
bottomSheet: Container(
bottomSheet:
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
@ -153,55 +154,56 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
color: HexColor('#707070'),
width: 0),
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
height: 80,
width: double.infinity,
child: FractionallySizedBox(
widthFactor: 0.9,
child: Row(
children: [
Container(
width: MediaQuery.of(context).size.width *0.4,
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width *0.1,
),
Container(
width: MediaQuery.of(context).size.width *0.4,
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
color: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? Colors.red[700]
: HexColor("#A5A5A5"),
fontColor: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0 ? Colors.white : HexColor("#5A5A5A"),
disabled: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? false
: true,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
child: Column(
children: [
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
)
,
),
SizedBox(width: 5,),
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
),
),
],
),
),
),
),),
SizedBox(
height: 5,
),
],
),)
),
);
}

@ -236,7 +236,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
),
),
),
bottomSheet: Container(
bottomSheet:
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
@ -246,76 +247,85 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
color: HexColor('#707070'),
width: 0),
),
width: double.maxFinite,
height: 90,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
margin: EdgeInsets.all(6),
child: Column(
children: [
Row(
height: 80,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
title: TranslationBase
.of(context)
.previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
setState(() {
widget.changePageViewIndex(2);
});
widget.changePageViewIndex(2);
},
),
)
,
),
SizedBox(width: 5,),
Expanded(
child: AppButton(
title: isAddProgress? TranslationBase.of(context).next: "Finish",
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
disabled: progressNoteController.text.isEmpty,
onPressed: () async {
if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) {
Map profile =
await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
setState(() {
widget.patientProgressNote.createdByName =
widget.patientProgressNote
.createdByName ??
doctorProfile.doctorName;
widget.patientProgressNote.editedByName =
doctorProfile.doctorName;
widget.patientProgressNote.createdOn =
DateTime.now().toString();
widget.patientProgressNote.planNote =
progressNoteController.text;
isAddProgress = !isAddProgress;
});
submitPlan(model);
} else {
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast(TranslationBase.of(context)
.progressNoteErrorMsg);
}
},
if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) {
Map profile =
await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
setState(() {
widget.patientProgressNote.createdByName =
widget.patientProgressNote
.createdByName ??
doctorProfile.doctorName;
widget.patientProgressNote.editedByName =
doctorProfile.doctorName;
widget.patientProgressNote.createdOn =
DateTime.now().toString();
widget.patientProgressNote.planNote =
progressNoteController.text;
isAddProgress = !isAddProgress;
});
submitPlan(model);
} else {
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast(TranslationBase.of(context)
.progressNoteErrorMsg);
}
},
),
),
],
),
],
),
),),
SizedBox(
height: 5,
),
),
),
),
],
),)
),
);
}

@ -323,18 +323,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
color: HexColor('#707070'),
width: 0),
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
height: 80,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(child: FractionallySizedBox(
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(

@ -361,6 +361,18 @@ class DateUtils {
return DateFormat('hh:mm a').format(dateTime);
}
static String getTimeHHMMA2 (DateTime dateTime){
return DateFormat('hh:mm').format(dateTime);
}
static String getStartTime(String dateTime){
String time=dateTime;
if(dateTime.length>7)
time = dateTime.substring(0,5);
return time;
}
static String getTimeFormated(DateTime dateTime) {
print(dateTime);
if (dateTime != null)

@ -148,7 +148,7 @@ class PatientCard extends StatelessWidget {
: patientInfo.arrivedOn != null
? AppText(
DateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.arrivedOn,)
)+" "+ DateUtils.getTimeHHMMA(DateUtils.convertStringToDate(patientInfo.arrivedOn,)),
)+" "+ "${DateUtils.getStartTime(patientInfo.startTime)}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
)
@ -156,7 +156,7 @@ class PatientCard extends StatelessWidget {
AppText(
//
// )+" "+ DateUtils.getTimeHHMMA(DateUtils.convertStringToDate(patientInfo.appointmentDate,)),
" ${DateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.appointmentDate,))} ${patientInfo.startTime}",
" ${DateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.appointmentDate,))} ${DateUtils.getStartTime(patientInfo.startTime)}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
):SizedBox()

@ -39,7 +39,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
decoration: BoxDecoration(
color: Colors.white,
),
height: height == 0 ? isInpatient? 210:200 : height,
height: height == 0 ? isInpatient? 215:200 : height,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),

@ -19,6 +19,7 @@ class AppScaffold extends StatelessWidget {
final Widget bottomSheet;
final Color backgroundColor;
final Widget appBar;
final String subtitle;
final bool isHomeIcon;
AppScaffold(
{this.appBarTitle = '',
@ -29,7 +30,7 @@ class AppScaffold extends StatelessWidget {
this.bottomSheet,
this.backgroundColor,
this.isHomeIcon = true,
this.appBar});
this.appBar, this.subtitle});
@override
Widget build(BuildContext context) {
@ -51,7 +52,14 @@ class AppScaffold extends StatelessWidget {
color: Colors.black87,
fontSize: 16.8,
)),
title: Text(appBarTitle.toUpperCase()),
title: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(appBarTitle.toUpperCase()),
if(subtitle!=null)
Text(subtitle,style: TextStyle(fontSize: 12,color: Colors.red),),
],
),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),

Loading…
Cancel
Save