Merge branch 'arabic_issues' into 'diplomatic-quarter-live'

lab result issues

See merge request Cloud_Solution/diplomatic-quarter!112
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit e4cd33921d

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
///Doctor
@ -32,7 +32,7 @@ const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT =
'/Services/Patients.svc/REST/GetPatientLabResults';
'Services/Patients.svc/REST/GetPatientLabResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';

@ -833,6 +833,121 @@ const Map localizedValues = {
"HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '},
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"},
"Average": {"en": "Average", "ar": "المعدل"},
"DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"Period": {"en": "Period", "ar": "الفترة"},
"cm": {
"en": "CM",
"ar": "سم"
},
"kg": {
"en": "kg",
"ar": "كجم"
},
"mass": {
"en": "Mass",
"ar": "كتلة"
},
"temp-c": {
"en": "°C",
"ar": "°س"
},
"bpm": {
"en": "bpm",
"ar": "نبضة"
},
"respiration-signs": {
"en": "Respiration",
"ar": "تنفس"
},
"sys-dias": {
"en": "SBP/DBP",
"ar": "إنقباض/إنبساط"
},
"body": {
"en": "Body \n Mass",
"ar": "كتلة\nالجسم"
},
"feedback": {
"en": "Feedback",
"ar": "رأيك يهمنا"
},
"send": {
"en": "Send",
"ar": "أرسل"
},
"status": {
"en": "Status",
"ar": "الحالة"
},
"like-to-hear": {
"en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
},
"subject": {
"en": "Subject",
"ar": "الموضوع"
},
"message": {
"en": "Message",
"ar": "رسالة"
},
"empty-subject": {
"en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
},
"empty-message": {
"en": "Please enter message",
"ar": "يرجى ادخال الموضوع"
},
"select-attachment": {
"en": "Select Attachment",
"ar": "إختر المرفق"
},
"complain-appo": {
"en": "Complaint for appointment",
"ar": "شكوى على موعد"
},
"complain-without-appo": {
"en": "Complaint without appointment",
"ar": "شكوى بدون موعد"
},
"question": {
"en": "Question",
"ar": "سؤال"
},
"message-type": {
"en": "Message Type",
"ar": "نوع الرسالة"
},
"compliment": {
"en": "compliment",
"ar": "ثناء"
},
"suggestion": {
"en": "Suggestion",
"ar": "إقتراح"
},
"your-feedback": {
"en": "Your feedback was sent",
"ar": "إقتراح"
},
"select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
},
"number": {
"en": "Number",
"ar": "الرقم"
},
"not-classified": {
"en": "Not classified",
"ar": "غير محدد"
},
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"},
};

@ -86,3 +86,14 @@ class LabResult {
return data;
}
}
class LabResultList {
String filterName = "";
List<LabResult> patientLabResultList = List();
LabResultList(
{this.filterName, LabResult lab}) {
patientLabResultList.add(lab);
}
}

