Merge branch 'referral_in_patient' into 'development'

hot fixes

See merge request Cloud_Solution/doctor_app_flutter!614
merge-requests/608/merge
Mohammad Aljammal 5 years ago
commit 74181a5858

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

@ -15,7 +15,17 @@ class BaseService {
List<PatiantInformtion> patientArrivalList = []; List<PatiantInformtion> patientArrivalList = [];
//TODO add the user login model when we need it //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) { if (doctorProfile == null) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) { if (profile != null) {

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

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

@ -43,16 +43,15 @@ class ProcedureViewModel extends BaseViewModel {
List<FinalRadiology> get radiologyList => List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList; _radiologyService.finalRadiologyList;
List<PatientLabOrders> get patientLabOrdersList => _labsService.patientLabOrdersList;
List<LabOrderResult> get labOrdersResultsList => List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList; _labsService.labOrdersResultsList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List(); List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List(); List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
List<PatientLabOrdersList> get patientLabOrdersList =>
filterType == FilterType.Clinic
? _patientLabOrdersListClinic
: _patientLabOrdersListHospital;
Future getProcedure({int mrn,String patientType}) async { Future getProcedure({int mrn,String patientType}) async {
hasError = false; hasError = false;
@ -222,6 +221,8 @@ class ProcedureViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List(); List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom { List<LabResultList> get labResultListsCoustom {
return labResultLists; return labResultLists;
} }
@ -233,45 +234,6 @@ class ProcedureViewModel extends BaseViewModel {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } 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); setState(ViewState.Idle);
} }
} }

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

@ -75,6 +75,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
"patientType": "1", "patientType": "1",
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"isDischargedPatient":true,
"from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": 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( SizedBox(
height: 16, height: 16,
), ),
AppText( // AppText(
'Patient Type', // 'Patient Type',
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
), // ),
Row( // Row(
children: [ // children: [
Row( // Row(
children: [ // children: [
Radio( // Radio(
activeColor: Color(0xFFB9382C), // activeColor: Color(0xFFB9382C),
value: PatientType.inPatient, // value: PatientType.inPatient,
groupValue: selectedPatientType, // groupValue: selectedPatientType,
onChanged: (value) { // onChanged: (value) {
setState(() { // setState(() {
selectedPatientType = // selectedPatientType =
PatientType.inPatient; // PatientType.inPatient;
}); // });
}, // },
), // ),
Text('InPatient'), // Text('InPatient'),
], // ],
), // ),
Row( // Row(
children: [ // children: [
Radio( // Radio(
activeColor: Color(0xFFB9382C), // activeColor: Color(0xFFB9382C),
value: PatientType.OutPatient, // value: PatientType.OutPatient,
groupValue: selectedPatientType, // groupValue: selectedPatientType,
onChanged: (value) { // onChanged: (value) {
setState(() { // setState(() {
selectedPatientType = // selectedPatientType =
PatientType.OutPatient; // PatientType.OutPatient;
}); // });
}, // },
), // ),
Text('OutPatient'), // Text('OutPatient'),
], // ],
), // ),
], // ],
), // ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -299,8 +299,9 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
isSearchWithKeyInfo: isSearchWithKeyInfo:
patientFileInfoController.text.isNotEmpty ? true : false, patientFileInfoController.text.isNotEmpty ? true : false,
isSearch: true, isSearch: true,
isSearchAndOut:true,
searchKey: patientFileInfoController.text, searchKey: patientFileInfoController.text,
isInpatient: selectedPatientType != PatientType.OutPatient, isInpatient: false,
), ),
), ),
); );

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

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

