Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into add_medication_details

 Conflicts:
	lib/util/translations_delegate_base.dart
merge-requests/323/head
Elham Rababah 4 years ago
commit 8615671095

@ -25,7 +25,9 @@
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>
<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using face id?</string>
<string>We are using it for authentication</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -70,7 +70,7 @@ class BaseAppClient {
body['Channel'] = CHANNEL;
body['SessionID'] = SESSION_ID;
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = body['PatientOutSA']??0; // PATIENT_OUT_SA;
body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA;
if (body['VidaAuthTokenID'] == null) {
body['VidaAuthTokenID'] =
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
@ -98,9 +98,12 @@ class BaseAppClient {
} else {
var parsed = json.decode(response.body.toString());
if (!parsed['IsAuthenticated']) {
// onFailure(getError(parsed), statusCode);
if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode);
} else {
await helpers.logout();
helpers.showErrorToast('Your session expired Please login agian');
}
} else if (parsed['MessageStatus'] == 1) {
if (!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode);

@ -27,7 +27,8 @@ const PATIENT_GET_CLINIC_BY_PROJECT_URL =
const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo";
const GET_CLINICS = "Services/DoctorApplication.svc/REST/GetClinics";
const GET_REFERRAL_FACILITIES = 'Services/DoctorApplication.svc/REST/GetReferralFacilities';
const GET_REFERRAL_FACILITIES =
'Services/DoctorApplication.svc/REST/GetReferralFacilities';
const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo';
@ -195,11 +196,16 @@ const DRUG_TO_DRUG =
const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile';
const GET_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors';
const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards';
const GET_ROOM_CATEGORIES = 'Services/DoctorApplication.svc/REST/GetRoomCategories';
const GET_DIAGNOSIS_TYPES = 'Services/DoctorApplication.svc/REST/DiagnosisTypes';
const GET_ROOM_CATEGORIES =
'Services/DoctorApplication.svc/REST/GetRoomCategories';
const GET_DIAGNOSIS_TYPES =
'Services/DoctorApplication.svc/REST/DiagnosisTypes';
const GET_DIET_TYPES = 'Services/DoctorApplication.svc/REST/DietTypes';
const GET_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes';
const POST_ADMISSION_REQUEST = 'Services/DoctorApplication.svc/REST/PostAdmissionRequest';
const POST_ADMISSION_REQUEST =
'Services/DoctorApplication.svc/REST/PostAdmissionRequest';
const GET_ITEM_BY_MEDICINE =
'Services/DoctorApplication.svc/REST/GetItemByMedicineCode';
var selectedPatientType = 1;

@ -29,7 +29,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Answer/Suggestions',
'ar': 'ملاحضات وتفاصيل العيادة'
},
'outPatients': {'en': 'Out-Patients', 'ar': 'المريض الخارجي'},
'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'},
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'},
@ -44,7 +44,7 @@ const Map<String, Map<String, String>> localizedValues = {
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'االإحالة'},
'inPatient': {'en': 'In-Patient', 'ar': 'المريض الداخلي'},
'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'},
'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'},
@ -426,7 +426,10 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'تاريخ القبول المتوقع'
},
// 'emergencyAdmission': {'en': "EMERGENCY ADMISSION", 'ar': 'دخول الطوارئ'},
'isSickLeaveRequired': {'en': "Is Sick Leave Required", 'ar': 'هل الإجازة المرضية مطلوبة'},
'isSickLeaveRequired': {
'en': "Is Sick Leave Required",
'ar': 'هل الإجازة المرضية مطلوبة'
},
'patientPregnant': {'en': "Patient Pregnant", 'ar': 'حمل المريض'},
'treatmentLine': {
'en': "Main line of treatment",
@ -459,10 +462,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "POST PLANS & ESTIMATED COST",
'ar': 'خطط البريد والتكلفة المقدرة'
},
'postPlans': {
'en': "POST PLANS",
'ar': 'خطط البريد'
},
'postPlans': {'en': "POST PLANS", 'ar': 'خطط البريد'},
'ucaf': {'en': "UCAF", 'ar': 'UCAF'},
'emergencyCase': {'en': "Emergency Case", 'ar': 'حالة طارئة'},
'durationOfIllness': {'en': "duration Of Illness", 'ar': 'مدة المرض'},
@ -695,21 +695,47 @@ const Map<String, Map<String, String>> localizedValues = {
'clinicSearch': {'en': "Search Clinic", 'ar': "بحث عن عيادة"},
'doctorSearch': {'en': "Search Doctor", 'ar': "بحث عن طبيب"},
'referralResponse': {'en': "Referral Response : ", 'ar': " : استجابة الإحالة"},
'referralResponse': {
'en': "Referral Response : ",
'ar': " : استجابة الإحالة"
},
'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"},
'diagnosisDetail': {'en': "Diagnosis Detail : ", 'ar': "تفاصيل التشخيص"},
'referralSuccessMsgAccept': {'en': "Referral Accepted Successfully", 'ar': "تم قبول الإحالة بنجاح"},
'referralSuccessMsgReject': {'en': "Referral Rejected Successfully", 'ar': "تم رفض الإحالة بنجاح"},
'sickLeaveComments': {'en': "Sick leave comments", 'ar': "تعليقات إجازة مرضية"},
'referralSuccessMsgAccept': {
'en': "Referral Accepted Successfully",
'ar': "تم قبول الإحالة بنجاح"
},
'referralSuccessMsgReject': {
'en': "Referral Rejected Successfully",
'ar': "تم رفض الإحالة بنجاح"
},
'sickLeaveComments': {
'en': "Sick leave comments",
'ar': "تعليقات إجازة مرضية"
},
'pastMedicalHistory': {'en': "Past medical history", 'ar': "التاريخ الطبي"},
'pastSurgicalHistory': {'en': "Past surgical history", 'ar': "التاريخ الجراحي"},
'pastSurgicalHistory': {
'en': "Past surgical history",
'ar': "التاريخ الجراحي"
},
'complications': {'en': "Complications", 'ar': "المضاعفات"},
'floor': {'en': "Floor", 'ar': "الطابق"},
'roomCategory': {'en': "Room category", 'ar': "فئة الغرفة"},
'otherDepartmentsInterventions': {'en': "Other departments interventions", 'ar': "تدخلات الأقسام الأخرى"},
'otherDepartmentsInterventions': {
'en': "Other departments interventions",
'ar': "تدخلات الأقسام الأخرى"
},
'otherProcedure': {'en': "Other procedure", 'ar': "إجراء آخر"},
'admissionRequestSuccessMsg': {'en': "Admission Request Created Successfully", 'ar': "تم إنشاء طلب القبول بنجاح"},
'admissionRequestSuccessMsg': {
'en': "Admission Request Created Successfully",
'ar': "تم إنشاء طلب القبول بنجاح"
},
// 'icd': {'en': "ICD", 'ar': " "},
'orderNo': {'en': "Order No : ", 'ar': "رقم الطلب"},
'infoStatus': {'en': "Info Status", 'ar': "حالة المعلومات"},
'doctorResponse': {'en': "Doctor Response", 'ar': "استجابة الطبيب"},
'sickleaveonhold': {
'en': "A Sick leave is on Hold status for this patient",
'ar': "الإجازة المرضية في حالة الانتظار لهذا المريض"
},
};

