Merge branch 'dev_v2.8_roaa' into 'dev_v2.8_withouth_null_ckecking'

we fix some issues in pharmacies_items_request_model, refer-patient-screen and...

See merge request Cloud_Solution/doctor_app_flutter!939
merge-requests/941/merge
Elham Ali 4 years ago
commit e360ff5596

@ -56,7 +56,7 @@ const Map<String, Map<String, String>> localizedValues = {
"myInPatient": {"en": "My\n In Patients", "ar": "مرضاي\nالمنومين"},
"myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"},
"inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"},
"inPatientAll": {"en": "All Patients", "ar": "جميع المرضى المنومين"},
"inPatientAll": {"en": "All Patients", "ar": "المرضى المنومين"},
"operations": {"en": "Operations", "ar": "عمليات"},
"patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"},
"searchMedicineDashboard": {

@ -59,6 +59,8 @@ class PharmaciesItemsRequestModel {
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
//TODO Elham* fix it later
data['VersionID'] = 40;
return data;
}
}

@ -167,93 +167,95 @@ class PatientSickLeaveScreen extends StatelessWidget {
SizedBox(
width: 10,
),
Column(
children: [
CustomRow(
label: TranslationBase.of(
context)
.daysSickleave ,
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: (item.sickLeaveDays
.toString() !=
null &&
item.sickLeaveDays
.toString() !=
"null")
? item.sickLeaveDays
.toString()
: item.noOfDays
.toString(),
),
CustomRow(
label: TranslationBase.of(
context)
.startDate +
' ' ??
"",
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: AppDateUtils
.getDayMonthYearDateFormatted(
item.startDate.contains(
"/Date(")
? AppDateUtils
.convertStringToDate(
item
.startDate)
: DateTime.parse(
item.startDate),
Expanded(
child: Column(
children: [
CustomRow(
label: TranslationBase.of(
context)
.daysSickleave ,
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: (item.sickLeaveDays
.toString() !=
null &&
item.sickLeaveDays
.toString() !=
"null")
? item.sickLeaveDays
.toString()
: item.noOfDays
.toString(),
),
),
CustomRow(
label: TranslationBase.of(
context)
.endDate +
' ' ??
"",
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: AppDateUtils
.getDayMonthYearDateFormatted(
item.startDate.contains(
"/Date(")
? AppDateUtils
.convertStringToDate(
item.endDate ??
"")
.add(
Duration(
days: item
.noOfDays ??
item.sickLeaveDays),
)
: DateTime.parse(
item.startDate ??
"")
.add(
Duration(
days:
item.noOfDays ??
""),
),
CustomRow(
label: TranslationBase.of(
context)
.startDate +
' ' ??
"",
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: AppDateUtils
.getDayMonthYearDateFormatted(
item.startDate.contains(
"/Date(")
? AppDateUtils
.convertStringToDate(
item
.startDate)
: DateTime.parse(
item.startDate),
),
),
),
],
crossAxisAlignment:
CrossAxisAlignment.start,
CustomRow(
label: TranslationBase.of(
context)
.endDate +
' ' ??
"",
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: AppDateUtils
.getDayMonthYearDateFormatted(
item.startDate.contains(
"/Date(")
? AppDateUtils
.convertStringToDate(
item.endDate ??
"")
.add(
Duration(
days: item
.noOfDays ??
item.sickLeaveDays),
)
: DateTime.parse(
item.startDate ??
"")
.add(
Duration(
days:
item.noOfDays ??
""),
),
),
),
],
crossAxisAlignment:
CrossAxisAlignment.start,
),
),
],
),

@ -100,7 +100,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
appBarTitle: "Search Patient",
isShowAppBar: true,
appBar: PatientSearchHeader(
title: "My Out patient",
title: TranslationBase.of(context).myOutPatient,
),
baseViewModel: model,
body: Column(

@ -261,8 +261,7 @@ class _PatientMakeInPatientReferralScreenState
attributeName: 'facilityName',
attributeValueId: 'facilityId',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() async {
okFunction: (selectedValue) async {
_selectedBranch = selectedValue;
_selectedClinic = null;
_selectedDoctor = null;
@ -278,7 +277,6 @@ class _PatientMakeInPatientReferralScreenState
DrAppToastMsg.showErrorToast(
model.error);
}
});
},
);
showDialog(
@ -316,8 +314,8 @@ class _PatientMakeInPatientReferralScreenState
TranslationBase.of(context)
.clinicSearch,
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() async {
okFunction: (selectedValue) async {
_selectedDoctor = null;
_selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog(
@ -334,7 +332,7 @@ class _PatientMakeInPatientReferralScreenState
DrAppToastMsg.showErrorToast(
model.error);
}
});
},
);
showDialog(

@ -174,7 +174,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
fontWeight: FontWeight.w700,
color: HexColor("#359846"),
onPressed: () async {
setState(() async {
await locator<AnalyticsService>().logEvent(
eventCategory: "Refer Patient",
eventAction: "Submit Refer",
@ -203,7 +203,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
} else {
doctorError = null;
}
});
if (appointmentDate == null ||
_selectedBranch == null ||
_selectedClinic == null ||
@ -309,8 +309,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
attributeName: 'facilityName',
attributeValueId: 'facilityId',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() async {
okFunction: (selectedValue) async {
_selectedBranch = selectedValue;
_selectedClinic = null;
_selectedDoctor = null;
@ -322,7 +322,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
});
},
);
showDialog(
@ -358,8 +358,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
usingSearch: true,
hintSearchText: TranslationBase.of(context).clinicSearch,
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() async {
okFunction: (selectedValue) async {
_selectedDoctor = null;
_selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog(context);
@ -373,7 +373,6 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
});
},
);
showDialog(

@ -117,20 +117,20 @@ class VitalSingChartBloodPressure extends StatelessWidget {
(element) {
DateTime elementDate =
AppDateUtils.getDateTimeFromServerFormat(element.createdOn);
if (element.toJson()[viewKey1]?.toInt() != 0)
if (element.toJson()[viewKey1]?.toInt() != 0 && element.toJson()[viewKey1]?.toInt() != null)
timeSeriesData1.add(
TimeSeriesSales2(
new DateTime(
elementDate.year, elementDate.month, elementDate.day),
element.toJson()[viewKey1].toDouble(),
element.toJson()[viewKey1]?.toDouble(),
),
);
if (element.toJson()[viewKey2]?.toInt() != 0)
if (element.toJson()[viewKey2]?.toInt() != 0 && element.toJson()[viewKey2]?.toInt() != null)
timeSeriesData2.add(
TimeSeriesSales2(
new DateTime(
elementDate.year, elementDate.month, elementDate.day),
element.toJson()[viewKey2].toDouble(),
element.toJson()[viewKey2]?.toDouble(),
),
);
},

Loading…
Cancel
Save