@ -1,6 +1,6 @@
class PharmacyPrescriptions {
String expiryDate;
double sellingPrice;
dynamic sellingPrice;
int quantity;
int itemID;
int locationID;

@ -9,11 +9,12 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LabsService extends BaseService {
RequestPatientLabOrders _requestPatientLabOrders = RequestPatientLabOrders();
List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList() async {
hasError = false;
Map<String,dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_Patient_LAB_ORDERS,
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear();
@ -23,7 +24,7 @@ class LabsService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPatientLabOrders.toJson());
}, body: body);
}
RequestPatientLabSpecialResult _requestPatientLabSpecialResult =
@ -60,10 +61,10 @@ class LabsService extends BaseService {
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['Procedure'] = "U/A";
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
//TODO Check the res
await baseAppClient.post(GET_Patient_LAB_RESULT,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();

@ -57,12 +57,13 @@ class PrescriptionsService extends BaseService {
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport(
{int dischargeNo, int projectId, int clinicID, String setupID}) async {
{int dischargeNo, int projectId, int clinicID, String setupID,int episodeID}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo;
_requestPrescriptionReport.projectID = projectId;
_requestPrescriptionReport.clinicID = clinicID;
_requestPrescriptionReport.setupID = setupID;
_requestPrescriptionReport.episodeID = episodeID;
await baseAppClient.post(GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {

@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import '../../../locator.dart';
@ -22,7 +24,31 @@ class FeedbackViewModel extends BaseViewModel {
MessageType messageType = MessageType.NON;
MessageType messageTypeDialog = MessageType.NON;
String selected = "not selected";
String getSelected(BuildContext context) {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
return TranslationBase.of(context).complainAppo;
break;
case MessageType.ComplaintWithoutAppointment:
return TranslationBase.of(context).complainWithoutAppo;
break;
case MessageType.Question:
return TranslationBase.of(context).question;
break;
case MessageType.Compliment:
return TranslationBase.of(context).compliment;
break;
case MessageType.Suggestion:
return TranslationBase.of(context).suggestion;
break;
case MessageType.NON:
return TranslationBase.of(context).notClassified;
break;
}
return TranslationBase.of(context).notClassified;
}
setMessageDialogType(MessageType messageType) {
messageTypeDialog = messageType;
@ -33,19 +59,14 @@ class FeedbackViewModel extends BaseViewModel {
this.messageType = messageType;
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
selected = "Complaint on an appointment";
break;
case MessageType.ComplaintWithoutAppointment:
selected = "Complaint without appointment";
break;
case MessageType.Question:
selected = "Question";
break;
case MessageType.Compliment:
selected = "Compliment";
break;
case MessageType.Suggestion:
selected = "Suggestion";
break;
case MessageType.NON:
break;

@ -82,6 +82,8 @@ class LabsViewModel extends BaseViewModel {
List<LabResult> get labResultList => _labsService.labResultList;
List<LabResultList> labResultLists = List();
getLaboratoryResult(
{String projectID,
int clinicID,
@ -110,6 +112,24 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error;
setState(ViewState.Error);
} else {
_labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic =
labResultLists
.where((elementClinic) =>
elementClinic.filterName == element.testCode)
.toList();
if (patientLabOrdersClinic.length != 0) {
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
} else {
labResultLists.add(LabResultList(
filterName: element.testCode,
lab: element));
}
});
setState(ViewState.Idle);
}
}

@ -103,9 +103,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners();
}
getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID}) async {
getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID,int episodeID}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID,episodeID: episodeID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);

@ -1,6 +1,7 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -35,7 +36,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
isShowAppBar: true,
isBottomBar: false,
isShowDecPage: false,
appBarTitle: 'Feedback',
appBarTitle: TranslationBase.of(context).feedbackTitle,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -82,13 +83,13 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts('Send'),
child: Texts(TranslationBase.of(context).send),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts('Status'),
child: Texts(TranslationBase.of(context).status),
),
),
],

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
@ -52,8 +53,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 8),
child: Texts(
'We\'d love to hear your feedback about the health care services and online services. Please fill in the required fields',
//يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة
TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center,
variant: 'body2Link',
),
@ -75,11 +75,12 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
child: Texts(
model.selected,
model.getSelected(context),
variant: 'bodyText',
),
margin: EdgeInsets.only(left: 10),
margin: EdgeInsets.only(left: 10,right: 10),
),
Icon(
Icons.arrow_drop_down,
@ -278,14 +279,14 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: 'Title',
hintText: TranslationBase.of(context).subject,
controller: titleController,
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
validator: (value) {
if (value == null)
return "please Enter title";
return TranslationBase.of(context).emptySubject;
else
return null;
},
@ -294,7 +295,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: 'message',
hintText: TranslationBase.of(context).message,
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
@ -303,7 +304,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
controller: messageController,
validator: (value) {
if (value == null)
return "please Enter message";
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
@ -332,7 +333,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
children: <Widget>[
Icon(Icons.attach_file),
Texts(
'selected attachment',
TranslationBase.of(context).selectAttachment,
variant: 'bodyText',
textAlign: TextAlign.center,
),
@ -391,7 +392,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
height: MediaQuery.of(context).size.height * 0.1,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Send',
label: TranslationBase.of(context).send,
loading: model.state == ViewState.BusyLocal,
onTap: () {
final form = formKey.currentState;
@ -415,13 +416,13 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
});
model.setMessageType(MessageType.NON);
AppToast.showSuccessToast(
message: "Your feedback was send");
message: TranslationBase.of(context).yourFeedback);
} else {
AppToast.showErrorToast(message: model.error);
}
});
else {
AppToast.showErrorToast(message: "Please select COC");
AppToast.showErrorToast(message: TranslationBase.of(context).selectPart);
}
},
),
@ -489,7 +490,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
return BaseView<FeedbackViewModel>(
builder: (_, model, widge) => SimpleDialog(
title: Text(
"Message Type",
TranslationBase.of(context).messageType,
textAlign: TextAlign.center,
),
children: <Widget>[
@ -509,7 +510,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
onTap: () => model.setMessageDialogType(
MessageType.ComplaintOnAnAppointment),
child: ListTile(
title: const Text('Complaint on an appointment'),
title: Texts(TranslationBase.of(context).complainAppo),
leading: Radio(
value: MessageType.ComplaintOnAnAppointment,
groupValue: model.messageTypeDialog,
@ -533,7 +534,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
onTap: () => model.setMessageDialogType(
MessageType.ComplaintWithoutAppointment),
child: ListTile(
title: const Text('Complaint without appointment'),
title: Texts(TranslationBase.of(context).complainWithoutAppo),
leading: Radio(
value: MessageType.ComplaintWithoutAppointment,
groupValue: model.messageTypeDialog,
@ -557,7 +558,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
onTap: () =>
model.setMessageDialogType(MessageType.Question),
child: ListTile(
title: const Text('Question'),
title: Texts(TranslationBase.of(context).question),
leading: Radio(
value: MessageType.Question,
groupValue: model.messageTypeDialog,
@ -581,7 +582,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
onTap: () =>
model.setMessageDialogType(MessageType.Compliment),
child: ListTile(
title: const Text('compliment'),
title: Texts(TranslationBase.of(context).compliment),
leading: Radio(
value: MessageType.Compliment,
groupValue: model.messageTypeDialog,
@ -605,7 +606,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
onTap: () =>
model.setMessageDialogType(MessageType.Suggestion),
child: ListTile(
title: const Text('Suggestion'),
title: Texts(TranslationBase.of(context).suggestion),
leading: Radio(
value: MessageType.Suggestion,
groupValue: model.messageTypeDialog,
@ -638,11 +639,11 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
padding: EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Texts(
'cancel',
TranslationBase.of(context).cancel,
color: Colors.red,
),
),
@ -666,7 +667,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
'ok',
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -52,7 +53,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
'Number :${model.cOCItemList[index].itemID}',
TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -19,7 +20,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: prescriptionReport.itemID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: 'Title',
appBarTitle: TranslationBase.of(context).ports,
baseViewModel: model,
body: ListView.builder(
itemBuilder: (context, index) => Container(

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -15,7 +16,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Prescription Details',
appBarTitle: TranslationBase.of(context).prescriptions,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -86,7 +87,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
SizedBox(
height: 5,
),
Texts('Ports')
Texts(TranslationBase.of(context).ports)
],
),
)),
@ -104,22 +105,22 @@ class PrescriptionDetailsPage extends StatelessWidget {
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Way'))),
child: Center(child: Texts(TranslationBase.of(context).way))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Average'))),
child: Center(child: Texts(TranslationBase.of(context).average))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Daily doses'))),
child: Center(child: Texts(TranslationBase.of(context).dailyDoses))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(child: Texts('Period'))),
child: Center(child: Texts(TranslationBase.of(context).period))),
],
),
TableRow(
@ -162,7 +163,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
child: Center(
child: Column(
children: <Widget>[
Texts('Notes'),
Texts(TranslationBase.of(context).notes),
SizedBox(
height: 5,
),

@ -20,7 +20,7 @@ class PrescriptionItemsPage extends StatelessWidget {
Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) =>
model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo,setupID:prescriptions.setupID,clinicID: prescriptions.clinicID,projectId: prescriptions.projectID),
model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo,setupID:prescriptions.setupID,clinicID: prescriptions.clinicID,projectId: prescriptions.projectID,episodeID: prescriptions.episodeID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions,
@ -81,7 +81,7 @@ class PrescriptionItemsPage extends StatelessWidget {
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.2,
height: MediaQuery.of(context).size.height * 0.23,
color: Colors.grey[100],
child: Column(
children: <Widget>[
@ -89,7 +89,7 @@ class PrescriptionItemsPage extends StatelessWidget {
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Send Copy',
label: TranslationBase.of(context).sendCopy,
onTap: () => model.sendPrescriptionEmail(
appointmentDate: prescriptions.appointmentDate,
patientID: prescriptions.patientID,
@ -102,7 +102,7 @@ class PrescriptionItemsPage extends StatelessWidget {
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Resend order & deliver',
label:TranslationBase.of(context).resendOrder,
backgroundColor: Colors.green[200],
))
],

@ -55,7 +55,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
mode.vitalSignResModelList.length - 1]
.heightCm
.toString(),
unit: ' Cm',
unit: TranslationBase.of(context).cm,
),
),
),
@ -73,7 +73,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
child: VitalSignItem(
des: TranslationBase.of(context).weight,
icon: DQIcons.weight_scale,
unit: ' Kg',
unit: TranslationBase.of(context).kg,
lastVal: mode
.vitalSignResModelList[
mode.vitalSignResModelList.length - 1]
@ -98,12 +98,12 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
child: VitalSignItem(
des: TranslationBase.of(context).bodyMeasurements,
des: TranslationBase.of(context).body,
icon: DQIcons.bmi,
lastVal: mode
.vitalSignResModelList[0].pulseBeatPerMinute
.toString(),
unit: 'BMI',
unit: TranslationBase.of(context).mass,
),
),
InkWell(
@ -125,7 +125,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
lastVal: mode
.vitalSignResModelList[0].temperatureCelcius
.toString(),
unit: 'C',
unit: TranslationBase.of(context).tempC,
),
),
),
@ -152,7 +152,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
mode.vitalSignResModelList.length - 1]
.pulseBeatPerMinute
.toString(),
unit: ' bpm',
unit: TranslationBase.of(context).bpm,
),
),
InkWell(
@ -175,7 +175,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
mode.vitalSignResModelList.length - 1]
.respirationBeatPerMinute
.toString(),
unit: ' bmp',
unit: TranslationBase.of(context).respirationSigns,
),
),
],
@ -202,7 +202,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
mode.vitalSignResModelList.length - 1]
.bloodPressure
.toString(),
unit: ' SBP/DBP',
unit: TranslationBase.of(context).sysDias,
),
),
],

