fix issues in the services logic and add some translation

er_location
Elham Rababah 4 years ago
parent da7131015e
commit 83ab1b4d61

@ -262,6 +262,7 @@ const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAl
const GET_PATIENT_ALL_PRES_ORDERS ="Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders";
const PATIENT_ER_UPDATE_PRES_ORDER ="Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS ="Services/Patients.svc/REST/GetCheckUpItems";
const TIMER_MIN = 10;

@ -546,26 +546,54 @@ const Map<String, Map<String, String>> localizedValues = {
"VA":{"en":"Prism","ar":"المحاور"},
"LeftEye":{"en":"Left Eye","ar":"العين اليسرى"},
"Brand":{"en":"Brand","ar":"النوع"},
"Power":{"en":"Power","ar":"القوة"},
"Diameter":{"en":"Diameter","ar":"القطر"},
"Remarks":{"en":"Remarks","ar":"ملاحضات"},
"ActiveMedications":{"en":"Active Medications","ar":"ادويتي النشطة"},
"ExpDate":{"en":"Active Exp Date :","VA":"تاريخ الإنتهاء"},
"Route":{"en":"Route :","ar":"الطريقة"},
"Frequency":{"en":"Frequency :","ar":"المعدل"},
"DailyQuantity":{"en":"Daily Quantity :","ar":"جرعات يومية"},
"AddReminder":{"en":"Add Reminder","ar":"إضافة تذكير"},
"reminderDes":{"en":"Please select treatment start day and time to be notified when it\'s time to take the medicine","ar":" يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء"},
"StartDay":{"en":"Start Day","ar":"يوم البداية"},
"EndDay":{"en":"End Day","ar":"يوم الانتهاء"},
"Days":{"en":"Days ","ar":"أيام"},
"ScheduleTime":{"en":"Schedule time","ar":"الجدول الزمني"},
"AskDoctor":{"en":"Ask Doctor","ar":"اسأل طبيبك"},
"DoctorResponses":{"en":"Doctor Responses","ar":"ردود الأطباء"},
"New":{"en":"New","ar":"جديد"},
"All":{"en":"All","ar":"الكل"},
"QuestionHere":{"en":"Enter the question here...","ar":"اضف الاستفسار هنا"},
"ViewDoctorResponses":{"en":"View Doctor Responses","ar":"الاطلاع على ردود الأطباء"},
"Power": {"en": "Power", "ar": "القوة"},
"Diameter": {"en": "Diameter", "ar": "القطر"},
"Remarks": {"en": "Remarks", "ar": "ملاحضات"},
"ActiveMedications": {"en": "Active Medications", "ar": "ادويتي النشطة"},
"ExpDate": {"en": "Active Exp Date :", "VA": "تاريخ الإنتهاء"},
"Route": {"en": "Route :", "ar": "الطريقة"},
"Frequency": {"en": "Frequency :", "ar": "المعدل"},
"DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"},
"AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"},
"reminderDes": {
"en":
"Please select treatment start day and time to be notified when it\'s time to take the medicine",
"ar":
" يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء"
},
"StartDay": {"en": "Start Day", "ar": "يوم البداية"},
"EndDay": {"en": "End Day", "ar": "يوم الانتهاء"},
"Days": {"en": "Days ", "ar": "أيام"},
"ScheduleTime": {"en": "Schedule time", "ar": "الجدول الزمني"},
"AskDoctor": {"en": "Ask Doctor", "ar": "اسأل طبيبك"},
"DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"},
"New": {"en": "New", "ar": "جديد"},
"All": {"en": "All", "ar": "الكل"},
"QuestionHere": {
"en": "Enter the question here...",
"ar": "اضف الاستفسار هنا"
},
"ViewDoctorResponses": {
"en": "View Doctor Responses",
"ar": "الاطلاع على ردود الأطباء"
},
"ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"},
"HomeHealthCare": {
"en": "Home Health Care",
"ar": " الرعاية الصحية المنزلية "
},
"HomeHealthCareText": {
"en":
"This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
"ar":
"توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي)... "
},
"LoginRegister": {
"en": "Login/Register",
"ar": "دخول / تسجيل"
},
"OrderLog": {
"en": "Order Log",
"ar": " سجل الطلبات"
},
};

