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المنومين"}, "myInPatient": {"en": "My\n In Patients", "ar": "مرضاي\nالمنومين"},
"myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"}, "myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"},
"inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"}, "inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"},
"inPatientAll": {"en": "All Patients", "ar": "جميع المرضى المنومين"}, "inPatientAll": {"en": "All Patients", "ar": "المرضى المنومين"},
"operations": {"en": "Operations", "ar": "عمليات"}, "operations": {"en": "Operations", "ar": "عمليات"},
"patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"}, "patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"},
"searchMedicineDashboard": { "searchMedicineDashboard": {

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

@ -167,93 +167,95 @@ class PatientSickLeaveScreen extends StatelessWidget {
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Column( Expanded(
children: [ child: Column(
CustomRow( children: [
label: TranslationBase.of( CustomRow(
context) label: TranslationBase.of(
.daysSickleave , context)
labelSize: SizeConfig .daysSickleave ,
.getTextMultiplierBasedOnWidth() * labelSize: SizeConfig
3.3, .getTextMultiplierBasedOnWidth() *
valueSize: SizeConfig 3.3,
.getTextMultiplierBasedOnWidth() * valueSize: SizeConfig
4, .getTextMultiplierBasedOnWidth() *
value: (item.sickLeaveDays 4,
.toString() != value: (item.sickLeaveDays
null && .toString() !=
item.sickLeaveDays null &&
.toString() != item.sickLeaveDays
"null") .toString() !=
? item.sickLeaveDays "null")
.toString() ? item.sickLeaveDays
: item.noOfDays .toString()
.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),
), ),
), CustomRow(
CustomRow( label: TranslationBase.of(
label: TranslationBase.of( context)
context) .startDate +
.endDate + ' ' ??
' ' ?? "",
"", labelSize: SizeConfig
labelSize: SizeConfig .getTextMultiplierBasedOnWidth() *
.getTextMultiplierBasedOnWidth() * 3.3,
3.3, valueSize: SizeConfig
valueSize: SizeConfig .getTextMultiplierBasedOnWidth() *
.getTextMultiplierBasedOnWidth() * 4,
4, value: AppDateUtils
value: AppDateUtils .getDayMonthYearDateFormatted(
.getDayMonthYearDateFormatted( item.startDate.contains(
item.startDate.contains( "/Date(")
"/Date(") ? AppDateUtils
? AppDateUtils .convertStringToDate(
.convertStringToDate( item
item.endDate ?? .startDate)
"") : DateTime.parse(
.add( item.startDate),
Duration( ),
days: item
.noOfDays ??
item.sickLeaveDays),
)
: DateTime.parse(
item.startDate ??
"")
.add(
Duration(
days:
item.noOfDays ??
""),
),
), ),
), CustomRow(
], label: TranslationBase.of(
crossAxisAlignment: context)
CrossAxisAlignment.start, .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", appBarTitle: "Search Patient",
isShowAppBar: true, isShowAppBar: true,
appBar: PatientSearchHeader( appBar: PatientSearchHeader(
title: "My Out patient", title: TranslationBase.of(context).myOutPatient,
), ),
baseViewModel: model, baseViewModel: model,
body: Column( body: Column(

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

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

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

Loading…
Cancel
Save