Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patients-new-design

merge-requests/377/head
mosazaid 5 years ago
commit 7117540a24

@ -10,7 +10,6 @@ import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'dart:io' show Platform; import 'dart:io' show Platform;
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = new Helpers(); Helpers helpers = new Helpers();
//ProjectProvider projectsProvider = new ProjectProvider(); //ProjectProvider projectsProvider = new ProjectProvider();
@ -86,7 +85,7 @@ class BaseAppClient {
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
String asd= json.encode(body);
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(url, final response = await http.post(url,
body: json.encode(body), body: json.encode(body),
@ -172,7 +171,6 @@ class BaseAppClient {
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
body['PatientType'] = body.containsKey('PatientType') body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] != null
? body['PatientType'] ? body['PatientType']
@ -197,7 +195,6 @@ class BaseAppClient {
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe body['SessionID'] = SESSION_ID; //getSe
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");

@ -843,7 +843,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
model.dashboardItemsList[5] model.dashboardItemsList[6]
.kPIName, .kPIName,
fontSize: fontSize:
SizeConfig.textMultiplier * SizeConfig.textMultiplier *
@ -869,11 +869,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
Axis.horizontal, Axis.horizontal,
children: new List.generate( children: new List.generate(
model model
.dashboardItemsList[5] .dashboardItemsList[6]
.summaryoptions .summaryoptions
.length, (int index) { .length, (int index) {
return getActivityButton(model return getActivityButton(model
.dashboardItemsList[5] .dashboardItemsList[6]
.summaryoptions[index]); .summaryoptions[index]);
}))) })))
], ],

@ -478,34 +478,31 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
// Container( Container(
// decoration: BoxDecoration( decoration: BoxDecoration(
// borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
// Radius.circular(6.0)), Radius.circular(6.0)),
// border: Border.all( border: Border.all(
// width: 1.0, width: 1.0,
// color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
// padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
// child: AppTextFormField( child: AppTextFormField(
// labelText: TranslationBase.of(context) labelText: TranslationBase.of(context)
// .patientFile, .patientFile,
// borderColor: Colors.white, borderColor: Colors.white,
// textInputType: TextInputType.number, textInputType: TextInputType.number,
// focusNode: _nodeText3, focusNode: _nodeText3,
// inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
// onSaved: (value) {}, onSaved: (value) {},
// ), ),
// ), ),
// (!(_selectedType == '2' || (!(_selectedType == '2' ||
// _selectedType == '4')) _selectedType == '4'))
// ? DynamicElements( ? DynamicElements(
// _patientSearchFormValues, _patientSearchFormValues,
// isFormSubmitted) isFormSubmitted)
// : SizedBox( : SizedBox(
// height: 0, height: 0,
// ),
SizedBox(
height: 10,
), ),
SizedBox( SizedBox(
height: 10, height: 10,

@ -304,6 +304,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
//if (val2 == 7) { //if (val2 == 7) {
responseModelList.sort((a, b) { responseModelList.sort((a, b) {
if (b.startTime != null && b.startTime != null) { if (b.startTime != null && b.startTime != null) {
try {
DateTime now = DateTime.now(); DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate = String formattedDate =
@ -315,6 +316,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
var adate = dateTimeA; //a.startTime; var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB; var bdate = dateTimeB;
return adate.compareTo(bdate); return adate.compareTo(bdate);
} on Exception catch (_) {
print('never reached');
var adate = a.startTime; //a.startTime;
var bdate = b.startTime;
return adate.compareTo(bdate);
}
} else { } else {
var adate = convertDateFormat(a.appointmentDate); var adate = convertDateFormat(a.appointmentDate);
var bdate = convertDateFormat(b.appointmentDate); var bdate = convertDateFormat(b.appointmentDate);
@ -549,8 +556,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
.getFrom, .getFrom,
"to": "to":
patient.getTo, patient.getTo,
"isSearch": isSearch, "isSearch":
"arrivalType" :arrivalType, isSearch,
"arrivalType":
arrivalType,
}); });
}, },
); );

@ -407,7 +407,9 @@ class PatientProfileScreen extends StatelessWidget {
if (patient.episodeNo == 0) if (patient.episodeNo == 0)
BorderedButton( BorderedButton(
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
backgroundColor: Colors.red.shade700, backgroundColor: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
textColor: Colors.white, textColor: Colors.white,
vPadding: 8, vPadding: 8,
radius: 30, radius: 30,
@ -421,17 +423,21 @@ class PatientProfileScreen extends StatelessWidget {
height: 30, height: 30,
), ),
handler: () async { handler: () async {
if (patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel postEpisodeReqModel =
PostEpisodeReqModel( PostEpisodeReqModel(
appointmentNo: patient.appointmentNo, appointmentNo:
patient.appointmentNo,
patientMRN: patient.patientMRN); patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.postEpisode(postEpisodeReqModel); await model
.postEpisode(postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
patient.episodeNo = model.episodeID; patient.episodeNo = model.episodeID;
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
CREATE_EPISODE, CREATE_EPISODE,
arguments: {'patient': patient}); arguments: {'patient': patient});
}
}, },
), ),
if (patient.episodeNo != 0) if (patient.episodeNo != 0)

@ -122,8 +122,9 @@ class PatientCard extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
patientInfo.nationalityName ?? patientInfo.nationalityName != null
patientInfo.nationality, ? patientInfo.nationalityName
: patientInfo.nationality,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
@ -253,15 +254,19 @@ class PatientCard extends StatelessWidget {
width: 3.5, width: 3.5,
), ),
Container( Container(
child: AppText( child: patientInfo.appointmentDate != null
DateUtils.convertDateFromServerFormat( ? AppText(
patientInfo.appointmentDate DateUtils
.convertDateFromServerFormat(
patientInfo
.appointmentDate
.toString(), .toString(),
'yyyy-MM-dd'), 'yyyy-MM-dd'),
fontSize: fontSize: 1.5 *
1.5 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), )
: SizedBox(),
), ),
SizedBox( SizedBox(
height: 0.5, height: 0.5,

@ -79,7 +79,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: LAB_ORDERS, route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'), icon: 'patient/lab_results.png'),
@ -104,7 +104,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_ADMISSION_REQUEST, route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).admission, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request, nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'), icon: 'patient/admission_req.png'),
@ -123,6 +123,13 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'), icon: 'patient/order_prescription.png'),
PatientProfileButton(
key: key,
patient: patient,
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) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -159,7 +166,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: RADIOLOGY, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
@ -167,7 +174,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_INSURANCE_APPROVALS, route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),

@ -45,7 +45,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: LAB_ORDERS, route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'), icon: 'patient/lab_results.png'),
@ -69,14 +69,14 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
? PatientProfileButton( ? PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ORDER_PRESCRIPTION, route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png') icon: 'patient/order_prescription.png')
: PatientProfileButton( : PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ORDER_PRESCRIPTION_HISTORY, route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'), icon: 'patient/order_prescription.png'),

Loading…
Cancel
Save