Merge branch 'development' into feature-ucaf

merge-requests/239/head
mosazaid 4 years ago
commit e14df2855a

@ -519,13 +519,21 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "You make referral successfully",
'ar': "You make referral successfully"
},
'diagnoseType': {'en': "Diagnose Type", 'ar':"نوع التشخيص" },
'condition': {'en': "Condition", 'ar':"الحالة" },
'id': {'en': "ID", 'ar':"بطاقة هوية" },
'quantity': {'en': "Quantity", 'ar':"الكمية" },
'codeNo': {'en': "Code #", 'ar':"# الرمز" },
'covered': {'en': "Covered", 'ar':"مغطى" },
'approvalRequired': {'en': "Approval Required", 'ar':"الموافقة مطلوبة" },
'uncoveredByDoctor': {'en': "Uncovered By Doctor", 'ar':"غير مغطى من قبل الدكتور" },
'chiefComplaintEmptyMsg': {'en': "There is no Chief Complaint", 'ar':"ليس هناك شكوى رئيس" },
'fromTime': {'en': "From Time", 'ar': "من وقت"},
'toTime': {'en': "To Time", 'ar': "الى وقت"},
'diagnoseType': {'en': "Diagnose Type", 'ar': "نوع التشخيص"},
'condition': {'en': "Condition", 'ar': "الحالة"},
'id': {'en': "ID", 'ar': "بطاقة هوية"},
'quantity': {'en': "Quantity", 'ar': "الكمية"},
'codeNo': {'en': "Code #", 'ar': "# الرمز"},
'covered': {'en': "Covered", 'ar': "مغطى"},
'approvalRequired': {'en': "Approval Required", 'ar': "الموافقة مطلوبة"},
'uncoveredByDoctor': {
'en': "Uncovered By Doctor",
'ar': "غير مغطى من قبل الدكتور"
},
'chiefComplaintEmptyMsg': {
'en': "There is no Chief Complaint",
'ar': "ليس هناك شكوى رئيس"
},
};

@ -99,6 +99,7 @@ class SickLeaveViewModel extends BaseViewModel {
Future addReschedule(request) async {
setState(ViewState.Busy);
await _sickLeaveService.addReschedule(request);
notifyListeners();
if (_sickLeaveService.hasError) {
error = _sickLeaveService.error;
setState(ViewState.Error);

@ -124,10 +124,12 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].doctorName,
fontWeight: FontWeight.w700,
Expanded(
child: AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].doctorName,
fontWeight: FontWeight.w700,
),
),
],
),

