|
|
|
|
@ -50,6 +50,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
|
|
|
|
|
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>();
|
|
|
|
|
bool isFormSubmitted = false;
|
|
|
|
|
bool complexDiagnosis = true;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
@ -116,16 +117,13 @@ Row(children: [
|
|
|
|
|
value: complexDiagnosis,
|
|
|
|
|
onChanged: (bool value) {
|
|
|
|
|
complexDiagnosis = value;
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
checkColor: Colors.white,
|
|
|
|
|
activeColor: Colors.green,
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).complexDiagnosis,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
SizedBox(
|
|
|
|
|
@ -145,8 +143,8 @@ Row(children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children:[ InkWell(
|
|
|
|
|
Column(children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: model.listOfICD10 != null
|
|
|
|
|
? () {
|
|
|
|
|
setState(() {
|
|
|
|
|
@ -178,8 +176,8 @@ Row(children: [
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
suffixIcon: IconButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if (icdNameController.text.length <= 3) {
|
|
|
|
|
DrAppToastMsg.showErrorToast("Please enter 4 or more characters");
|
|
|
|
|
if (icdNameController.text.length <= 2) {
|
|
|
|
|
DrAppToastMsg.showErrorToast("Please enter 3 or more characters");
|
|
|
|
|
} else {
|
|
|
|
|
model.listOfICD10.clear();
|
|
|
|
|
model.callAddAssessmentLookupsServices(searchKey: icdNameController.text);
|
|
|
|
|
@ -191,28 +189,25 @@ Row(children: [
|
|
|
|
|
)),
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
|
|
model.listOfICD10.length >0 && icdNameController.text.isNotEmpty ? Container(
|
|
|
|
|
model.listOfICD10.length > 0 && icdNameController.text.isNotEmpty
|
|
|
|
|
? Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.4, //height to 9% of screen height,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: model.listOfICD10.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return InkWell(child:ListTile(
|
|
|
|
|
title: AppText( model.listOfICD10[index].description + " / " + model.listOfICD10[index].code.toString(), fontSize: 12.0)),
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: ListTile(title: AppText(model.listOfICD10[index].description + " / " + model.listOfICD10[index].code.toString(), fontSize: 12.0)),
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
|
|
widget.mySelectedAssessment.selectedICD = model.listOfICD10[index];
|
|
|
|
|
icdNameController.text = model.listOfICD10[index].description;
|
|
|
|
|
model.listOfICD10.clear();
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
)) :SizedBox()
|
|
|
|
|
))
|
|
|
|
|
: SizedBox()
|
|
|
|
|
// CustomAutoCompleteTextField(
|
|
|
|
|
// isShowError: isFormSubmitted && widget.mySelectedAssessment.selectedICD == null,
|
|
|
|
|
// child: Row(
|
|
|
|
|
@ -259,7 +254,6 @@ Row(children: [
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
if (widget.mySelectedAssessment.selectedICD != null)
|
|
|
|
|
Column(
|
|
|
|
|
@ -411,7 +405,6 @@ Row(children: [
|
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
if (isUpdate) {
|
|
|
|
|
|
|
|
|
|
PostAssessmentRequestUpdateModel patchAssessmentReqModel = PostAssessmentRequestUpdateModel(
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeId: widget.patientInfo.episodeNo,
|
|
|
|
|
@ -425,7 +418,8 @@ Row(children: [
|
|
|
|
|
conditionId: mySelectedAssessment.selectedDiagnosisCondition.id,
|
|
|
|
|
prevIcdCode10ID: mySelectedAssessment.icdCode10ID,
|
|
|
|
|
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id,
|
|
|
|
|
icdcode10Id: mySelectedAssessment.selectedICD.code)]);
|
|
|
|
|
icdcode10Id: mySelectedAssessment.selectedICD.code)
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
await model.patchAssessment(patchAssessmentReqModel);
|
|
|
|
|
} else {
|
|
|
|
|
|