@ -0,0 +1,108 @@
class ItemByMedicineModel {
List<Frequencies> frequencies;
List<Routes> routes;
List<Strengths> strengths;
ItemByMedicineModel({this.frequencies, this.routes, this.strengths});
ItemByMedicineModel.fromJson(Map<String, dynamic> json) {
if (json['frequencies'] != null) {
frequencies = new List<Frequencies>();
json['frequencies'].forEach((v) {
frequencies.add(new Frequencies.fromJson(v));
});
}
if (json['routes'] != null) {
routes = new List<Routes>();
json['routes'].forEach((v) {
routes.add(new Routes.fromJson(v));
});
}
if (json['strengths'] != null) {
strengths = new List<Strengths>();
json['strengths'].forEach((v) {
strengths.add(new Strengths.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.frequencies != null) {
data['frequencies'] = this.frequencies.map((v) => v.toJson()).toList();
}
if (this.routes != null) {
data['routes'] = this.routes.map((v) => v.toJson()).toList();
}
if (this.strengths != null) {
data['strengths'] = this.strengths.map((v) => v.toJson()).toList();
}
return data;
}
}
class Frequencies {
String description;
bool isDefault;
int parameterCode;
Frequencies({this.description, this.isDefault, this.parameterCode});
Frequencies.fromJson(Map<String, dynamic> json) {
description = json['description'];
isDefault = json['isDefault'];
parameterCode = json['parameterCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['description'] = this.description;
data['isDefault'] = this.isDefault;
data['parameterCode'] = this.parameterCode;
return data;
}
}
class Strengths {
String description;
bool isDefault;
int parameterCode;
Strengths({this.description, this.isDefault, this.parameterCode});
Strengths.fromJson(Map<String, dynamic> json) {
description = json['description'];
isDefault = json['isDefault'];
parameterCode = json['parameterCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['description'] = this.description;
data['isDefault'] = this.isDefault;
data['parameterCode'] = this.parameterCode;
return data;
}
}
class Routes {
String description;
bool isDefault;
int parameterCode;
Routes({this.description, this.isDefault, this.parameterCode});
Routes.fromJson(Map<String, dynamic> json) {
description = json['description'];
isDefault = json['isDefault'];
parameterCode = json['parameterCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['description'] = this.description;
data['isDefault'] = this.isDefault;
data['parameterCode'] = this.parameterCode;
return data;
}
}

@ -0,0 +1,18 @@
class ItemByMedicineRequestModel {
String vidaAuthTokenID;
int medicineCode;
ItemByMedicineRequestModel({this.vidaAuthTokenID, this.medicineCode});
ItemByMedicineRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
medicineCode = json['MedicineCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['MedicineCode'] = this.medicineCode;
return data;
}
}

@ -47,7 +47,7 @@ class PrescriptionRequestModel {
int itemId;
String doseStartDate;
int duration;
int dose;
double dose;
int doseUnitId;
int route;
int frequency;

@ -41,6 +41,8 @@ class EntityList {
String specialPermission;
String subGroup;
String template;
String remarks;
String type;
EntityList(
{this.allowedClinic,
@ -54,7 +56,9 @@ class EntityList {
this.procedureName,
this.specialPermission,
this.subGroup,
this.template});
this.template,
this.remarks,
this.type});
EntityList.fromJson(Map<String, dynamic> json) {
allowedClinic = json['allowedClinic'];

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
@ -23,8 +24,13 @@ class PrescriptionService extends LookupService {
List<GetMedicationResponseModel> allMedicationList = [];
List<dynamic> specialityList = [];
List<dynamic> drugToDrug = [];
List<dynamic> itemMedicineList = [];
List<dynamic> itemMedicineListRoute = [];
List<dynamic> itemMedicineListUnit = [];
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel();
ItemByMedicineRequestModel _itemByMedicineRequestModel =
ItemByMedicineRequestModel();
SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel(
//search: ["Acetaminophen"],
search: ["Amoxicillin"],
@ -32,6 +38,25 @@ class PrescriptionService extends LookupService {
PostPrescriptionReqModel _postPrescriptionReqModel =
PostPrescriptionReqModel();
Future getItem({int itemID}) async {
_itemByMedicineRequestModel =
ItemByMedicineRequestModel(medicineCode: itemID);
hasError = false;
await baseAppClient.post(GET_ITEM_BY_MEDICINE,
onSuccess: (dynamic response, int statusCode) {
itemMedicineList = [];
itemMedicineList = response['listItemByMedicineCode']['frequencies'];
itemMedicineListRoute = response['listItemByMedicineCode']['routes'];
itemMedicineListUnit = response['listItemByMedicineCode']['strengths'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _itemByMedicineRequestModel.toJson());
}
Future getPatientAssessment(
GetAssessmentReqModel getAssessmentReqModel) async {
hasError = false;

@ -75,7 +75,7 @@ class ProcedureService extends BaseService {
Future getProcedureCategory({String categoryName, String categoryID}) async {
_getProcedureCategoriseReqModel = GetProcedureReqModel(
search: [""],
search: [categoryName],
patientMRN: 0,
pageIndex: 0,
clinicId: 0,

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/leave_rechdule_response.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
// import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
class SickLeaveService extends BaseService {
@ -54,8 +55,9 @@ class SickLeaveService extends BaseService {
return Future.value(response);
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
DrAppToastMsg.showErrorToast(error);
// hasError = true;
// super.error = error;
},
body: addSickLeaveRequest.toJson(),
);

@ -35,6 +35,22 @@ class MedicineViewModel extends BaseViewModel {
List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
List<dynamic> get itemMedicineListRoute =>
_prescriptionService.itemMedicineListRoute;
List<dynamic> get itemMedicineListUnit =>
_prescriptionService.itemMedicineListUnit;
Future getItem({int itemID}) async {
//hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _prescriptionService.getItem(itemID: itemID);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getMedicineItem(String itemName) async {
setState(ViewState.Busy);

@ -22,6 +22,20 @@ class PrescriptionViewModel extends BaseViewModel {
List<dynamic> get drugsList => _prescriptionService.doctorsList;
//List<dynamic> get allMedicationList => _prescriptionService.allMedicationList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
Future getItem({int itemID}) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.BusyLocal);
await _prescriptionService.getItem(itemID: itemID);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getPrescription({int mrn}) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();

File diff suppressed because it is too large Load Diff

@ -61,7 +61,7 @@ postProcedure(
sss.add(PrescriptionRequestModel(
covered: true,
dose: int.parse(dose),
dose: double.parse(dose),
itemId: drugId.isEmpty ? 1 : int.parse(drugId),
doseUnitId: int.parse(doseUnit),
route: route.isEmpty ? 1 : int.parse(route),
@ -201,6 +201,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
await model.getMedicationDoseTime();
//await model.getMedicationIndications();
await model.getPatientAssessment(getAssessmentReqModel);
//await model.getItem();
},
builder: (
BuildContext context,
@ -251,12 +252,23 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Helpers.hideKeyboard(context);
setState(() {
_selectedMedication = null;
model.getItem(
itemID: _selectedMedication
.itemId);
});
}
: null,
child: _selectedMedication == null
? AutoCompleteTextField<
GetMedicationResponseModel>(
onFocusChanged: (__) {
_selectedMedication != null
? model.getItem(
itemID:
_selectedMedication
.itemId)
: null;
},
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
@ -297,6 +309,11 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
input.toLowerCase()),
)
: TextField(
onEditingComplete: () {
model.getItem(
itemID: _selectedMedication
.itemId);
},
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
@ -343,17 +360,20 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
.width *
0.550,
child: TextFields(
// inputFormatters: [
inputFormatters: [
// LengthLimitingTextInputFormatter(
// 4),
// WhitelistingTextInputFormatter
// .digitsOnly
// ],
],
hintText:
TranslationBase.of(context)
.strength,
controller: strengthController,
keyboardType: TextInputType.numberWithOptions(decimal: true,),
keyboardType:
TextInputType.numberWithOptions(
decimal: true,
),
onChanged: (String value) {
setState(() {
strengthChar = value.length;
@ -383,21 +403,19 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
.width *
0.350,
child: InkWell(
onTap:
model.medicationStrengthList !=
onTap: model.itemMedicineListUnit !=
null
? () {
Helpers.hideKeyboard(
context);
ListSelectDialog
dialog =
ListSelectDialog dialog =
ListSelectDialog(
list: model
.medicationStrengthList,
.itemMedicineListUnit,
attributeName:
'nameEn',
'description',
attributeValueId:
'id',
'parameterCode',
okText:
TranslationBase.of(
context)
@ -405,14 +423,12 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
okFunction:
(selectedValue) {
setState(() {
units =
selectedValue;
units = selectedValue;
});
},
);
showDialog(
barrierDismissible:
false,
barrierDismissible: false,
context: context,
builder: (BuildContext
context) {
@ -426,7 +442,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
textFieldSelectorDecoration(
'UNIT Type',
units != null
? units['nameEn']
? units['description']
: null,
true),
enabled: false,
@ -440,14 +456,16 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.medicationRouteList != null
onTap: model.itemMedicineListRoute != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model.medicationRouteList,
attributeName: 'nameEn',
attributeValueId: 'id',
list:
model.itemMedicineListRoute,
attributeName: 'description',
attributeValueId:
'parameterCode',
okText:
TranslationBase.of(context)
.ok,
@ -475,7 +493,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).route,
route != null
? route['nameEn']
? route['description']
: null,
true),
enabled: false,
@ -486,16 +504,15 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.medicationFrequencyList !=
null
onTap: model.itemMedicineList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model
.medicationFrequencyList,
attributeName: 'nameEn',
attributeValueId: 'id',
list: model.itemMedicineList,
attributeName: 'description',
attributeValueId:
'parameterCode',
okText:
TranslationBase.of(context)
.ok,
@ -520,7 +537,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
TranslationBase.of(context)
.frequency,
frequency != null
? frequency['nameEn']
? frequency['description']
: null,
true),
enabled: false,
@ -750,16 +767,16 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
"Please Fill All Fields");
return;
}
if (int.parse(
if (double.parse(
strengthController.text) >
1000) {
1000.0) {
DrAppToastMsg.showErrorToast(
"1000 is the MAX for the strength");
return;
}
if (int.parse(
if (double.parse(
strengthController.text) ==
0) {
0.0) {
DrAppToastMsg.showErrorToast(
"Streangth can't be zero");
return;
@ -796,16 +813,19 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
// .join(' '),
dose: strengthController.text,
doseUnit:
units['id'].toString(),
units['parameterCode']
.toString(),
patient: widget.patient,
doseTimeIn:
doseTime['id'].toString(),
model: widget.model,
duration:
duration['id'].toString(),
frequency: frequency['id']
frequency:
frequency['parameterCode']
.toString(),
route: route['parameterCode']
.toString(),
route: route['id'].toString(),
drugId: _selectedMedication
.itemId
.toString(),

@ -209,16 +209,17 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
child: Column(
children: [
AppText(
DateTime.parse(model
.prescriptionList[
0]
.entityList[
index]
.createdOn)
.day
(DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) !=
null
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn).year)
.toString()
: DateTime.now()
.year)
.toString(),
color: Colors
.green,
fontSize:
13.5,
),
AppText(
Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
@ -230,7 +231,19 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
.toUpperCase(),
color: Colors
.green,
)
),
AppText(
DateTime.parse(model
.prescriptionList[
0]
.entityList[
index]
.createdOn)
.day
.toString(),
color: Colors
.green,
),
],
),
),
@ -383,12 +396,9 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
),
Expanded(
child: AppText(
"", // commening below code because there is an error coming in the model please fix it before pushing it
// model.prescriptionList[0].entityList[index].pharmacistRemarks == null
// ? ""
// : model.prescriptionList[0].entityList[index].pharmacistRemarks,
fontSize:
15.0),
// commening below code because there is an error coming in the model please fix it before pushing it
model.prescriptionList[0].entityList[index].pharmacistRemarks == null ? "" : model.prescriptionList[0].entityList[index].pharmacistRemarks,
fontSize: 15.0),
)
],
),

@ -115,7 +115,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
(BuildContext context, StateSetter setState /*You can rename this!*/) {
return BaseView<MedicineViewModel>(
onModelReady: (model) async {
await model.getMedicationList();
//await model.getMedicationList();
await model.getMedicationStrength();
await model.getMedicationDuration();
await model.getMedicationRoute();
@ -257,14 +257,17 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
inputFormatters: [
LengthLimitingTextInputFormatter(
4),
WhitelistingTextInputFormatter
.digitsOnly
// WhitelistingTextInputFormatter
// .digitsOnly
],
hintText: widget.doseStreangth,
fontSize: 15.0,
controller: strengthController,
keyboardType:
TextInputType.number,
keyboardType: TextInputType
.numberWithOptions(
decimal: true,
),
onChanged: (String value) {
setState(() {
strengthChar = value.length;
@ -558,25 +561,34 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
height: 12.0,
),
Container(
height: screenSize.height * 0.070,
width: double.infinity,
child: Row(
height: model.patientAssessmentList
.isNotEmpty
? screenSize.height * 0.070
: 0.0,
width: model.patientAssessmentList
.isNotEmpty
? double.infinity
: 0.0,
child: model.patientAssessmentList
.isNotEmpty
? Row(
children: [
Container(
width: MediaQuery.of(context)
width:
MediaQuery.of(context)
.size
.width *
0.29,
child: InkWell(
onTap: indicationList != null
onTap:
indicationList != null
? () {
Helpers.hideKeyboard(
context);
}
: null,
child: TextField(
decoration:
textFieldSelectorDecoration(
decoration: textFieldSelectorDecoration(
model.patientAssessmentList
.isNotEmpty
? model
@ -586,7 +598,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
.toString()
: '',
indication != null
? indication['name']
? indication[
'name']
: null,
true),
enabled: true,
@ -595,12 +608,14 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
),
),
Container(
width: MediaQuery.of(context)
width:
MediaQuery.of(context)
.size
.width *
0.61,
child: InkWell(
onTap: indicationList != null
onTap:
indicationList != null
? () {
Helpers.hideKeyboard(
context);
@ -608,8 +623,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
: null,
child: TextField(
maxLines: 3,
decoration:
textFieldSelectorDecoration(
decoration: textFieldSelectorDecoration(
model.patientAssessmentList
.isNotEmpty
? model
@ -619,7 +633,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
.toString()
: '',
indication != null
? indication['name']
? indication[
'name']
: null,
true),
enabled: true,
@ -628,8 +643,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
),
),
],
),
),
)
: null),
SizedBox(
height: 12.0,
),
@ -688,6 +703,28 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
title: 'update prescription'
.toUpperCase(),
onPressed: () {
if (double.parse(
strengthController.text) >
1000.0) {
DrAppToastMsg.showErrorToast(
"1000 is the MAX for the strength");
return;
}
if (double.parse(
strengthController
.text) ==
0.0) {
DrAppToastMsg.showErrorToast(
"Streangth can't be zero");
return;
}
if (strengthController
.text.length >
4) {
DrAppToastMsg.showErrorToast(
"Streangth can't be zero");
return;
}
updatePrescription(
newStartDate: selectedDate,
newDoseStreangth:
@ -836,8 +873,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
sss.add(PrescriptionRequestModel(
covered: true,
dose: newDoseStreangth.isNotEmpty
? int.parse(newDoseStreangth)
: int.parse(doseStreangth),
? double.parse(newDoseStreangth)
: double.parse(doseStreangth),
//frequency.isNotEmpty ? int.parse(dose) : 1,
itemId: drugId,
doseUnitId:

@ -25,33 +25,30 @@ postProcedure(
PatiantInformtion patient,
List<EntityList> entityList}) async {
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
List<Controls> controls = List();
List<Procedures> controlsProcedure = List();
postProcedureReqModel.appointmentNo = patient.appointmentNo;
postProcedureReqModel.episodeID = patient.episodeNo;
postProcedureReqModel.patientMRN = patient.patientMRN;
entityList.forEach((element) {
List<Controls> controls = List();
controls.add(
Controls(code: "remarks", controlValue: remarks.isEmpty ? '' : remarks),
Controls(
code: "remarks",
controlValue: element.remarks.isNotEmpty ? element.remarks : ""),
);
controls.add(
Controls(
code: "ordertype",
controlValue:
orderType.toString().isNotEmpty ? orderType.toString() : '1'),
Controls(code: "ordertype", controlValue: element.type),
);
});
entityList.forEach((element) {
controlsProcedure.add(Procedures(
category: element.categoryID,
procedure: element.procedureId,
controls: controls));
});
postProcedureReqModel.procedures = controlsProcedure;
postProcedureReqModel.procedures = controlsProcedure;
await model.postProcedure(postProcedureReqModel, patient.patientMRN);
if (model.state == ViewState.ErrorLocal) {
@ -218,43 +215,43 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
child: Row(
children: [
AppText(
TranslationBase.of(context).orderType),
Radio(
activeColor: Color(0xFFB9382C),
value: 1,
groupValue: selectedType,
onChanged: (value) {
setSelectedType(value);
},
),
Text('routine'),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 0,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).urgent),
],
),
),
SizedBox(
height: 15.0,
),
TextFields(
hintText: TranslationBase.of(context).remarks,
controller: remarksController,
minLines: 3,
maxLines: 5,
),
// Container(
// child: Row(
// children: [
// AppText(
// TranslationBase.of(context).orderType),
// Radio(
// activeColor: Color(0xFFB9382C),
// value: 1,
// groupValue: selectedType,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// Text('routine'),
// Radio(
// activeColor: Color(0xFFB9382C),
// groupValue: selectedType,
// value: 0,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// Text(TranslationBase.of(context).urgent),
// ],
// ),
// ),
// SizedBox(
// height: 15.0,
// ),
// TextFields(
// hintText: TranslationBase.of(context).remarks,
// controller: remarksController,
// minLines: 3,
// maxLines: 5,
// ),
SizedBox(
height: 50.0,
height: 100.0,
),
Container(
margin: EdgeInsets.all(
@ -266,6 +263,7 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
title: TranslationBase.of(context)
.addSelectedProcedures,
onPressed: () {
//print(entityList.toString());
Navigator.pop(context);
postProcedure(
orderType: selectedType.toString(),

@ -17,6 +17,8 @@ class EntityListCheckboxSearchWidget extends StatefulWidget {
final Function addSelectedHistories;
final Function(EntityList) removeHistory;
final Function(EntityList) addHistory;
final Function(EntityList) addRemarks;
final bool Function(EntityList) isEntityListSelected;
final List<EntityList> masterList;
@ -27,7 +29,8 @@ class EntityListCheckboxSearchWidget extends StatefulWidget {
this.removeHistory,
this.masterList,
this.addHistory,
this.isEntityListSelected})
this.isEntityListSelected,
this.addRemarks})
: super(key: key);
@override
@ -37,7 +40,7 @@ class EntityListCheckboxSearchWidget extends StatefulWidget {
class _EntityListCheckboxSearchWidgetState
extends State<EntityListCheckboxSearchWidget> {
int selectedType;
int selectedType = 1;
setSelectedType(int val) {
setState(() {
selectedType = val;
@ -45,6 +48,8 @@ class _EntityListCheckboxSearchWidgetState
}
List<EntityList> items = List();
List<String> remarksList = List();
List<int> typeList = List();
@override
void initState() {
@ -52,6 +57,7 @@ class _EntityListCheckboxSearchWidgetState
super.initState();
}
TextEditingController remarksController = TextEditingController();
@override
Widget build(BuildContext context) {
return Container(
@ -84,7 +90,8 @@ class _EntityListCheckboxSearchWidgetState
children: items.map((historyInfo) {
return Column(
children: [
Row(
ExpansionTile(
title: Row(
children: [
Checkbox(
value: widget.isEntityListSelected(
@ -94,10 +101,11 @@ class _EntityListCheckboxSearchWidgetState
setState(() {
if (widget.isEntityListSelected(
historyInfo)) {
widget
.removeHistory(historyInfo);
widget.removeHistory(
historyInfo);
} else {
widget.addHistory(historyInfo);
widget
.addHistory(historyInfo);
}
});
}),
@ -114,6 +122,57 @@ class _EntityListCheckboxSearchWidgetState
),
],
),
children: [
Container(
child: Row(
children: [
AppText(TranslationBase.of(context)
.orderType),
Radio(
activeColor: Color(0xFFB9382C),
value: 1,
groupValue: selectedType,
onChanged: (value) {
historyInfo.type =
setSelectedType(value)
.toString();
historyInfo.type =
value.toString();
},
),
Text('routine'),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 0,
onChanged: (value) {
historyInfo.type =
setSelectedType(value)
.toString();
historyInfo.type =
value.toString();
},
),
Text(TranslationBase.of(context)
.urgent),
],
),
),
SizedBox(
height: 15.0,
),
TextFields(
hintText:
TranslationBase.of(context).remarks,
//controller: remarksController,
onChanged: (value) {
historyInfo.remarks = value;
},
minLines: 3,
maxLines: 5,
),
],
),
DividerWithSpacesAround(),
],
);

@ -227,43 +227,63 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
.entityList[
index]
.orderDate)
.day
.year
.toString(),
color:
Colors.green,
),
AppText(
Helpers.getMonth(model
color: model
.procedureList[
0]
.entityList[
index]
.orderDate !=
.orderType ==
0
? Color(
0xFFB9382C)
: Colors
.green),
AppText(
Helpers.getMonth(model.procedureList[0].entityList[index].orderDate !=
null
? (DateTime.parse(model
? (DateTime.parse(model.procedureList[0].entityList[index].orderDate)
.month)
: DateTime.now()
.month)
.toUpperCase(),
color: model
.procedureList[
0]
.entityList[
index]
.orderType ==
0
? Color(
0xFFB9382C)
: Colors
.green),
AppText(
DateTime.parse(model
.procedureList[
0]
.entityList[
index]
.orderDate)
.month)
: DateTime
.now()
.month)
.toUpperCase(),
color:
Colors.green,
)
.day
.toString(),
color: model
.procedureList[
0]
.entityList[
index]
.orderType ==
0
? Color(
0xFFB9382C)
: Colors
.green),
],
),
),
Expanded(
child: Container(
// height: MediaQuery.of(
// context)
// .size
// .height *
// 0.21,
width: MediaQuery.of(
context)
.size
@ -308,17 +328,17 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
13.0,
),
Expanded(
child:
AppText(
child: AppText(
model.procedureList[0].entityList[index].orderType ==
1
? 'Routine'
: 'Urgent',
fontSize:
11.5,
color: Color(
0xFFB9382C),
),
13.5,
color: model.procedureList[0].entityList[index].orderType ==
0
? Color(0xFFB9382C)
: Colors.green),
),
],
),

@ -91,7 +91,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
builder:
(BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView(
baseViewModel: widget.model,
baseViewModel: model,
child: DraggableScrollableSheet(
minChildSize: 0.90,
initialChildSize: 0.95,
@ -200,51 +200,51 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
isEntityListSelected(master),
),
),
Container(
child: Row(
children: [
AppText(
TranslationBase.of(context).orderType),
Radio(
activeColor: Color(0xFFB9382C),
value: 0,
groupValue: selectedType,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).urgent),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 1,
onChanged: (value) {
setSelectedType(value);
},
),
Text('routine'),
],
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: widget.remarks,
fontSize: 15.0,
controller: widget.remarksController,
maxLines: 3,
minLines: 2,
onChanged: (value) {},
),
),
// Container(
// child: Row(
// children: [
// AppText(
// TranslationBase.of(context).orderType),
// Radio(
// activeColor: Color(0xFFB9382C),
// value: 0,
// groupValue: selectedType,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// Text(TranslationBase.of(context).urgent),
// Radio(
// activeColor: Color(0xFFB9382C),
// groupValue: selectedType,
// value: 1,
// onChanged: (value) {
// setSelectedType(value);
// },
// ),
// Text('routine'),
// ],
// ),
// ),
// SizedBox(
// height: 12.0,
// ),
// Container(
// decoration: BoxDecoration(
// borderRadius:
// BorderRadius.all(Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// child: TextFields(
// hintText: widget.remarks,
// fontSize: 15.0,
// controller: widget.remarksController,
// maxLines: 3,
// minLines: 2,
// onChanged: (value) {},
// ),
// ),
SizedBox(
height: 50.0,
),
@ -310,12 +310,16 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
updateProcedureReqModel.lineItemNo = 1;
updateProcedureReqModel.orderNo = orderNo;
entityList.forEach((element) {
controls.add(
Controls(code: "remarks", controlValue: remarks.isEmpty ? '' : remarks),
Controls(
code: "remarks",
controlValue: element.remarks.isNotEmpty ? element.remarks : ""),
);
controls.add(
Controls(code: "ordertype", controlValue: "1"),
Controls(code: "ordertype", controlValue: '1'),
);
});
entityList.isNotEmpty
? entityList.forEach((element) {

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -122,7 +123,14 @@ class AddSickLeavScreen extends StatelessWidget {
),
// color: Colors.green, //Colors.black,
onPressed: () => {
if (item.status != 1)
if (item.status == 1)
{
DrAppToastMsg.showErrorToast(
TranslationBase.of(
context)
.sickleaveonhold)
}
else
{
openSickLeave(context, true,
extendedData: item)

@ -84,7 +84,7 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
onModelReady: (model2) => model2.preSickLeaveStatistics(
widget.appointmentNo, widget.patientMRN),
builder: (_, model2, w) => GestureDetector(
onTap: (){
onTap: () {
FocusScope.of(context).requestFocus(new FocusNode());
},
child: AppScaffold(
@ -113,10 +113,12 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppTextFormField(
borderColor: Colors.white,
@ -144,14 +146,15 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).sickLeaveDate,
@ -168,7 +171,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
textInputType: TextInputType.number,
controller: _toDateController,
onTap: () {
_presentDatePicker('_selectedToDate');
_presentDatePicker(
'_selectedToDate');
},
inputFormatter: ONLY_DATE,
onChanged: (value) {
@ -184,8 +188,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
margin: EdgeInsets.only(
top: 10, left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
@ -193,7 +197,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
child: Padding(
padding: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 0.9,
bottom: SizeConfig.widthMultiplier * 0.9,
bottom:
SizeConfig.widthMultiplier * 0.9,
right: SizeConfig.widthMultiplier * 3,
left: SizeConfig.widthMultiplier * 3),
child: Column(
@ -209,7 +214,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownButtonHideUnderline(
child:
DropdownButtonHideUnderline(
child: new IgnorePointer(
ignoring: true,
child: DropdownButton(
@ -229,31 +235,34 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
mainAxisSize:
MainAxisSize
.max,
children: <Widget>[
children: <
Widget>[
AppText(
item,
fontSize: SizeConfig
.textMultiplier *
fontSize:
SizeConfig.textMultiplier *
2.1,
color:
Colors.grey,
color: Colors
.grey,
),
],
);
}).toList();
},
onChanged: (newValue) =>
onChanged:
(newValue) =>
{},
items: model
.getClinicNameList()
.map((item) {
return DropdownMenuItem(
value:
item.toString(),
value: item
.toString(),
child: Text(
item,
textAlign:
TextAlign.end,
TextAlign
.end,
),
);
}).toList(),
@ -285,7 +294,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -317,7 +327,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -364,7 +375,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
model2.sickleaveResponse[
'ListSickLeavesToExtent']
['success']);
Navigator.of(context).popUntil((route) {
Navigator.of(context)
.popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
@ -413,7 +425,15 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
} else {
addSickLeave.patientMRN = widget.patient.patientMRN.toString();
addSickLeave.appointmentNo = widget.patient.appointmentNo.toString();
model2.addSickLeave(addSickLeave).then((value) => print(value));
await model2.addSickLeave(addSickLeave).then((value) => print(value));
DrAppToastMsg.showSuccesToast(
model2.sickleaveResponse['ListSickLeavesToExtent']['success']);
Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE;
});
Navigator.of(context)
.pushNamed(ADD_SICKLEAVE, arguments: {'patient': widget.patient});
}
} catch (err) {
print(err);

@ -389,7 +389,7 @@ class TranslationBase {
String get replay2 => localizedValues['replay2'][locale.languageCode];
String get outPatient => localizedValues['outPatient'][locale.languageCode];
String get outPatient => localizedValues['outPatients'][locale.languageCode];
String get logout => localizedValues['logout'][locale.languageCode];
@ -765,8 +765,7 @@ class TranslationBase {
String get postPlansEstimatedCost =>
localizedValues['postPlansEstimatedCost'][locale.languageCode];
String get postPlans =>
localizedValues['postPlans'][locale.languageCode];
String get postPlans => localizedValues['postPlans'][locale.languageCode];
String get ucaf => localizedValues['ucaf'][locale.languageCode];
@ -1085,28 +1084,43 @@ class TranslationBase {
localizedValues['clinicSearch'][locale.languageCode];
String get doctorSearch =>
localizedValues['doctorSearch'][locale.languageCode];
String get referralResponse => localizedValues['referralResponse'][locale.languageCode];
String get estimatedCost => localizedValues['estimatedCost'][locale.languageCode];
String get diagnosisDetail => localizedValues['diagnosisDetail'][locale.languageCode];
String get referralSuccessMsgAccept => localizedValues['referralSuccessMsgAccept'][locale.languageCode];
String get referralSuccessMsgReject => localizedValues['referralSuccessMsgReject'][locale.languageCode];
String get referralResponse =>
localizedValues['referralResponse'][locale.languageCode];
String get estimatedCost =>
localizedValues['estimatedCost'][locale.languageCode];
String get diagnosisDetail =>
localizedValues['diagnosisDetail'][locale.languageCode];
String get referralSuccessMsgAccept =>
localizedValues['referralSuccessMsgAccept'][locale.languageCode];
String get referralSuccessMsgReject =>
localizedValues['referralSuccessMsgReject'][locale.languageCode];
String get patientName =>
localizedValues['patient-name'][locale.languageCode];
String get appointmentNumber => localizedValues['appointmentNumber'][locale.languageCode];
String get sickLeaveComments => localizedValues['sickLeaveComments'][locale.languageCode];
String get pastMedicalHistory => localizedValues['pastMedicalHistory'][locale.languageCode];
String get pastSurgicalHistory => localizedValues['pastSurgicalHistory'][locale.languageCode];
String get complications => localizedValues['complications'][locale.languageCode];
String get appointmentNumber =>
localizedValues['appointmentNumber'][locale.languageCode];
String get sickLeaveComments =>
localizedValues['sickLeaveComments'][locale.languageCode];
String get pastMedicalHistory =>
localizedValues['pastMedicalHistory'][locale.languageCode];
String get pastSurgicalHistory =>
localizedValues['pastSurgicalHistory'][locale.languageCode];
String get complications =>
localizedValues['complications'][locale.languageCode];
String get floor => localizedValues['floor'][locale.languageCode];
String get roomCategory => localizedValues['roomCategory'][locale.languageCode];
String get otherDepartmentsInterventions => localizedValues['otherDepartmentsInterventions'][locale.languageCode];
String get otherProcedure => localizedValues['otherProcedure'][locale.languageCode];
String get admissionRequestSuccessMsg => localizedValues['admissionRequestSuccessMsg'][locale.languageCode];
String get roomCategory =>
localizedValues['roomCategory'][locale.languageCode];
String get otherDepartmentsInterventions =>
localizedValues['otherDepartmentsInterventions'][locale.languageCode];
String get otherProcedure =>
localizedValues['otherProcedure'][locale.languageCode];
String get admissionRequestSuccessMsg =>
localizedValues['admissionRequestSuccessMsg'][locale.languageCode];
String get infoStatus => localizedValues['infoStatus'][locale.languageCode];
String get doctorResponse => localizedValues['doctorResponse'][locale.languageCode];
String get sickleaveonhold =>
localizedValues['sickleaveonhold'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/models/auth/send_activation_code_model2.dart'
import 'package:doctor_app_flutter/models/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/otp/sms-popup.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
@ -17,6 +18,7 @@ import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart';
@ -233,7 +235,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(3, true, authProv)
authenticateUser(3,
true, authProv)
},
child: getButton(
user.logInTypeID,
@ -483,9 +486,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
return InkWell(
onTap: () => {
if (checkIfBiometricAvailable(BiometricType.fingerprint))
{
authenticateUser(3, true, authProv)
}
{authenticateUser(3, true, authProv)}
},
child: RoundedContainer(
backgroundColor:
@ -703,10 +704,23 @@ class _VerificationMethodsState extends State<VerificationMethods> {
loginWithFingurePrintFace(type, isActive, authProv) async {
if (isActive) {
// this.startBiometricLoginIfAvailable();
const iosStrings = const IOSAuthMessages(
cancelButton: 'cancel',
goToSettingsButton: 'settings',
goToSettingsDescription: 'Please set up your Touch ID.',
lockOut: 'Please reenable your Touch ID');
try {
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true,
stickyAuth: true);
stickyAuth: true,
iOSAuthStrings: iosStrings);
} on PlatformException catch (e) {
DrAppToastMsg.showErrorToast(e);
}
if (!mounted) return;
if (user != null && (user.logInTypeID == 3 || user.logInTypeID == 4)) {
this.sendActivationCode(type, authProv);
// this.checkActivationCode(authProv);

@ -0,0 +1,54 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:flutter/material.dart';
import 'dart:math';
class GaugeChart extends StatelessWidget {
final List<charts.Series> seriesList;
final bool animate;
GaugeChart(this.seriesList, {this.animate});
/// Creates a [PieChart] with sample data and no transition.
factory GaugeChart.withSampleData() {
return new GaugeChart(
_createSampleData(),
// Disable animations for image tests.
animate: false,
);
}
@override
Widget build(BuildContext context) {
return new charts.PieChart(seriesList,
animate: animate,
defaultRenderer: new charts.ArcRendererConfig(arcWidth: 10));
//);
}
static List<charts.Series<GaugeSegment, String>> _createSampleData() {
final data = [
new GaugeSegment('Low', 75, charts.MaterialPalette.blue.shadeDefault),
new GaugeSegment(
'Acceptable', 100, charts.MaterialPalette.blue.shadeDefault),
new GaugeSegment('High', 50, charts.MaterialPalette.blue.shadeDefault),
new GaugeSegment(
'Highly Unusual', 55, charts.MaterialPalette.blue.shadeDefault),
];
return [
new charts.Series<GaugeSegment, String>(
id: 'Segments',
domainFn: (GaugeSegment segment, _) => segment.segment,
measureFn: (GaugeSegment segment, _) => segment.size,
data: data,
)
];
}
}
/// Sample data type.
class GaugeSegment {
final String segment;
final int size;
final charts.Color color;
GaugeSegment(this.segment, this.size, this.color);
}

@ -7,9 +7,8 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class ProfileWelcomeWidget extends StatelessWidget {
final Widget clinicWidget;
final double height;
final double height;
ProfileWelcomeWidget(this.clinicWidget, {this.height = 140});
@ -62,16 +61,12 @@ final double height;
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
CircleAvatar(
// radius: (52)
child: ClipRRect(
borderRadius:BorderRadius.circular(10),
borderRadius: BorderRadius.circular(10),
child: Image.network(
authProvider
.doctorProfile.doctorImageURL,
authProvider.doctorProfile.doctorImageURL,
fit: BoxFit.fill,
width: 70,
height: 60,
@ -79,7 +74,6 @@ final double height;
),
backgroundColor: Colors.transparent,
)
],
),
),

Loading…
Cancel
Save