add special one first calling

merge-requests/742/head
Elham Rababah 5 years ago
parent 7f3ae19fd2
commit 37e6853976

@ -65,9 +65,13 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
return BaseView<PatientSearchViewModel>( return BaseView<PatientSearchViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.clearPatientList(); model.clearPatientList();
if (widget.specialClinic != null) if (widget.specialClinic != null) {
await model.getSpecialClinicalCareMappingList( await model
widget.specialClinic.clinicID); .getSpecialClinicalCareMappingList(widget.specialClinic.clinicID);
requestModel.nursingStationID =
model.specialClinicalCareMappingList[0].nursingStationID;
requestModel.clinicID = 0;
}
model.getInPatientList(requestModel); model.getInPatientList(requestModel);
}, },
builder: (_, model, w) => builder: (_, model, w) =>
@ -101,19 +105,17 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
), ),
if(model.specialClinicalCareMappingList.isNotEmpty && if (model.specialClinicalCareMappingList.isNotEmpty &&
widget.specialClinic != null) widget.specialClinic != null &&
_activeTab != 2)
Container( Container(
width: MediaQuery width: MediaQuery.of(context).size.width * .3,
.of(context)
.size
.width * .3,
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton( child: DropdownButton(
dropdownColor: Colors.white, dropdownColor: Colors.white,
iconEnabledColor: Colors.black, iconEnabledColor: Colors.black,
isExpanded: true, isExpanded: true,
value: selectedMapId == null ? model value: selectedMapId == null ? model
.specialClinicalCareMappingList[0] .specialClinicalCareMappingList[0]
.nursingStationID : selectedMapId, .nursingStationID : selectedMapId,
iconSize: 25, iconSize: 25,

Loading…
Cancel
Save