|
|
|
@ -272,36 +272,31 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
|
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
if (model.historyFamilyList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistoryFamily);
|
|
|
|
|
setState(() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
if (model.historySurgicalList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistorySurgical);
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistorySports);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (model.historyMedicalList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistoryMedical);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
// baseViewModel: model,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
PriorityBar(onTap: (activePriority) async {
|
|
|
|
|
widget.changePageViewIndex(activePriority);
|
|
|
|
|
if(activePriority ==1) {
|
|
|
|
|
if (model.historySurgicalList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistorySurgical);
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistorySports);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(activePriority ==2) {
|
|
|
|
|
if (model.historyMedicalList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistoryMedical);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|