@ -791,6 +791,40 @@ class TranslationBase {
String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode];
String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode];
String get moreDetails => localizedValues['MoreDetails'][locale.languageCode];
String get sendCopy => localizedValues['SendCopy'][locale.languageCode];
String get resendOrder => localizedValues['ResendOrder'][locale.languageCode];
String get ports => localizedValues['Ports'][locale.languageCode];
String get way => localizedValues['Way'][locale.languageCode];
String get average => localizedValues['Average'][locale.languageCode];
String get dailyDoses => localizedValues['DailyDoses'][locale.languageCode];
String get period => localizedValues['Period'][locale.languageCode];
String get cm => localizedValues['cm'][locale.languageCode];
String get kg => localizedValues['kg'][locale.languageCode];
String get mass => localizedValues['mass'][locale.languageCode];
String get tempC => localizedValues['temp-c'][locale.languageCode];
String get bpm => localizedValues['bpm'][locale.languageCode];
String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode];
String get sysDias => localizedValues['sys-dias'][locale.languageCode];
String get body => localizedValues['body'][locale.languageCode];
String get feedbackTitle => localizedValues['feedback'][locale.languageCode];
String get send => localizedValues['send'][locale.languageCode];
String get status => localizedValues['status'][locale.languageCode];
String get likeToHear => localizedValues['like-to-hear'][locale.languageCode];
String get subject => localizedValues['subject'][locale.languageCode];
String get message => localizedValues['message'][locale.languageCode];
String get emptySubject => localizedValues['empty-subject'][locale.languageCode];
String get emptyMessage => localizedValues['empty-message'][locale.languageCode];
String get selectAttachment => localizedValues['select-attachment'][locale.languageCode];
String get complainAppo => localizedValues['complain-appo'][locale.languageCode];
String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode];
String get question => localizedValues['question'][locale.languageCode];
String get messageType => localizedValues['message-type'][locale.languageCode];
String get compliment => localizedValues['compliment'][locale.languageCode];
String get suggestion => localizedValues['suggestion'][locale.languageCode];
String get yourFeedback => localizedValues['your-feedback'][locale.languageCode];
String get selectPart => localizedValues['select-part'][locale.languageCode];
String get number => localizedValues['number'][locale.languageCode];
String get notClassified => localizedValues['not-classified'][locale.languageCode];
}

