some functionality and design changes

merge-requests/586/head
mosazaid 5 years ago
parent 4f44aa145e
commit ddc266416d

@ -383,8 +383,8 @@ const Map<String, Map<String, String>> localizedValues = {
'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'}, 'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'},
'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'}, 'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'},
'yourBodyMassIndex': { 'yourBodyMassIndex': {
'en': "Your Body Mass Index is", 'en': "Body Mass Index is",
'ar': 'مؤشر كتلة جسمك هو' 'ar': 'مؤشر كتلة الجسم هو'
}, },
'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'}, 'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'},
'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'}, 'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'},
@ -867,4 +867,5 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى" "ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى"
}, },
"showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"}, "showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"},
"viewProfile": {"en": "View Profile", "ar": "إعرض الملف"},
}; };

@ -132,7 +132,7 @@ class LabsService extends BaseService {
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID; body['ClinicID'] = patientLabOrder.clinicID ?? 0;
} }
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['Procedure'] = procedure; body['Procedure'] = procedure;

@ -36,6 +36,35 @@ class UcafService extends LookupService {
}, body: body); }, body: body);
} }
Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId;
body['PatientTypeID'] = 1;
if(isInPatient){
body['InOutPatientType'] = 1;
}else {
body['InOutPatientType'] = 2;
}
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
if (response['List_DoctorPatientVitalSign'] != null) {
response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
});
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();
},
body: body,
);
}
Future getPatientVitalSignsHistory( Future getPatientVitalSignsHistory(
PatiantInformtion patient, String fromDate, String toDate) async { PatiantInformtion patient, String fromDate, String toDate) async {
hasError = false; hasError = false;

@ -67,12 +67,16 @@ class VitalSignsService extends BaseService {
); );
} }
Future getInPatientVitalSignHistory(PatiantInformtion patient) async { Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId; body['PatientID'] = patient.patientId;
body['InOutPatientType'] = 1;
body['PatientTypeID'] = 1; body['PatientTypeID'] = 1;
if(isInPatient){
body['InOutPatientType'] = 1;
}else {
body['InOutPatientType'] = 2;
}
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_VITAL_SIGN, GET_PATIENT_VITAL_SIGN,

@ -67,7 +67,8 @@ class UcafViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
await _ucafService.getPatientVitalSignsHistory(patient, from, to); // await _ucafService.getPatientVitalSignsHistory(patient, from, to);
await _ucafService.getInPatientVitalSignHistory(patient, false);
await _ucafService.getPatientChiefComplaint(patient); await _ucafService.getPatientChiefComplaint(patient);
if (_ucafService.hasError) { if (_ucafService.hasError) {

@ -52,11 +52,12 @@ class VitalSignsViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if (isInPatient) { await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient);
await _vitalSignService.getInPatientVitalSignHistory(patient); // if (isInPatient) {
} else { // await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient);
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); // } else {
} // await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
// }
if (_vitalSignService.hasError) { if (_vitalSignService.hasError) {
error = _vitalSignService.error; error = _vitalSignService.error;

@ -16,8 +16,9 @@ class FlowChartPage extends StatelessWidget {
final PatientLabOrders patientLabOrder; final PatientLabOrders patientLabOrder;
final String filterName; final String filterName;
final PatiantInformtion patient; final PatiantInformtion patient;
final bool isInpatient;
FlowChartPage({this.patientLabOrder, this.filterName, this.patient}); FlowChartPage({this.patientLabOrder, this.filterName, this.patient, this.isInpatient});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -36,7 +36,7 @@ class LabResultWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (!isInpatient) // if (!isInpatient)
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -50,6 +50,7 @@ class LabResultWidget extends StatelessWidget {
filterName: filterName, filterName: filterName,
patientLabOrder: patientLabOrder, patientLabOrder: patientLabOrder,
patient: patient, patient: patient,
isInpatient: isInpatient,
), ),
), ),
); );

@ -90,15 +90,46 @@ class ReferralPatientDetailScreen extends StatelessWidget {
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Column(
padding: EdgeInsets.only(left: 12.0), children: [
child: Container( InkWell(
width: 60, onTap: () {
height: 60, PatiantInformtion patient =
child: Image.network( model.getPatientFromReferralO(referredPatient);
referredPatient.doctorImageURL Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient,
"patientType": "1",
"isInpatient": true,
"arrivalType": "1",
"from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
});
},
child: Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
referredPatient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
),
), ),
), SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context).viewProfile,
fontWeight: FontWeight.w700,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Colors.red[700],
)
],
), ),
SizedBox( SizedBox(
width: 10, width: 10,
@ -321,7 +352,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
margin: margin:
EdgeInsets.only(left: 10, right: 0), EdgeInsets.only(left: 10, right: 0),
child: Image.asset( child: Image.asset(
'assets/images/patient/ic_ref_arrow_left.png', 'assets/images/patient/ic_ref_arrow_up.png',
height: 50, height: 50,
width: 30, width: 30,
), ),

@ -127,10 +127,10 @@ class ReferredPatientDetailScreen extends StatelessWidget {
height: 20, height: 20,
), ),
AppText( AppText(
TranslationBase.of(context).showDetail, TranslationBase.of(context).viewProfile,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Colors.blue, color: Colors.red[700],
) )
], ],
), ),

@ -1175,6 +1175,7 @@ class TranslationBase {
localizedValues['noDataAvailable'][locale.languageCode]; localizedValues['noDataAvailable'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode];
String get showDetail => localizedValues['showDetail'][locale.languageCode]; String get showDetail => localizedValues['showDetail'][locale.languageCode];
String get viewProfile => localizedValues['viewProfile'][locale.languageCode];
String get fileNumber => localizedValues['fileNumber'][locale.languageCode]; String get fileNumber => localizedValues['fileNumber'][locale.languageCode];
String get reschedule => localizedValues['reschedule'][locale.languageCode]; String get reschedule => localizedValues['reschedule'][locale.languageCode];

@ -328,7 +328,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
), ),
Expanded( Expanded(
flex: 4, flex: 5,
child: Container( child: Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
child: Column( child: Column(
@ -467,5 +467,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
} }
@override @override
Size get preferredSize => Size(double.maxFinite, 290); Size get preferredSize => Size(double.maxFinite, 310);
} }

Loading…
Cancel
Save