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

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

@ -36,6 +36,35 @@ class UcafService extends LookupService {
}, 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(
PatiantInformtion patient, String fromDate, String toDate) async {
hasError = false;

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

@ -67,7 +67,8 @@ class UcafViewModel extends BaseViewModel {
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);
if (_ucafService.hasError) {

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

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

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

@ -90,15 +90,46 @@ class ReferralPatientDetailScreen extends StatelessWidget {
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.network(
referredPatient.doctorImageURL
Column(
children: [
InkWell(
onTap: () {
PatiantInformtion patient =
model.getPatientFromReferralO(referredPatient);
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(
width: 10,
@ -321,7 +352,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
margin:
EdgeInsets.only(left: 10, right: 0),
child: Image.asset(
'assets/images/patient/ic_ref_arrow_left.png',
'assets/images/patient/ic_ref_arrow_up.png',
height: 50,
width: 30,
),

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

@ -1175,6 +1175,7 @@ class TranslationBase {
localizedValues['noDataAvailable'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][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 reschedule => localizedValues['reschedule'][locale.languageCode];

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

Loading…
Cancel
Save