add CDI service

merge-requests/202/head
Elham Rababah 4 years ago
parent 8a6ea1c0c5
commit a47e9b69f5

@ -111,7 +111,9 @@ class BaseAppClient {
} }
} }
} }
if(error == null) {
error = helpers.generateContactAdminMsg();
}
onFailure(error, statusCode); onFailure(error, statusCode);
} }
} }

@ -9,7 +9,8 @@ enum MasterKeysService {
AllergySeverity, AllergySeverity,
physiotherapyGoals, physiotherapyGoals,
DiagnosisCondition, DiagnosisCondition,
DiagnosisType DiagnosisType,
ICD10
} }
extension SelectedMasterKeysService on MasterKeysService { extension SelectedMasterKeysService on MasterKeysService {
@ -48,6 +49,9 @@ extension SelectedMasterKeysService on MasterKeysService {
case MasterKeysService.DiagnosisType: case MasterKeysService.DiagnosisType:
return 35; return 35;
break; break;
case MasterKeysService.ICD10:
return 2500;
break;
} }
} }
} }

@ -33,6 +33,7 @@ class LookupService extends BaseService {
// List<MasterKeyModel> listOfPhysiotherapyGoals = []; // List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> listOfDiagnosisType = []; List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = []; List<MasterKeyModel> listOfDiagnosisCondition = [];
List<MasterKeyModel> listOfICD10 = [];
Future getMasterLookup(MasterKeysService masterKeys) async { Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false; hasError = false;
@ -120,6 +121,13 @@ class LookupService extends BaseService {
.add(MasterKeyModel.fromJson(v)); .add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.ICD10:
listOfICD10.clear();
entryList.forEach((v) {
listOfICD10
.add(MasterKeyModel.fromJson(v));
});
break;
} }
} }
} }

@ -34,6 +34,7 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList; List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType; List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition; List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;
List<MasterKeyModel> get listOfICD10 => _SOAPService.listOfICD10;

@ -382,6 +382,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
if (model.listOfDiagnosisType.length == 0) { if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType); await model.getMasterLookup(MasterKeysService.DiagnosisType);
} }
// todo return it back when service is fixed.
// if (model.listOfICD10.length == 0) {
// await model.getMasterLookup(MasterKeysService.ICD10);
// }
}, },
builder: (_, model, w) => builder: (_, model, w) =>
AppScaffold( AppScaffold(
@ -431,47 +435,43 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: model.listOfDiagnosisCondition != onTap: model.listOfDiagnosisType != null
null ? () {
? () { MasterKeyDailog dialog = MasterKeyDailog(
MasterKeyDailog dialog = MasterKeyDailog( list: model.listOfDiagnosisType,
list: model.listOfDiagnosisCondition, selectedValue: widget
selectedValue: widget.mySelectedAssessment .mySelectedAssessment
.selectedDiagnosisCondition, .selectedICD,
okText: TranslationBase okText: TranslationBase.of(context).ok,
.of(context) okFunction:
.ok, (MasterKeyModel selectedValue) {
okFunction: ( setState(() {
MasterKeyModel selectedValue) {
setState(() {
widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Condition",
widget.mySelectedAssessment widget.mySelectedAssessment
.selectedDiagnosisCondition != null .selectedICD = selectedValue;
? widget.mySelectedAssessment });
.selectedDiagnosisCondition },
.nameEn );
: null, showDialog(
true), barrierDismissible: false,
enabled: false, context: context,
), builder: (BuildContext context) {
), return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
"Name / ICD",
widget.mySelectedAssessment.selectedICD !=
null
? widget.mySelectedAssessment
.selectedICD.nameEn
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,

@ -224,12 +224,15 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height: index == 3 ? 5 : 10,
), ),
AppText( Container(
"PLAN", margin: EdgeInsets.only(left: index == 3? 15:0),
fontWeight: FontWeight.bold, child: AppText(
textAlign: TextAlign.center, "PLAN",
fontSize: 14, fontWeight: FontWeight.bold,
), textAlign: TextAlign.center,
fontSize: 14,
),
),
], ],
), ),
), ),
@ -445,11 +448,14 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height: index == 3 ? 5 : 10,
), ),
AppText( Container(
"PLAN", margin: EdgeInsets.only(right:index == 3? 15:0),
fontWeight: FontWeight.bold, child: AppText(
fontSize: 14, "PLAN",
), fontWeight: FontWeight.bold,
fontSize: 14,
),
),
], ],
), ),
), ),

Loading…
Cancel
Save