@ -30,6 +30,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
bool isInpatient = false; bool isInpatient = false;
bool isDischargedPatient = false; bool isDischargedPatient = false;
bool isSearchAndOut = false;
String patientType; String patientType;
String arrivalType; String arrivalType;
String from; String from;
@ -66,6 +67,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
} }
if (routeArgs.containsKey("isDischargedPatient")) { if (routeArgs.containsKey("isDischargedPatient")) {
isDischargedPatient = routeArgs['isDischargedPatient']; isDischargedPatient = routeArgs['isDischargedPatient'];
}if (routeArgs.containsKey("isSearchAndOut")) {
isSearchAndOut = routeArgs['isSearchAndOut'];
} }
if (isInpatient) if (isInpatient)
_activeTab = 0; _activeTab = 0;
@ -101,24 +104,22 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
? 210 ? 210
: 0, : 0,
), ),
if(isFromSearch)
tabsBar(context, screenSize),
Container( Container(
height: isFromSearch ? MediaQuery height: !isSearchAndOut ? MediaQuery
.of(context) .of(context)
.size .size
.height * 0.60 : MediaQuery .height * 0.70 : MediaQuery
.of(context) .of(context)
.size .size
.height * 0.69, .height * 0.69,
child: ListView( child: ListView(
children: [ children: [
Container( Container(
child: isFromSearch child: isSearchAndOut
? Column( ? Column(
children: [ children: [
if (_activeTab == 0)
Padding( Padding(
padding: padding:
const EdgeInsets.symmetric( const EdgeInsets.symmetric(
@ -134,6 +135,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
crossAxisCount: 3, crossAxisCount: 3,
children: [ children: [
PatientProfileButton( PatientProfileButton(
isInPatient:
isInpatient,
patient: patient, patient: patient,
patientType: patientType:
patientType, patientType,
@ -153,17 +156,17 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.signs, .signs,
route: route:
VITAL_SIGN_DETAILS, VITAL_SIGN_DETAILS,
isInPatient: true,
icon: icon:
'patient/vital_signs.png'), 'patient/vital_signs.png'),
PatientProfileButton( PatientProfileButton(
isInPatient:
isInpatient,
patient: patient, patient: patient,
patientType: patientType:
patientType, patientType,
arrivalType: arrivalType:
arrivalType, arrivalType,
route: LAB_RESULT, route: LAB_RESULT,
isInPatient: true,
nameLine1: nameLine1:
TranslationBase TranslationBase
.of( .of(
@ -195,10 +198,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
TranslationBase TranslationBase
.of( .of(
context) context)
.result, .service,
icon: icon:
'patient/health_summary.png'), 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
isInPatient:
isInpatient,
patient: patient, patient: patient,
patientType: patientType:
patientType, patientType,
@ -206,15 +211,11 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
arrivalType, arrivalType,
route: route:
ORDER_PRESCRIPTION_NEW, ORDER_PRESCRIPTION_NEW,
isSelectInpatient:
_activeTab == 0,
isInPatient:
isInpatient,
nameLine1: nameLine1:
TranslationBase TranslationBase
.of( .of(
context) context)
.patient, .orders,
nameLine2: nameLine2:
TranslationBase TranslationBase
.of( .of(
@ -222,222 +223,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.prescription, .prescription,
icon: icon:
'patient/order_prescription.png'), '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( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -455,50 +240,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: icon:
'patient/health_summary.png'), '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( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -516,29 +257,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
nameLine2: "ECG", nameLine2: "ECG",
icon: icon:
'patient/patient_sick_leave.png'), '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( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -560,7 +278,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.procedures, .procedures,
icon: icon:
'patient/Order_Procedures.png'), 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -583,7 +300,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.service, .service,
icon: icon:
'patient/vital_signs.png'), 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -987,24 +703,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
VITAL_SIGN_DETAILS, VITAL_SIGN_DETAILS,
icon: icon:
'patient/vital_signs.png'), '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( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -1026,7 +724,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.result, .result,
icon: icon:
'patient/lab_results.png'), 'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
patient: patient, patient: patient,
patientType: patientType:
@ -1057,15 +754,20 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
patientType, patientType,
arrivalType: arrivalType:
arrivalType, arrivalType,
route: PATIENT_ECG, route:
ORDER_PRESCRIPTION_NEW,
nameLine1: nameLine1:
TranslationBase TranslationBase
.of( .of(
context) context)
.patient, .orders,
nameLine2: "ECG", nameLine2:
TranslationBase
.of(
context)
.prescription,
icon: icon:
'patient/patient_sick_leave.png'), 'patient/order_prescription.png'),
PatientProfileButton( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -1074,33 +776,41 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
patientType, patientType,
arrivalType: arrivalType:
arrivalType, arrivalType,
route: route: MEDICAL_FILE,
ORDER_PRESCRIPTION_NEW,
isSelectInpatient:
false,
nameLine1: nameLine1:
TranslationBase "Health",
.of( //TranslationBase.of(context).medicalReport,
context)
.orders,
nameLine2: 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 TranslationBase
.of( .of(
context) context)
.prescription, .patient,
nameLine2: "ECG",
icon: icon:
'patient/order_prescription.png'), 'patient/patient_sick_leave.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient:
isInpatient,
patient: patient, patient: patient,
patientType: patientType:
patientType, patientType,
arrivalType: arrivalType:
arrivalType, arrivalType,
route: route: ORDER_PROCEDURE,
ORDER_PROCEDURE,
isInPatient:
isInpatient,
nameLine1: nameLine1:
TranslationBase TranslationBase
.of( .of(
@ -1113,7 +823,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.procedures, .procedures,
icon: icon:
'patient/Order_Procedures.png'), 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,
@ -1136,7 +845,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
.service, .service,
icon: icon:
'patient/vital_signs.png'), 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
isInPatient: isInPatient:
isInpatient, isInpatient,

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

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

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

@ -361,6 +361,18 @@ class DateUtils {
return DateFormat('hh:mm a').format(dateTime); 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) { static String getTimeFormated(DateTime dateTime) {
print(dateTime); print(dateTime);
if (dateTime != null) if (dateTime != null)

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

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

@ -19,6 +19,7 @@ class AppScaffold extends StatelessWidget {
final Widget bottomSheet; final Widget bottomSheet;
final Color backgroundColor; final Color backgroundColor;
final Widget appBar; final Widget appBar;
final String subtitle;
final bool isHomeIcon; final bool isHomeIcon;
AppScaffold( AppScaffold(
{this.appBarTitle = '', {this.appBarTitle = '',
@ -29,7 +30,7 @@ class AppScaffold extends StatelessWidget {
this.bottomSheet, this.bottomSheet,
this.backgroundColor, this.backgroundColor,
this.isHomeIcon = true, this.isHomeIcon = true,
this.appBar}); this.appBar, this.subtitle});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -51,7 +52,14 @@ class AppScaffold extends StatelessWidget {
color: Colors.black87, color: Colors.black87,
fontSize: 16.8, 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) { leading: Builder(builder: (BuildContext context) {
return IconButton( return IconButton(
icon: Icon(Icons.arrow_back_ios), icon: Icon(Icons.arrow_back_ios),

Loading…
Cancel
Save