|
@@ -188,6 +188,7 @@ class MaternalHealthFormValue extends BaseFormValueChange {
|
|
|
void changeFamilyHistory(UpdateFormArgs e) {
|
|
|
UpdateFormType type = e.type;
|
|
|
bool isDisabledValue = false;
|
|
|
+
|
|
|
if (type == UpdateFormType.Add && e.sourceValue == "Family_History_1") {
|
|
|
|
|
|
isDisabledValue = true;
|
|
@@ -195,9 +196,69 @@ class MaternalHealthFormValue extends BaseFormValueChange {
|
|
|
e.sourceValue == "Family_History_1") {
|
|
|
|
|
|
isDisabledValue = false;
|
|
|
+ } else if (type == UpdateFormType.Add &&
|
|
|
+ e.sourceValue == "Family_History_2") {
|
|
|
+
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Family_History_2_Detail",
|
|
|
+ isHidden: false,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ } else if (type == UpdateFormType.Remove &&
|
|
|
+ e.sourceValue == "Family_History_2") {
|
|
|
+
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Family_History_2_Detail",
|
|
|
+ isHidden: true,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ } else if (type == UpdateFormType.Add &&
|
|
|
+ e.sourceValue == "Family_History_3") {
|
|
|
+
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Family_History_3_Detail",
|
|
|
+ isHidden: false,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ } else if (type == UpdateFormType.Remove &&
|
|
|
+ e.sourceValue == "Family_History_3") {
|
|
|
+
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Family_History_3_Detail",
|
|
|
+ isHidden: true,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ return;
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
+ if (isDisabledValue) {
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Family_History_3_Detail",
|
|
|
+ isHidden: true,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Family_History_2_Detail",
|
|
|
+ isHidden: true,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
FormInfo.instance.onChangeTargetValue.emit(
|
|
|
this,
|
|
|
TargetFormArgs(
|