@ -47,7 +47,9 @@ class CMCService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
cmcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
if (data['ServiceID'] == 3)
cmcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -58,10 +60,10 @@ class CMCService extends BaseService {
Future getOrderDetailByOrderID(GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel) async {
hasError = false;
await baseAppClient.post(GET_ORDER_DETAIL_BY_ID,
await baseAppClient.post(GET_CMC_ORDER_DETAIL_BY_ID,
onSuccess: (dynamic response, int statusCode) {
cmcAllOrderDetail.clear();
response['PatientER_HHC_GetTransactionsForOrderList'].forEach((data) {
response['PatientER_CMC_GetTransactionsForOrderList'].forEach((data) {
cmcAllOrderDetail.add(GetOrderDetailByOrderIDResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {

@ -41,6 +41,7 @@ class HomeHealthCareService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
hhcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if(data['ServiceID'] == 2)
hhcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {

@ -16,6 +16,7 @@ class CMCViewModel extends BaseViewModel {
locator<CMCService>();
List<GetCMCServicesResponseModel> get cmcAllServicesList =>
_cMCService.cmcAllServicesList;
List<GetHHCAllPresOrdersResponseModel> get cmcAllPresOrders =>

@ -34,19 +34,25 @@ class _NewCMCPageState extends State<NewCMCPage>
@override
void initState() {
super.initState();
PatientERCMCInsertServicesList patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
PatientERCMCInsertServicesList patientERCMCInsertServicesList;
if (widget.model.cmcAllServicesList.length > 0) {
patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[0].price,
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR:
widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].description,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].totalPrice,
vAT: widget.model.cmcAllServicesList[0].vAT);
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(
patientERCMCInsertServicesList: [patientERCMCInsertServicesList]);
}
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(
patientERCMCInsertServicesList: patientERCMCInsertServicesList != null
? [patientERCMCInsertServicesList]
: []);
_controller = new PageController();
}

@ -95,10 +95,12 @@ class _NewCMCStepOnePageState
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel (checkupType:newValue );
await widget.model.getCheckupItems(cMCGetItemsRequestModel);
},
groupValue: int.parse(widget
groupValue: widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList.length >0?int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[0]
.serviceID),),
.serviceID):1),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,7 +13,7 @@ class CMCIndexPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Service Information",
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(

@ -1,9 +1,8 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_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';
@ -39,12 +38,11 @@ class _CMCPageState extends State<CMCPage>
onModelReady: (model){
model.getCMCAllServices();
// model.getCheckupItems(cMCGetItemsRequestModel);
model.getCmcAllPresOrders();
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: "Home Health Care",
appBarTitle: TranslationBase.of(context).homeHealthCare,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -98,7 +96,7 @@ class _CMCPageState extends State<CMCPage>
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("Order Log"),
child: Texts(TranslationBase.of(context).orderLog),
),
),
],

@ -19,7 +19,7 @@ class EReferralIndexPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Service Information",
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child:

@ -1,5 +1,4 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -13,14 +14,14 @@ class HomeHealthCareIndexPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Service Information",
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
"Water Tracker:",
TranslationBase.of(context).homeHealthCare,
fontWeight: FontWeight.normal,
fontSize: 25,
color: Hexcolor("#60686b"),
@ -29,7 +30,7 @@ class HomeHealthCareIndexPage extends StatelessWidget {
height: 12,
),
Texts(
"This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
TranslationBase.of(context).homeHealthCareText,
fontWeight: FontWeight.normal,
fontSize: 17,
),
@ -58,7 +59,7 @@ class HomeHealthCareIndexPage extends StatelessWidget {
page: HomeHealthCarePage(),
),
),
label: "Home Health Care Page",
label: TranslationBase.of(context).loginRegister,
textColor: Theme.of(context).backgroundColor),
),
],

@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_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';
@ -41,7 +42,7 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: "Home Health Care",
appBarTitle: TranslationBase.of(context).homeHealthCare,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -89,13 +90,13 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("Home Health Care"),
child: Texts(TranslationBase.of(context).homeHealthCare),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("Order Log"),
child: Texts(TranslationBase.of(context).orderLog),
),
),
],

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,7 +13,7 @@ class H2OPageIndexPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Service Information",
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(

@ -589,6 +589,11 @@ class TranslationBase {
String get all => localizedValues['All'][locale.languageCode];
String get questionHere => localizedValues['QuestionHere'][locale.languageCode];
String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode];
String get serviceInformation => localizedValues['ServiceInformation'][locale.languageCode];
String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode];
String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode];
String get loginRegister => localizedValues['LoginRegister'][locale.languageCode];
String get orderLog => localizedValues['OrderLog'][locale.languageCode];
}

Loading…
Cancel
Save