Updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent e45c2c5652
commit 0acc134e6e

@ -15,8 +15,9 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'http://10.50.100.198:3334/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -369,11 +370,14 @@ const HAS_DENTAL_PLAN =
const LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory';
const INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert';
const UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 8.8;
const VERSION_ID = 7.2;
const SETUP_ID = '91877';
const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;

@ -1748,5 +1748,6 @@ const Map localizedValues = {
"yourTurn": {"en": "your turn is after", "ar": "دورك بعد"},
"patients": {"en": "patients", "ar": "مرضي"},
"group": {"en": "Group", "ar": "مجموعة"},
"covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"},
"ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"},
};

@ -37,3 +37,4 @@ const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA';
const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL';
const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL';
const CLINICS_LIST = 'CLINICS_LIST';
const COVID_QA_LIST = 'COVID_QA_LIST';

@ -124,7 +124,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 2076117163;
// body['MobileNo'] = "966503109207";
// body['PatientID'] = 2478442; //3844083
// body['PatientID'] = 3648586; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 2478442

@ -31,12 +31,13 @@ class LabsService extends BaseService {
List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID}) async {
hasError = false;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo;
_requestPatientLabSpecialResult.setupID = setupID;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();

@ -71,9 +71,9 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);

@ -367,10 +367,10 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
addSelectedProcedure(value[i]);
});
}),
Utils.tableColumnValue('${value[i].procedureName.toString()}', isLast: true),
Utils.tableColumnValue('${value[i].patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true),
Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true),
Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true),
Utils.tableColumnValue('${value[i].procedureName}', isLast: true, isCapitable: false),
Utils.tableColumnValue('${value[i].patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false),
Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false),
Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false),
]),
);
}
@ -478,17 +478,17 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
print(res);
autoGenerateInvoice();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err.toString());
print(err);
});
}
autoGenerateInvoice() {
List<dynamic> selectedProcListAPI = [];
Map<dynamic, dynamic> selectedProcListAPIMap;
selectedProcList.forEach((element) {
selectedProcListAPI.add({

@ -73,37 +73,36 @@ class _QRCodeState extends State<QRCode> {
height: MediaQuery.of(context).size.width / 3,
child: Row(
children: [
// _supportsNFC
// ?
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
widget.patientShareResponse.clinicID != 265
? Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
});
},
),
],
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
});
},
),
],
),
),
// : Container(),
)
: Container(),
Expanded(
flex: 1,
child: Container(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -403,7 +404,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
docObject.doctorID = widget.selectedDoctorID;
docObject.clinicID = widget.selectedClinicID;
docObject.projectID = widget.projectID;
insertAppointmentCovidTest(context, docObject);
insertCovidQuestionnaire(context, docObject);
},
cancelFunction: () => {});
dialog.showAlertDialog(context);
@ -412,6 +413,24 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
}
}
insertCovidQuestionnaire(context, DoctorList docObject) async {
DoctorsListService service = new DoctorsListService();
List qa = await sharedPref.getObject(COVID_QA_LIST);
service.insertCovidQuestionnaire(qa, widget.projectID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
insertAppointmentCovidTest(context, docObject);
}).catchError((err) {
print(err);
});
}
updateCovidQuestionnaire(context, String appoNo) async {
DoctorsListService service = new DoctorsListService();
service.updateCovidQuestionnaire(appoNo, widget.projectID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {
}).catchError((err) {
print(err);
});
}
insertAppointmentCovidTest(context, DoctorList docObject) {
DoctorsListService service = new DoctorsListService();
AppoitmentAllHistoryResultList appo;
@ -490,6 +509,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
GifLoaderDialogUtils.hideDialog(context);
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
updateCovidQuestionnaire(context, appointmentNo);
navigateToPaymentAlert();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCe
import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -265,6 +267,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
}
next() async {
var sharedPref = new AppSharedPreferences();
bool all = true;
qa.forEach((element) {
all = all && (element["ans"] == 1 || element["ans"] == 0);
@ -272,6 +275,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
if (all) if (qa[0]["ans"] == 1) {
openPassportUpdatePage();
} else {
sharedPref.setObject(COVID_QA_LIST, qa);
getPaymentInfo(context, widget.projectId);
}
else

@ -114,7 +114,7 @@ class _ToDoState extends State<ToDo> {
child: widget.appoList[index].clinicID == 265
? Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/drive-thru.svg"),
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
)
: widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset("assets/images/new/virtual.svg")
@ -129,7 +129,7 @@ class _ToDoState extends State<ToDo> {
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
widget.appoList[index].clinicID == 265
? TranslationBase.of(context).drivethruAppo
? TranslationBase.of(context).covidTestTodo
: widget.appoList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCareAppo
: TranslationBase.of(context).walkinAppo,

@ -18,16 +18,18 @@ class LaboratoryResultPage extends StatefulWidget {
}
class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLaboratoryResult(
invoiceNo: widget.patientLabOrders.invoiceNo, clinicID: widget.patientLabOrders.clinicID, projectID: widget.patientLabOrders.projectID, orderNo: widget.patientLabOrders.orderNo),
invoiceNo: widget.patientLabOrders.invoiceNo,
clinicID: widget.patientLabOrders.clinicID,
projectID: widget.patientLabOrders.projectID,
orderNo: widget.patientLabOrders.orderNo,
setupID: widget.patientLabOrders.setupID),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: widget.patientLabOrders.doctorName,
appBarTitle: widget.patientLabOrders.doctorName,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.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';
import 'package:flutter/material.dart';
class LakumPointMonthPage extends StatefulWidget {

@ -315,7 +315,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, BuildContext context, [String procedureID, num testTypeEnum, num testProcedureEnum]) async {
Future<Map> insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, BuildContext context,
[String procedureID, num testTypeEnum, num testProcedureEnum]) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -850,7 +851,7 @@ class DoctorsListService extends BaseService {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
}, body: request, isAllowAny: true);
return Future.value(localRes);
}
@ -906,7 +907,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> autoGenerateAncillaryOrdersInvoice(String orderNo, int projectID, dynamic appointmentID, List<dynamic> selectedProcListAPI, BuildContext context) async {
Future<Map> autoGenerateAncillaryOrdersInvoice(dynamic orderNo, int projectID, dynamic appointmentID, List<dynamic> selectedProcListAPI, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
@ -1356,4 +1357,51 @@ class DoctorsListService extends BaseService {
}, body: request);
return Future.value(localRes);
}
Future<Map> insertCovidQuestionnaire(List qa, int projectID, int testTypeEnum, int testProcedureEnum) async {
Map<String, dynamic> request;
request = {
"ProjectID": projectID,
"IsForTravel": qa[0]['ans'].toString(),
"IsComingOutSA": qa[1]['ans'].toString(),
"IsFeverCurrently": qa[2]['ans'].toString(),
"IsFeverLast2Week": qa[3]['ans'].toString(),
"IsSorethroat": qa[4]['ans'].toString(),
"IsRunnyNose": qa[5]['ans'].toString(),
"IsCough": qa[6]['ans'].toString(),
"IsShortnessBreath": qa[7]['ans'].toString(),
"IsNausea": qa[8]['ans'].toString(),
"IsVomiting": qa[9]['ans'].toString(),
"IsHeadache": qa[10]['ans'].toString(),
"IsMusclePain": qa[11]['ans'].toString(),
"IsJoinPain": qa[12]['ans'].toString(),
"IsDiarrhea": qa[13]['ans'].toString(),
"TestTypeEnum": testTypeEnum,
"TestProcedureEnum": testProcedureEnum
};
dynamic localRes;
await baseAppClient.post(INSERT_COVID_QUESTIONNAIRE, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> updateCovidQuestionnaire(String appoNo, int projectID, int testTypeEnum, int testProcedureEnum) async {
Map<String, dynamic> request;
request = {"AppointmentNo": appoNo, "ProjectID": projectID, "TestTypeEnum": testTypeEnum, "TestProcedureEnum": testProcedureEnum};
dynamic localRes;
await baseAppClient.post(UPDATE_COVID_QUESTIONNAIRE, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -2824,6 +2824,7 @@ class TranslationBase {
String get patients => localizedValues["patients"][locale.languageCode];
String get group => localizedValues["group"][locale.languageCode];
String get ancillaryOrdersPaymentConfirm => localizedValues["ancillaryOrdersPaymentConfirm"][locale.languageCode];
String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode];
}

Loading…
Cancel
Save