@ -0,0 +1,160 @@
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../text.dart';
class LabResultWidget extends StatelessWidget {
final String filterName ;
final List<LabResult> patientLabResultList;
LabResultWidget({Key key, this.filterName, this.patientLabResultList}) : super(key: key);
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Container(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(filterName),
InkWell(
onTap: () {
//TODO model.getPatientLabResult(patientLabOrder: widget.patientLabOrder);
},
child: Texts(
'Flow Chart',
decoration: TextDecoration.underline,
color: Colors.blue,
),
),
],
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(
width: 2.0, color: Colors.grey[300]),
),
children: fullData(patientLabResultList),
),
],
),
);
}
List<TableRow> fullData(List<LabResult> labResultList) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Color(0xff515B5D),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
),
),
child: Center(
child: Texts(
'Description',
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Color(0xff515B5D),
),
child: Center(
child: Texts('Value', color: Colors.white),
),
height: 60),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Color(0xff515B5D),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
),
),
child: Center(
child: Texts('Range', color: Colors.white),
),
height: 60),
),
],
),
);
labResultList.forEach((lab) {
tableRow.add(
TableRow(
children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.description,
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.resultValue,
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.referanceRange,
textAlign: TextAlign.center,
),
),
),
),
],
),
);
});
return tableRow;
}
}

