merge-requests/315/head
Sultan Khan 5 years ago
commit 388c095d7f

@ -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_PROJECTS = 'Services/Lists.svc/REST/GetProjectForDoctorAPP';
const GET_REFERRAL_FACILITIES = 'Services/DoctorApplication.svc/REST/GetReferralFacilities';
const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo';
const GET_PATIENT_VITAL_SIGN =

@ -732,4 +732,6 @@ const Map<String, Map<String, String>> localizedValues = {
},
// 'icd': {'en': "ICD", 'ar': " "},
'orderNo': {'en': "Order No : ", 'ar': "رقم الطلب"},
'infoStatus': {'en': "Info Status", 'ar': "حالة المعلومات"},
'doctorResponse': {'en': "Doctor Response", 'ar': "استجابة الطبيب"},
};

@ -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'];

@ -49,6 +49,20 @@ class PatientReferralService extends LookupService {
}, body: info);
}
Future getReferralFacilities() async {
hasError = false;
Map<String, dynamic> body = Map();
body['isSameBranch'] = false;
await baseAppClient.post(GET_REFERRAL_FACILITIES, onSuccess: (response, statusCode) async {
projectsList = response['ProjectInfo'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getProjectInfo(int projectId) async {
Map<String, dynamic> body = Map();
body['ProjectID'] = projectId;

@ -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,

@ -62,7 +62,7 @@ class PatientReferralViewModel extends BaseViewModel {
Future getBranches() async {
setState(ViewState.BusyLocal);
await _referralPatientService.getProjectsList();
await _referralPatientService.getReferralFacilities();
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
@ -77,7 +77,7 @@ class PatientReferralViewModel extends BaseViewModel {
await _referralPatientService.getProjectInfo(projectId);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
@ -87,7 +87,7 @@ class PatientReferralViewModel extends BaseViewModel {
await _referralPatientService.getDoctorsList(clinicId);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/util/helpers.dart';
class ListGtMyPatientsQuestions {
String setupID;
int projectID;
@ -17,11 +19,14 @@ class ListGtMyPatientsQuestions {
int editedBy;
String editedOn;
String patientName;
String patientNameN;
Null patientNameN;
int gender;
String dateofBirth;
String mobileNumber;
String emailAddress;
String doctorResponse;
String infoStatus;
Null clinicID;
String age;
String genderDescription;
bool isVidaCall;
@ -48,6 +53,9 @@ class ListGtMyPatientsQuestions {
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.doctorResponse,
this.infoStatus,
this.clinicID,
this.age,
this.genderDescription,
this.isVidaCall});
@ -61,6 +69,7 @@ class ListGtMyPatientsQuestions {
doctorID = json['DoctorID'];
requestType = json['RequestType'];
requestDate = Helpers.convertStringToDate(json['RequestDate']) ;
requestTime = json['RequestTime'];
remarks = json['Remarks'];
status = json['Status'];
@ -74,6 +83,9 @@ class ListGtMyPatientsQuestions {
dateofBirth = json['DateofBirth'];
mobileNumber = json['MobileNumber'];
emailAddress = json['EmailAddress'];
doctorResponse = json['DoctorResponse'];
infoStatus = json['InfoStatus'];
clinicID = json['ClinicID'];
age = json['Age'];
genderDescription = json['GenderDescription'];
isVidaCall = json['IsVidaCall'];
@ -102,9 +114,12 @@ class ListGtMyPatientsQuestions {
data['DateofBirth'] = this.dateofBirth;
data['MobileNumber'] = this.mobileNumber;
data['EmailAddress'] = this.emailAddress;
data['DoctorResponse'] = this.doctorResponse;
data['InfoStatus'] = this.infoStatus;
data['ClinicID'] = this.clinicID;
data['Age'] = this.age;
data['GenderDescription'] = this.genderDescription;
data['IsVidaCall'] = this.isVidaCall;
return data;
}
}
}

@ -209,7 +209,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
setState(() {
isLoading = false;
});
helpers.showErrorToast(error);
helpers.showErrorToast(error.message);
//DrAppToastMsg.showErrorToast(error);
});
}

@ -589,7 +589,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
],
),
bodyWidget: ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
@ -763,7 +763,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
],
),
bodyWidget: ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -177,15 +178,18 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedBranch = null;
_selectedClinic = null;
_selectedDoctor = null;
model.getDoctorBranch().then((value) {
model.getDoctorBranch().then((value) async {
_selectedBranch = value;
if (_referTo['id'] == 1) {
GifLoaderDialogUtils.showMyDialog(context);
model
await model
.getClinics(_selectedBranch['facilityId'])
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
}
});
});
@ -226,15 +230,18 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
attributeValueId: 'facilityId',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
setState(() async {
_selectedBranch = selectedValue;
_selectedClinic = null;
_selectedDoctor = null;
GifLoaderDialogUtils.showMyDialog(context);
model
await model
.getClinics(_selectedBranch['facilityId'])
.then((_) =>
GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
});
},
);
@ -277,15 +284,18 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
TranslationBase.of(context).clinicSearch,
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
setState(() async {
_selectedDoctor = null;
_selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog(context);
model
await model
.getClinicDoctors(
_selectedClinic['ClinicID'].toString())
.then((_) =>
GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
});
},
);

@ -210,20 +210,21 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
NetworkBaseView(
baseViewModel: model,
child: GestureDetector(
onTap: (){
onTap: () {
FocusScope.of(context).requestFocus(new FocusNode());
},
child: DraggableScrollableSheet(
initialChildSize: 0.90,
maxChildSize: 0.90,
minChildSize: 0.9,
builder: (BuildContext context, ScrollController scrollController) {
builder:
(BuildContext context, ScrollController scrollController) {
return SingleChildScrollView(
child: Container(
height: 1010,
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -247,8 +248,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: InkWell(
onTap: model.allMedicationList != null
? () {
Helpers.hideKeyboard(context);
setState(() {
Helpers.hideKeyboard(context);
setState(() {
_selectedMedication = null;
});
}
@ -267,8 +268,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
true,
),
itemSubmitted: (item) => setState(
() =>
_selectedMedication = item),
() => _selectedMedication =
item),
key: key,
suggestions:
model.allMedicationList,
@ -278,19 +279,18 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Texts(suggestion
.description +
'/' +
suggestion.genericName),
suggestion
.genericName),
padding:
EdgeInsets.all(8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.genericName
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.genericName.toLowerCase().startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
.startsWith(input
.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(
@ -338,19 +338,22 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Row(
children: [
Container(
width:
MediaQuery.of(context).size.width *
0.550,
width: MediaQuery.of(context)
.size
.width *
0.550,
child: TextFields(
inputFormatters: [
LengthLimitingTextInputFormatter(4),
WhitelistingTextInputFormatter
.digitsOnly
],
hintText: TranslationBase.of(context)
.strength,
// inputFormatters: [
// LengthLimitingTextInputFormatter(
// 4),
// WhitelistingTextInputFormatter
// .digitsOnly
// ],
hintText:
TranslationBase.of(context)
.strength,
controller: strengthController,
keyboardType: TextInputType.number,
keyboardType: TextInputType.numberWithOptions(decimal: true,),
onChanged: (String value) {
setState(() {
strengthChar = value.length;
@ -375,40 +378,49 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
width: 10.0,
),
Container(
width:
MediaQuery.of(context).size.width *
0.350,
width: MediaQuery.of(context)
.size
.width *
0.350,
child: InkWell(
onTap: model.medicationStrengthList !=
null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model
.medicationStrengthList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText: TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
units = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
onTap:
model.medicationStrengthList !=
null
? () {
Helpers.hideKeyboard(
context);
ListSelectDialog
dialog =
ListSelectDialog(
list: model
.medicationStrengthList,
attributeName:
'nameEn',
attributeValueId:
'id',
okText:
TranslationBase.of(
context)
.ok,
okFunction:
(selectedValue) {
setState(() {
units =
selectedValue;
});
},
);
showDialog(
barrierDismissible:
false,
context: context,
builder: (BuildContext
context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration:
textFieldSelectorDecoration(
@ -430,8 +442,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: InkWell(
onTap: model.medicationRouteList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model.medicationRouteList,
attributeName: 'nameEn',
@ -452,7 +464,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
builder:
(BuildContext context) {
return dialog;
},
);
@ -473,13 +486,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.medicationFrequencyList != null
onTap: model.medicationFrequencyList !=
null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationFrequencyList,
list: model
.medicationFrequencyList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
@ -494,7 +508,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
builder:
(BuildContext context) {
return dialog;
},
);
@ -502,7 +517,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).frequency,
TranslationBase.of(context)
.frequency,
frequency != null
? frequency['nameEn']
: null,
@ -515,13 +531,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.medicationDoseTimeList != null
onTap: model.medicationDoseTimeList !=
null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationDoseTimeList,
list: model
.medicationDoseTimeList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
@ -536,7 +553,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
builder:
(BuildContext context) {
return dialog;
},
);
@ -544,7 +562,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).doseTime,
TranslationBase.of(context)
.doseTime,
doseTime != null
? doseTime['nameEn']
: null,
@ -554,103 +573,74 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
),
),
SizedBox(height: spaceBetweenTextFileds),
if (model.patientAssessmentList.isNotEmpty)
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: indicationList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: indicationList,
attributeName: 'name',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
indication = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
model.patientAssessmentList[0]
.icdCode10ID
.toString(),
indication != null
? indication['name']
width: double.infinity,
child: Row(
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.29,
child: InkWell(
onTap: indicationList != null
? () {
Helpers.hideKeyboard(
context);
}
: null,
true),
enabled: true,
readOnly: true,
),
child: TextField(
decoration:
textFieldSelectorDecoration(
model
.patientAssessmentList[
0]
.icdCode10ID
.toString(),
indication != null
? indication['name']
: null,
true),
enabled: true,
readOnly: true,
),
),
),
Container(
width: MediaQuery.of(context)
.size
.width *
0.65,
child: InkWell(
onTap: indicationList != null
? () {
Helpers.hideKeyboard(
context);
}
: null,
child: TextField(
maxLines: 5,
decoration:
textFieldSelectorDecoration(
model
.patientAssessmentList[
0]
.asciiDesc
.toString(),
indication != null
? indication['name']
: null,
true),
enabled: true,
readOnly: true,
),
),
),
],
),
),
//model.patientAssessmentList.forEach((element) { }).
// Column(
// children: model.patientAssessmentList
// .map((element) {
// return Container(
// height: screenSize.height * 0.070,
// child: InkWell(
// onTap: indicationList != null
// ? () {
// ListSelectDialog dialog =
// ListSelectDialog(
// list: indicationList,
// attributeName: 'name',
// attributeValueId: 'id',
// okText: TranslationBase.of(
// context)
// .ok,
// okFunction: (selectedValue) {
// setState(() {
// indication =
// selectedValue;
// });
// },
// );
// showDialog(
// barrierDismissible: false,
// context: context,
// builder:
// (BuildContext context) {
// return dialog;
// },
// );
// }
// : null,
// child: TextField(
// decoration:
// textFieldSelectorDecoration(
// element.icdCode10ID
// .toString(),
// indication != null
// ? indication['name']
// : null,
// true),
// enabled: true,
// readOnly: true,
// ),
// ),
// );
// }).toList(),
// ),
SizedBox(height: spaceBetweenTextFileds),
Container(
height: screenSize.height * 0.070,
@ -660,7 +650,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).date,
TranslationBase.of(context)
.date,
selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null,
@ -677,13 +668,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.medicationDurationList != null
onTap: model.medicationDurationList !=
null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list:
model.medicationDurationList,
list: model
.medicationDurationList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
@ -698,7 +690,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
builder:
(BuildContext context) {
return dialog;
},
);
@ -706,7 +699,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).duration,
TranslationBase.of(context)
.duration,
duration != null
? duration['nameEn']
: null,
@ -726,17 +720,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: TextFields(
maxLines: 6,
minLines: 4,
hintText:
TranslationBase.of(context).instruction,
hintText: TranslationBase.of(context)
.instruction,
controller: instructionController,
//keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
),
),
SizedBox(height: spaceBetweenTextFileds),
@ -763,8 +750,23 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
"Please Fill All Fields");
return;
}
if (int.parse(
strengthController.text) >
1000) {
DrAppToastMsg.showErrorToast(
"1000 is the MAX for the strength");
return;
}
if (int.parse(
strengthController.text) ==
0) {
DrAppToastMsg.showErrorToast(
"Streangth can't be zero");
return;
}
if (formKey.currentState.validate()) {
if (formKey.currentState
.validate()) {
Navigator.pop(context);
{
// var x = model
@ -801,8 +803,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
model: widget.model,
duration:
duration['id'].toString(),
frequency:
frequency['id'].toString(),
frequency: frequency['id']
.toString(),
route: route['id'].toString(),
drugId: _selectedMedication
.itemId
@ -812,7 +814,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
indication:
indicationController.text,
instruction:
instructionController.text,
instructionController
.text,
doseTime: selectedDate,
);
}

@ -214,16 +214,16 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
0]
.entityList[
index]
.startDate)
.createdOn)
.day
.toString(),
color: Colors
.green,
),
AppText(
Helpers.getMonth(model.prescriptionList[0].entityList[index].startDate !=
Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
null
? (DateTime.parse(model.prescriptionList[0].entityList[index].startDate)
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
.month)
: DateTime.now()
.month)
@ -261,9 +261,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
child:
AppText(
model
.prescriptionList[0]
.entityList[index]
.startDate,
.prescriptionList[
0]
.entityList[
index]
.startDate
.replaceAll("-",
"/"),
fontSize:
12.0,
),

File diff suppressed because it is too large Load Diff

@ -34,13 +34,12 @@ postProcedure(
postProcedureReqModel.patientMRN = patient.patientMRN;
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:
orderType.toString().isNotEmpty ? orderType.toString() : '1'),
Controls(code: "ordertype", controlValue: element.type),
);
});
@ -218,43 +217,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 +265,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,34 +90,87 @@ class _EntityListCheckboxSearchWidgetState
children: items.map((historyInfo) {
return Column(
children: [
Row(
ExpansionTile(
title: Row(
children: [
Checkbox(
value: widget.isEntityListSelected(
historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget.isEntityListSelected(
historyInfo)) {
widget.removeHistory(
historyInfo);
} else {
widget
.addHistory(historyInfo);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: Texts(
historyInfo.procedureName,
variant: "bodyText",
bold: true,
color: Colors.black),
),
),
],
),
children: [
Checkbox(
value: widget.isEntityListSelected(
historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget.isEntityListSelected(
historyInfo)) {
widget
.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: Texts(
historyInfo.procedureName,
variant: "bodyText",
bold: true,
color: Colors.black),
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(),

@ -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,
),

@ -1117,6 +1117,9 @@ class TranslationBase {
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];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -233,11 +233,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(
3,
BiometricType
.face.index,
authProv)
authenticateUser(3, true, authProv)
},
child: getButton(
user.logInTypeID,
@ -488,8 +484,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
onTap: () => {
if (checkIfBiometricAvailable(BiometricType.fingerprint))
{
authenticateUser(
3, BiometricType.fingerprint.index, authProv)
authenticateUser(3, true, authProv)
}
},
child: RoundedContainer(
@ -524,7 +519,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
return InkWell(
onTap: () {
if (checkIfBiometricAvailable(BiometricType.face)) {
authenticateUser(4, BiometricType.face.index, authProv);
authenticateUser(4, true, authProv);
}
},
child: RoundedContainer(
@ -706,7 +701,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
}
loginWithFingurePrintFace(type, isActive, authProv) async {
if (isActive == 1) {
if (isActive) {
// this.startBiometricLoginIfAvailable();
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Scan your fingerprint to authenticate',

@ -167,12 +167,58 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
children: <Widget>[
Divider(color: Colors.grey),
SizedBox(height: 5,),
AppText(
widget.reply.remarks,
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).remarks + " : ",
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
),Expanded(
child: AppText(
widget.reply.remarks,
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
),
),
],
),
SizedBox(height: 10,)
SizedBox(height: 10,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).doctorResponse + " : ",
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
),Expanded(
child: AppText(
widget.reply.doctorResponse,
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
),
),
],
),SizedBox(height: 10,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).infoStatus + " : ",
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
),Expanded(
child: AppText(
widget.reply.infoStatus,
fontSize: 2.5 * SizeConfig.textMultiplier,
//fontWeight: FontWeight.bold,
),
),
],
)
],
),
),

@ -29,53 +29,58 @@ class AppScaffold extends StatelessWidget {
Widget build(BuildContext context) {
AppGlobal.CONTEX = context;
ProjectViewModel projectProvider = Provider.of(context);
return Scaffold(
backgroundColor: Colors.white,
appBar: isShowAppBar
? AppBar(
elevation: 0,
backgroundColor: HexColor('#515B5D'),
textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.white, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(DoctorApp.home_icon_active),
color: Colors.white, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
),
],
)
: null,
body: projectProvider.isInternetConnection
? baseViewModel != null
? NetworkBaseView(
baseViewModel: baseViewModel,
child: body,
)
: Stack(
children: <Widget>[body, buildAppLoaderWidget(isLoading)])
: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
"assets/images/undraw_connected_world_wuay.png",
height: 250,
),
AppText('No Internet Connection')
],
return GestureDetector(
onTap: (){
FocusScope.of(context).requestFocus(new FocusNode());
},
child: Scaffold(
backgroundColor: Colors.white,
appBar: isShowAppBar
? AppBar(
elevation: 0,
backgroundColor: HexColor('#515B5D'),
textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.white, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(DoctorApp.home_icon_active),
color: Colors.white, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
),
],
)
: null,
body: projectProvider.isInternetConnection
? baseViewModel != null
? NetworkBaseView(
baseViewModel: baseViewModel,
child: body,
)
: Stack(
children: <Widget>[body, buildAppLoaderWidget(isLoading)])
: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
"assets/images/undraw_connected_world_wuay.png",
height: 250,
),
AppText('No Internet Connection')
],
),
),
),
),
);
}

Loading…
Cancel
Save