@ -466,25 +466,17 @@ class _PatientsScreenState extends State<PatientsScreen> {
height:
10.0,
),
Padding(
padding: EdgeInsets.symmetric(
vertical:
5.5,
horizontal:
22.5),
child:
AppText(
AppText(
item.firstName +
" " +
item.lastName,
" " +
item.lastName,
fontSize:
2.0 * SizeConfig.textMultiplier,
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
FontWeight.bold,
backGroundcolor:
Colors.white,
Colors.white,
),
),
],
),
Row(

@ -696,7 +696,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
selectDate(BuildContext context, PrescriptionViewModel model) async {
DateTime selectedDate;
selectedDate = DateTime.now().add(Duration(hours: 10));
selectedDate = DateTime.now().add(Duration(hours: 15));
final DateTime picked = await showDatePicker(
context: context,
initialDate: selectedDate,

@ -299,7 +299,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
getDoctor(model, doctorId) {
var obj;
obj = model.where((i) => i['doctorID'].toString() == doctorId).toList();
print(obj);
//print(obj);
return obj.length > 0 ? obj[0]['doctorName'] : "";
}
@ -307,7 +307,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
getReasons(model, reasonID) {
var obj;
obj = model.where((i) => i['id'] == reasonID).toList();
print(obj);
//print(obj);
return obj.length > 0
? projectsProvider.isArabic == true

@ -24,6 +24,7 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart';
Helpers helpers = Helpers();
@ -49,13 +50,40 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
var fromDate;
var toDate;
var clinicID;
var fromTime;
var toTime;
TextEditingController _controller4;
void _presentDatePicker(id) {
var date = new DateTime.now();
var initialDate = id == 'fromDate'
? new DateTime(date.year, date.month, date.day + 15)
: new DateTime(fromDate.year, fromDate.month, fromDate.day);
var firstDate = id == 'fromDate'
? new DateTime(date.year, date.month, date.day + 15)
: new DateTime(fromDate.year, fromDate.month, fromDate.day);
showDatePicker(
context: context,
initialDate: new DateTime(date.year, date.month, date.day + 15),
firstDate: new DateTime(date.year, date.month, date.day + 15),
initialDate: initialDate,
firstDate: firstDate,
lastDate: DateTime(2050),
).then((pickedDate) {
if (pickedDate == null) {
return;
}
setState(() {
final df = new DateFormat('yyyy-MM-dd');
fromDate = pickedDate; //df.format();
_toDateController.text = df.format(pickedDate);
toDate = pickedDate;
});
});
}
void _presentCurrentDate(id) {
showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime.now(),
lastDate: DateTime(2050),
).then((pickedDate) {
if (pickedDate == null) {
@ -328,7 +356,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
TextInputType.number,
controller: _toDateController,
onTap: () {
_presentDatePicker(
_presentCurrentDate(
'fromDate');
},
inputFormatter: ONLY_DATE,
@ -355,14 +383,11 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
// new AppTextFormField(
// readOnly: true,
// hintText: "",
// borderColor: Colors.white,
// onSaved: (value) {},
// inputFormatter: ONLY_NUMBERS),
DateTimePicker(
timeHintText:
TranslationBase.of(
context)
.fromTime,
type:
DateTimePickerType.time,
controller: _controller4,
@ -373,6 +398,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
//locale: Locale('en', 'US'),
onChanged: (val) => () {
print(val);
this.fromTime = val;
},
validator: (val) {
print(val);
@ -403,16 +429,15 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
CrossAxisAlignment.start,
children: [
DateTimePicker(
timeHintText:
TranslationBase.of(
context)
.toTime,
type:
DateTimePickerType.time,
controller: _controller4,
//initialValue: _initialValue,
// icon: Icon(Icons.access_time),
//use24HourFormat: false,
//locale: Locale('en', 'US'),
onChanged: (val) => () {
print(val);
this.toTime = val;
},
validator: (val) {
print(val);
@ -761,7 +786,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"clinicId": this.profile['ClinicID'],
"doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate),
"dateTimeTo": toDate != null ? df.format(toDate) : df.format(fromDate),
"date": df.format(DateTime.now()),
"reasonId": reason == null ? model.allOffTime[0]['code'] : reason,
"coveringDoctorId":
@ -772,8 +797,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"weekDayId": 1,
"shiftId": 1,
"isOpen": true,
"timeFrom": null,
"timeTo": null,
"timeFrom": fromTime,
"timeTo": toTime,
"timeFromstr": "",
"timeTostr": ""
}
@ -784,7 +809,13 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
model.addReschedule(request).then((response) {
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).leaveCreated);
Navigator.pop(context);
model.getRescheduleLeave();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddRescheduleLeavScreen(),
// MyReferredPatient(),
),
);
});
}
@ -797,7 +828,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"clinicId": this.profile['ClinicID'],
"doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate),
"dateTimeTo": toDate != null ? df.format(toDate) : df.format(fromDate),
"date": df.format(DateTime.now()),
"reasonId": reason == null ? model.allOffTime[0]['code'] : reason,
"coveringDoctorId":
@ -808,8 +839,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"weekDayId": 1,
"shiftId": 1,
"isOpen": true,
"timeFrom": null,
"timeTo": null,
"timeFrom": fromTime,
"timeTo": toTime,
"timeFromstr": "",
"timeTostr": ""
}

@ -289,6 +289,10 @@ class TranslationBase {
String get toDate => localizedValues['toDate'][locale.languageCode];
String get fromTime => localizedValues['fromTime'][locale.languageCode];
String get toTime => localizedValues['toTime'][locale.languageCode];
String get searchPatientImageCaptionTitle =>
localizedValues['searchPatientImageCaptionTitle'][locale.languageCode];

@ -94,7 +94,7 @@ class PatientProfileWidget extends StatelessWidget {
color: Color(0xffCCCCCC),
),
Container(
height: 10 * SizeConfig.textMultiplier,
height: 11 * SizeConfig.textMultiplier,
child: Row(
children: [
Expanded(
@ -232,14 +232,16 @@ class PatientProfileWidget extends StatelessWidget {
SizeConfig.textMultiplier,
),
),
AppText(
patient.admissionDate != null
? "${DateUtils.convertDateFromServerFormat(patient.admissionDate, 'EEEE dd, MMMM yyyy hh:mm a')}"
: "",
color: Colors.black,
fontWeight: FontWeight.normal,
fontSize:
1.6 * SizeConfig.textMultiplier,
Expanded(
child: AppText(
patient.admissionDate != null
? "${DateUtils.convertDateFromServerFormat(patient.admissionDate, 'EEEE dd, MMMM yyyy hh:mm a')}"
: "",
color: Colors.black,
fontWeight: FontWeight.normal,
fontSize:
1.6 * SizeConfig.textMultiplier,
),
),
],
),
@ -374,13 +376,15 @@ class PatientProfileWidget extends StatelessWidget {
SizedBox(
width: 4,
),
AppText(
"${patient.nursingStationName}\n${patient.roomId}",
fontWeight:
FontWeight.normal,
fontSize: 1.4 *
SizeConfig
.textMultiplier,
Expanded(
child: AppText(
"${patient.nursingStationName}\n${patient.roomId}",
fontWeight:
FontWeight.normal,
fontSize: 1.4 *
SizeConfig
.textMultiplier,
),
),
],
),

@ -505,6 +505,8 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
baseViewModel: model,
child: MasterKeyCheckboxSearchWidget(
model: model,
hintSearchText: 'Search Examination',
buttonName: 'Add Examination',
masterList: model.physicalExaminationList,
removeHistory: (history){
setState(() {

Loading…
Cancel
Save