@ -6,10 +6,12 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../text.dart';
import 'LabResultWidget.dart';
class LaboratoryResultWidget extends StatefulWidget {
final GestureTapCallback onTap;
@ -153,7 +155,9 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
duration: Duration(milliseconds: 7000),
child: Container(
width: double.infinity,
child: Text(widget.details ?? 'No Data')),
child: Html(
data: widget.details ?? 'No Data',
)),
),
SizedBox(
height: 12,
@ -222,32 +226,16 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts('U/A'),
InkWell(
onTap: () {
model.getPatientLabResult(
patientLabOrder:
widget.patientLabOrder);
},
child: Texts(
'Flow Chart',
decoration: TextDecoration.underline,
color: Colors.blue,
),
),
],
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(
width: 2.0, color: Colors.grey[300]),
...List.generate(
model.labResultLists.length,
(index) => LabResultWidget(
filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
),
children: fullData(model.labResultList),
),
)
],
),
),
@ -264,108 +252,5 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
);
}
List<TableRow> fullData(List<LabResult> labResultList) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Container(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
),
),
child: Center(
child: Texts(
'Description',
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
),
child: Center(
child: Texts('Value', color: Colors.white),
),
height: 60),
),
Container(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
),
),
child: Center(
child: Texts('Range', color: Colors.white),
),
height: 60),
),
],
),
);
labResultList.forEach((lab) {
tableRow.add(
TableRow(
children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.description,
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.resultValue,
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
lab.referanceRange,
textAlign: TextAlign.center,
),
),
),
),
],
),
);
});
return tableRow;
}
}

Loading…
Cancel
Save