diff --git a/src/UDS.Net.Forms/Models/UDS3/D1.cs b/src/UDS.Net.Forms/Models/UDS3/D1.cs index 3b5b25a1..736963ba 100644 --- a/src/UDS.Net.Forms/Models/UDS3/D1.cs +++ b/src/UDS.Net.Forms/Models/UDS3/D1.cs @@ -11,10 +11,13 @@ namespace UDS.Net.Forms.Models.UDS3 /// public class D1 : FormModel { + #region Section 1 Cognitive and behavioral status [Display(Name = "Diagnosis method — responses in this form are based on diagnosis by")] + [RequiredOnComplete] public int? DXMETHOD { get; set; } [Display(Name = "Does the subject have normal cognition (global CDR=0 and/or neuropsychological testing within normal range) and normal behavior (i.e., the subject does not exhibit behavior sufficient to diagnose I or dementia due to FTLD or LBD)?")] + [RequiredOnComplete] public int? NORMCOG { get; set; } [Display(Name = "Does the subject meet the criteria for dementia?")] @@ -56,6 +59,20 @@ public bool? DementiaSyndromeIndicated } } + [RequiredIf(nameof(DEMENTED), "0", ErrorMessage = "Please indicate the type of cognitive impairment (Question 5a-5e).")] + [NotMapped] + public bool? DementiaSyndromeNotIndicated + { + get + { + if (MCIAMEM || MCIAPLUS || MCINON1 || MCINON2 || IMPNOMCI) + { + return true; + } + else return null; + } + } + [Display(Name = "Amnestic MCI, single domain (aMCI SD)")] public bool MCIAMEM { get; set; } @@ -188,37 +205,50 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated [Display(Name = "Cognitively impaired, not MCI")] public bool IMPNOMCI { get; set; } + #endregion + #region Section 2 Biomarkers, imaging and genetics [Display(Name = "Abnormally elevated amyloid on PET")] + [RequiredOnComplete] public int? AMYLPET { get; set; } [Display(Name = "Abnormally low amyloid in CSF")] + [RequiredOnComplete] public int? AMYLCSF { get; set; } [Display(Name = "FDG-PET pattern of AD")] + [RequiredOnComplete] public int? FDGAD { get; set; } [Display(Name = "Hippocampal atrophy")] + [RequiredOnComplete] public int? HIPPATR { get; set; } [Display(Name = "Tau PET evidence for AD")] + [RequiredOnComplete] public int? TAUPETAD { get; set; } [Display(Name = "Abnormally elevated CSF tau or ptau")] + [RequiredOnComplete] public int? CSFTAU { get; set; } [Display(Name = "FDG-PET evidence for frontal or anterior temporal hypometabolism for FTLD")] + [RequiredOnComplete] public int? FDGFTLD { get; set; } [Display(Name = "Tau PET evidence for FTLD")] + [RequiredOnComplete] public int? TPETFTLD { get; set; } [Display(Name = "Structural MR evidence for frontal or anterior temporal atrophy for FTLD")] + [RequiredOnComplete] public int? MRFTLD { get; set; } [Display(Name = "Dopamine transporter scan (DATscan) evidence for Lewy body disease")] + [RequiredOnComplete] public int? DATSCAN { get; set; } [Display(Name = "Other (specify)")] + [RequiredOnComplete] public int? OTHBIOM { get; set; } [Display(Name = "Other (specify)")] @@ -228,30 +258,39 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public string? OTHBIOMX { get; set; } [Display(Name = "Large vessel infarct(s)")] + [RequiredOnComplete] public int? IMAGLINF { get; set; } [Display(Name = "Lacunar infarct(s)")] + [RequiredOnComplete] public int? IMAGLAC { get; set; } [Display(Name = "Macrohemorrhage(s)")] + [RequiredOnComplete] public int? IMAGMACH { get; set; } [Display(Name = "Microhemorrhage(s)")] + [RequiredOnComplete] public int? IMAGMICH { get; set; } [Display(Name = "Moderate white-matter hyperintensity (CHS score 5–6)")] + [RequiredOnComplete] public int? IMAGMWMH { get; set; } [Display(Name = "Extensive white-matter hyperintensity (CHS score 7–8+)")] + [RequiredOnComplete] public int? IMAGEWMH { get; set; } [Display(Name = "Does the subject have a dominantly inherited AD mutation (PSEN1, PSEN2, APP)")] + [RequiredOnComplete] public int? ADMUT { get; set; } [Display(Name = "Does the subject have a hereditary FTLD mutation (e.g., GRN, VCP, TARBP, FUS, C9orf72, CHMP2B, MAPT)?")] + [RequiredOnComplete] public int? FTLDMUT { get; set; } [Display(Name = "Does the subject have a hereditary mutation other than an AD or FTLD mutation?")] + [RequiredOnComplete] public int? OTHMUT { get; set; } [Display(Name = "Other (specify)")] @@ -260,18 +299,380 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated [ProhibitedCharacters] public string? OTHMUTX { get; set; } + #endregion + + #region One Primary Diagnosis Allowed Questions 11a-39a + [RequiredOnComplete(ErrorMessage = "In Section 3, only ONE diagnosis should be indicated as primary.")] + [NotMapped] + public bool? OnePrimaryDiagnosisAllowed + { + get + { + int counter = 0; + + if (ALZDISIF.HasValue && ALZDISIF == 1) + { + counter++; + } + if (LBDIF.HasValue && LBDIF == 1) + { + counter++; + } + + if (MSAIF.HasValue && MSAIF == 1) + { + counter++; + } + if (PSPIF.HasValue && PSPIF == 1) + { + counter++; + } + if (CORTIF.HasValue && CORTIF == 1) + { + counter++; + } + + if (FTLDMOIF.HasValue && FTLDMOIF == 1) + { + counter++; + } + if (FTLDNOIF.HasValue && FTLDNOIF == 1) + { + counter++; + } + if (CVDIF.HasValue && CVDIF == 1) + { + counter++; + } + if (ESSTREIF.HasValue && ESSTREIF == 1) + { + counter++; + } + if (DOWNSIF.HasValue && DOWNSIF == 1) + { + counter++; + } + if (HUNTIF.HasValue && HUNTIF == 1) + { + counter++; + } + + if (PRIONIF.HasValue && PRIONIF == 1) + { + counter++; + } + + { + if (BRNINJIF.HasValue && BRNINJIF == 1) + counter++; + } + + if (HYCEPHIF.HasValue && HYCEPHIF == 1) + { + counter++; + } + + if (EPILEPIF.HasValue && EPILEPIF == 1) + { + counter++; + } + + if (NEOPIF.HasValue && NEOPIF == 1) + { + counter++; + } + + if (HIVIF.HasValue && HIVIF == 1) + { + counter++; + } + + if (OTHCOGIF.HasValue && OTHCOGIF == 1) + { + counter++; + } + + if (DEPIF.HasValue && DEPIF == 1) + { + counter++; + } + + if (BIPOLDIF.HasValue && BIPOLDIF == 1) + { + counter++; + } + + if (SCHIZOIF.HasValue && SCHIZOIF == 1) + { + counter++; + } + + if (ANXIETIF.HasValue && ANXIETIF == 1) + { + counter++; + } + + if (DELIRIF.HasValue && DELIRIF == 1) + { + counter++; + } + + if (PTSDDXIF.HasValue && PTSDDXIF == 1) + { + counter++; + } + + if (OTHPSYIF.HasValue && OTHPSYIF == 1) + { + counter++; + } + + if (ALCDEMIF.HasValue && ALCDEMIF == 1) + { + counter++; + } + + if (IMPSUBIF.HasValue && IMPSUBIF == 1) + { + counter++; + } + + if (DYSILLIF.HasValue && DYSILLIF == 1) + { + counter++; + } + + if (MEDSIF.HasValue && MEDSIF == 1) + { + counter++; + } + + if (COGOTHIF.HasValue && COGOTHIF == 1) + { + counter++; + } + + if (COGOTH2F.HasValue && COGOTH2F == 1) + { + counter++; + } + + if (COGOTH3F.HasValue && COGOTH3F == 1) + { + counter++; + } + + + if (counter == 1) + { + return true; + } + + else + { + if (NORMCOG.HasValue && NORMCOG == 1 && counter == 0) + { + return true; + } + return null; + } + } + } + + #endregion + + #region At Least One Or More Diagnoses Present Questions 11-39 + + [RequiredOnComplete(ErrorMessage = "In Section 3, if the particpant does not have normal cognition, at least ONE diagnosis should be indicated as present.")] + [NotMapped] + public bool? OneDiagnosesPresent + { + get + { + int counter = 0; + + if (ALZDIS == true) + { + counter++; + } + if (LBDIS == true) + { + counter++; + } + + if (MSA == true) + { + counter++; + } + if (PSP == true) + { + counter++; + } + if (CORT == true) + { + counter++; + } + + if (FTLDMO == true) + { + counter++; + } + if (FTLDNOS == true) + { + counter++; + } + if (CVD == true) + { + counter++; + } + if (ESSTREM == true) + { + counter++; + } + if (DOWNS == true) + { + counter++; + } + if (HUNT == true) + { + counter++; + } + + if (PRION == true) + { + counter++; + } + + if (BRNINJ == true) + { + counter++; + } + + if (HYCEPH == true) + { + counter++; + } + + if (EPILEP == true) + { + counter++; + } + + if (NEOP == true) + { + counter++; + } + + if (HIV == true) + { + counter++; + } + + if (OTHCOG == true) + { + counter++; + } + + if (DEP == true) + { + counter++; + } + + if (BIPOLDX == true) + { + counter++; + } + + if (SCHIZOP == true) + { + counter++; + } + + if (ANXIET == true) + { + counter++; + } + + if (DELIR == true) + { + counter++; + } + + if (PTSDDX == true) + { + counter++; + } + + if (OTHPSY == true) + { + counter++; + } + + if (ALCDEM == true) + { + counter++; + } + + if (IMPSUB == true) + { + counter++; + } + + if (DYSILL == true) + { + counter++; + } + + if (MEDS == true) + { + counter++; + } + + if (COGOTH == true) + { + counter++; + } + + if (COGOTH2 == true) + { + counter++; + } + + if (COGOTH3 == true) + { + counter++; + } + + if (counter >= 1) + { + return true; + } + + else + { + if (NORMCOG.HasValue && NORMCOG == 1) + { + return true; + } + return null; + } + + } + } + + #endregion + + #region Section 3 Etiologic Diagnoses [Display(Name = "Alzheimer's disease")] public bool ALZDIS { get; set; } [Display(Name = "Alzheimer’s disease, primary or contributing")] - [RequiredIf(nameof(ALZDIS), "True", ErrorMessage = "Indicate diagnosis for Alzheimer's disease.")] public int? ALZDISIF { get; set; } [Display(Name = "Lewy body disease")] public bool LBDIS { get; set; } [Display(Name = "Lewy body disease, primary or contributing")] - [RequiredIf(nameof(LBDIS), "True", ErrorMessage = "Indicate diagnosis for Lewy body disease.")] public int? LBDIF { get; set; } [Display(Name = "Parkinson's disease")] @@ -281,35 +682,30 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool MSA { get; set; } [Display(Name = "Multiple system atrophy nprimary or contributing")] - [RequiredIf(nameof(MSA), "True", ErrorMessage = "Indicate diagnosis for Multiple system atrophy.")] public int? MSAIF { get; set; } [Display(Name = "Progressive supranuclear palsy (PSP)")] public bool PSP { get; set; } [Display(Name = "Progressive supranuclear palsy (PSP), primary or contributing")] - [RequiredIf(nameof(PSP), "True", ErrorMessage = "Indicate diagnosis for Progressive supranuclear palsy (PSP).")] public int? PSPIF { get; set; } [Display(Name = "Corticobasal degeneration (CBD)")] public bool CORT { get; set; } [Display(Name = "Corticobasal degeneration (CBD), primary or contributing")] - [RequiredIf(nameof(CORT), "True", ErrorMessage = "Indicate diagnosis for Corticobasal degeneration (CBD).")] public int? CORTIF { get; set; } [Display(Name = "FTLD with motor neuron disease")] public bool FTLDMO { get; set; } [Display(Name = "FTLD with motor neuron disease, primary or contributing")] - [RequiredIf(nameof(FTLDMO), "True", ErrorMessage = "Indicate diagnosis for FTLD with motor neuron disease.")] public int? FTLDMOIF { get; set; } [Display(Name = "FTLD NOS")] public bool FTLDNOS { get; set; } [Display(Name = "FTLD NOS, primary or contributing")] - [RequiredIf(nameof(FTLDNOS), "True", ErrorMessage = "Indicate diagnosis for FTLD NOS.")] public int? FTLDNOIF { get; set; } [Display(Name = "If FTLD (Questions 14a – 14d) is Present, specify FTLD subtype")] @@ -329,7 +725,6 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool CVD { get; set; } [Display(Name = "Vascular brain injury, primary or contributing")] - [RequiredIf(nameof(CVD), "True", ErrorMessage = "Indicate diagnosis for Vascular brain injury.")] public int? CVDIF { get; set; } [Display(Name = "Previous symptomatic stroke?")] @@ -356,35 +751,30 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool ESSTREM { get; set; } [Display(Name = "Essential tremor, primary or contributing")] - [RequiredIf(nameof(ESSTREM), "True", ErrorMessage = "Indicate diagnosis for Essential tremor.")] public int? ESSTREIF { get; set; } [Display(Name = "Down syndrome")] public bool DOWNS { get; set; } [Display(Name = "Down syndrome, primary or contributing")] - [RequiredIf(nameof(DOWNS), "True", ErrorMessage = "Indicate diagnosis for Down syndrome.")] public int? DOWNSIF { get; set; } [Display(Name = "Huntington's disease")] public bool HUNT { get; set; } [Display(Name = "Huntington’s disease, primary or contributing")] - [RequiredIf(nameof(HUNT), "True", ErrorMessage = "Indicate diagnosis for Huntington's disease.")] public int? HUNTIF { get; set; } [Display(Name = "Prion disease (CJD, other)")] public bool PRION { get; set; } [Display(Name = "Prion disease, primary or contributing")] - [RequiredIf(nameof(PRION), "True", ErrorMessage = "Indicate diagnosis for Prion disease (CJD, other).")] public int? PRIONIF { get; set; } [Display(Name = "Traumatic brain injury")] public bool BRNINJ { get; set; } [Display(Name = "Traumatic brain injury, primary or contributing")] - [RequiredIf(nameof(BRNINJ), "True", ErrorMessage = "Indicate diagnosis for Traumatic brain injury.")] public int? BRNINJIF { get; set; } [Display(Name = "If Present, does the subject have symptoms consistent with chronic traumatic encephalopathy?")] @@ -395,21 +785,18 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool HYCEPH { get; set; } [Display(Name = "Normal-pressure hydrocephalus, primary or contributing")] - [RequiredIf(nameof(HYCEPH), "True", ErrorMessage = "Indicate diagnosis for Normal-pressure hydrocephalus.")] public int? HYCEPHIF { get; set; } [Display(Name = "Epilepsy")] public bool EPILEP { get; set; } [Display(Name = "Epilepsy, primary or contributing")] - [RequiredIf(nameof(EPILEP), "True", ErrorMessage = "Indicate diagnosis for Epilepsy.")] public int? EPILEPIF { get; set; } [Display(Name = "CNS neoplasm")] public bool NEOP { get; set; } [Display(Name = "CNS neoplasm, primary or contributing")] - [RequiredIf(nameof(NEOP), "True", ErrorMessage = "Indicate diagnosis for CNS neoplasm.")] public int? NEOPIF { get; set; } [Display(Name = "CNS neoplasm, benign or malignant?")] @@ -420,14 +807,12 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool HIV { get; set; } [Display(Name = "Human immunodeficiency virus (HIV), primary or contributing")] - [RequiredIf(nameof(HIV), "True", ErrorMessage = "Indicate diagnosis for Human immunodeficiency virus (HIV).")] public int? HIVIF { get; set; } [Display(Name = "Cognitive impairment due to other neurologic, genetic, or infectious conditions not listed above")] public bool OTHCOG { get; set; } [Display(Name = "Cognitive impairment due to other neurologic, genetic, or infectious conditions not listed above, primary or contributing")] - [RequiredIf(nameof(OTHCOG), "True", ErrorMessage = "Indicate diagnosis for Other cognitive impairment.")] public int? OTHCOGIF { get; set; } [Display(Name = "If Present, specify")] @@ -440,7 +825,6 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool DEP { get; set; } [Display(Name = "Active depression, primary or contributing")] - [RequiredIf(nameof(DEP), "True", ErrorMessage = "Indicate diagnosis for Active depression.")] public int? DEPIF { get; set; } [Display(Name = "If Present, select one")] @@ -451,42 +835,36 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool BIPOLDX { get; set; } [Display(Name = "Bipolar disorder, primary or contributing")] - [RequiredIf(nameof(BIPOLDX), "True", ErrorMessage = "Indicate diagnosis for Bipolar disorder.")] public int? BIPOLDIF { get; set; } [Display(Name = "Schizophrenia or other psychosis")] public bool SCHIZOP { get; set; } [Display(Name = "Schizophrenia or other psychosis, primary or contributing")] - [RequiredIf(nameof(SCHIZOP), "True", ErrorMessage = "Indicate diagnosis for Schizophrenia or other psychosis.")] public int? SCHIZOIF { get; set; } [Display(Name = "Anxiety disorder")] public bool ANXIET { get; set; } [Display(Name = "Anxiety disorder, primary or contributing")] - [RequiredIf(nameof(ANXIET), "True", ErrorMessage = "Indicate diagnosis for Anxiety disorder.")] public int? ANXIETIF { get; set; } [Display(Name = "Delirium")] public bool DELIR { get; set; } [Display(Name = "Delirium, primary or contributing")] - [RequiredIf(nameof(DELIR), "True", ErrorMessage = "Indicate diagnosis for Delirium.")] public int? DELIRIF { get; set; } [Display(Name = "Post-traumatic stress disorder (PTSD)")] public bool PTSDDX { get; set; } [Display(Name = "Post-traumatic stress disorder (PTSD), primary or contributing")] - [RequiredIf(nameof(PTSDDX), "True", ErrorMessage = "Indicate diagnosis for Post-traumatic stress disorder (PTSD).")] public int? PTSDDXIF { get; set; } [Display(Name = "Other psychiatric disease")] public bool OTHPSY { get; set; } [Display(Name = "Other psychiatric disease, primary or contributing")] - [RequiredIf(nameof(OTHPSY), "True", ErrorMessage = "Indicate diagnosis for Other psychiatric disease.")] public int? OTHPSYIF { get; set; } [Display(Name = "If Present, specify")] @@ -499,7 +877,6 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool ALCDEM { get; set; } [Display(Name = "Cognitive impairment due to alcohol abuse, primary or contributing")] - [RequiredIf(nameof(ALCDEM), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment due to alcohol abuse.")] public int? ALCDEMIF { get; set; } [Display(Name = "Current alcohol abuse")] @@ -510,28 +887,24 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool IMPSUB { get; set; } [Display(Name = "Cognitive impairment due to other substance abuse, primary or contributing")] - [RequiredIf(nameof(IMPSUB), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment due to other substance abuse.")] public int? IMPSUBIF { get; set; } [Display(Name = "Cognitive impairment due to systemic disease/medical illness (as indicated on Form D2)")] public bool DYSILL { get; set; } [Display(Name = "Cognitive impairment due to systemic disease/nmedical illness, primary or contributing")] - [RequiredIf(nameof(DYSILL), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment due to systemic disease/medical illness (as indicated on Form D2).")] public int? DYSILLIF { get; set; } [Display(Name = "Cognitive impairment due to medications")] public bool MEDS { get; set; } [Display(Name = "Cognitive impairment due to medications, primary or contributing")] - [RequiredIf(nameof(MEDS), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment due to medications.")] public int? MEDSIF { get; set; } [Display(Name = "Cognitive impairment NOS")] public bool COGOTH { get; set; } [Display(Name = "Cognitive impairment NOS, primary or contributing")] - [RequiredIf(nameof(COGOTH), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment NOS.")] public int? COGOTHIF { get; set; } [Display(Name = "If Present, specify")] @@ -544,7 +917,6 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool COGOTH2 { get; set; } [Display(Name = "Cognitive impairment NOS, primary or contributing")] - [RequiredIf(nameof(COGOTH2), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment NOS.")] public int? COGOTH2F { get; set; } [Display(Name = "If Present, specify")] @@ -557,7 +929,6 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated public bool COGOTH3 { get; set; } [Display(Name = "Cognitive impairment NOS, primary or contributing")] - [RequiredIf(nameof(COGOTH3), "True", ErrorMessage = "Indicate diagnosis for Cognitive impairment NOS.")] public int? COGOTH3F { get; set; } [Display(Name = "If Present, specify")] @@ -566,6 +937,7 @@ public bool? NonAmnesticMCIMultipleDomainsIndicated [ProhibitedCharacters] public string? COGOTH3X { get; set; } + #endregion public override IEnumerable Validate(ValidationContext validationContext) { foreach (var result in base.Validate(validationContext)) diff --git a/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml b/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml index b206eccc..e016d761 100644 --- a/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml +++ b/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml @@ -1,4 +1,4 @@ -@page "{id:int?}" +@page "{id:int?}" @model UDS.Net.Forms.Pages.UDS3.D1Model @{ Layout = "_LayoutForm"; @@ -46,7 +46,7 @@ -
+
@@ -69,7 +69,7 @@

- +
@@ -110,7 +110,7 @@

- +
@@ -320,7 +320,7 @@
- @Html.CheckBox("D1.MCIAMEM", Model.D1.MCIAMEM, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.MCIAMEM", Model.D1.MCIAMEM, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_fancycheckboxes_target= "checkbox" })
@@ -345,7 +345,7 @@
- @Html.CheckBox("D1.MCIAPLUS", Model.D1.MCIAPLUS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.MCIAPLUS", Model.D1.MCIAPLUS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIAPLAN\", \"D1.MCIAPATT\",\"D1.MCIAPEX\",\"D1.MCIAPVIS\"]", data_fancycheckboxes_target= "checkbox" })
@@ -413,7 +413,7 @@
- @Html.CheckBox("D1.MCINON1", Model.D1.MCINON1, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.MCINON1", Model.D1.MCINON1, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIN1LAN\" , \"D1.MCIN1ATT\" , \"D1.MCIN1EX\" ,\"D1.MCIN1VIS\" ]", data_fancycheckboxes_target= "checkbox" })
@@ -481,7 +481,7 @@
- @Html.CheckBox("D1.MCINON2", Model.D1.MCINON2, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.MCINON2", Model.D1.MCINON2, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MCIN2LAN\" , \"D1.MCIN2ATT\" , \"D1.MCIN2EX\" ,\"D1.MCIN2VIS\" ]", data_fancycheckboxes_target= "checkbox" })
@@ -549,7 +549,7 @@
- @Html.CheckBox("D1.IMPNOMCI", Model.D1.IMPNOMCI, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.IMPNOMCI", Model.D1.IMPNOMCI, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_fancycheckboxes_target= "checkbox" })
@@ -677,13 +677,12 @@ - + - - +
- +

@@ -783,12 +782,12 @@

- +

- +
@@ -836,7 +835,7 @@
- @Html.CheckBox("D1.ALZDIS", Model.D1.ALZDIS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.ALZDIS", Model.D1.ALZDIS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.ALZDISIF\"]" })
@@ -861,7 +860,7 @@
- @Html.CheckBox("D1.LBDIS", Model.D1.LBDIS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.LBDIS", Model.D1.LBDIS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.LBDIF\", \"D1.PARK\"]" })
@@ -907,7 +906,7 @@
- @Html.CheckBox("D1.MSA", Model.D1.MSA, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.MSA", Model.D1.MSA, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MSAIF\"]" })
@@ -919,7 +918,7 @@ - + @@ -941,7 +940,7 @@
- @Html.CheckBox("D1.PSP", Model.D1.PSP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.PSP", Model.D1.PSP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.PSPIF\",\"D1.FTLDSUBT\"]" })
@@ -953,7 +952,7 @@ - + @@ -968,7 +967,7 @@
- @Html.CheckBox("D1.CORT", Model.D1.CORT, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.CORT", Model.D1.CORT, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.CORTIF\",\"D1.FTLDSUBT\"]" })
@@ -980,7 +979,7 @@ - + @@ -995,7 +994,7 @@
- @Html.CheckBox("D1.FTLDMO", Model.D1.FTLDMO, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.FTLDMO", Model.D1.FTLDMO, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.FTLDMOIF\",\"D1.FTLDSUBT\"]" })
@@ -1007,7 +1006,7 @@ - + @@ -1022,7 +1021,7 @@
- @Html.CheckBox("D1.FTLDNOS", Model.D1.FTLDNOS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.FTLDNOS", Model.D1.FTLDNOS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.FTLDNOIF\",\"D1.FTLDSUBT\"]" })
@@ -1034,7 +1033,7 @@ - + @@ -1042,7 +1041,7 @@

- +
@@ -1059,7 +1058,7 @@ - +

@@ -1068,7 +1067,7 @@
- @Html.CheckBox("D1.CVD", Model.D1.CVD, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.CVD", Model.D1.CVD, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.CVDIF\",\"D1.PREVSTK\",\"D1.STROKDEC\",\"D1.STKIMAG\",\"D1.INFNETW\",\"D1.INFWMH\"]" })
@@ -1080,7 +1079,7 @@ - + @@ -1088,7 +1087,7 @@

- +
@@ -1149,7 +1148,7 @@
- @Html.CheckBox("D1.ESSTREM", Model.D1.ESSTREM, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.ESSTREM", Model.D1.ESSTREM, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.ESSTREIF\"]" })
@@ -1161,7 +1160,7 @@ - + @@ -1174,7 +1173,7 @@
- @Html.CheckBox("D1.DOWNS", Model.D1.DOWNS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.DOWNS", Model.D1.DOWNS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.DOWNSIF\"]" })
@@ -1186,7 +1185,7 @@ - + @@ -1199,7 +1198,7 @@
- @Html.CheckBox("D1.HUNT", Model.D1.HUNT, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.HUNT", Model.D1.HUNT, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.HUNTIF\"]" })
@@ -1211,7 +1210,7 @@ - + @@ -1224,7 +1223,7 @@
- @Html.CheckBox("D1.PRION", Model.D1.PRION, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.PRION", Model.D1.PRION, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.PRIONIF\"]" })
@@ -1236,7 +1235,7 @@ - + @@ -1249,7 +1248,7 @@
- @Html.CheckBox("D1.BRNINJ", Model.D1.BRNINJ, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.BRNINJ", Model.D1.BRNINJ, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.BRNINJIF\",\"D1.BRNINCTE\"]" })
@@ -1261,7 +1260,7 @@ - + @@ -1286,7 +1285,7 @@
- @Html.CheckBox("D1.HYCEPH", Model.D1.HYCEPH, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.HYCEPH", Model.D1.HYCEPH, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.HYCEPHIF\"]" })
@@ -1298,7 +1297,7 @@ - + @@ -1311,7 +1310,7 @@
- @Html.CheckBox("D1.EPILEP", Model.D1.EPILEP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.EPILEP", Model.D1.EPILEP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.EPILEPIF\"]" })
@@ -1323,7 +1322,7 @@ - + @@ -1336,7 +1335,7 @@
- @Html.CheckBox("D1.NEOP", Model.D1.NEOP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.NEOP", Model.D1.NEOP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.NEOPIF\", \"D1.NEOPSTAT\"]" })
@@ -1348,7 +1347,7 @@ - + @@ -1373,7 +1372,7 @@
- @Html.CheckBox("D1.HIV", Model.D1.HIV, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.HIV", Model.D1.HIV, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.HIVIF\"]" })
@@ -1385,7 +1384,7 @@ - + @@ -1398,7 +1397,7 @@
- @Html.CheckBox("D1.OTHCOG", Model.D1.OTHCOG, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.OTHCOG", Model.D1.OTHCOG, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.OTHCOGIF\",\"D1.OTHCOGX\"]" })
@@ -1410,7 +1409,7 @@ - + @@ -1435,7 +1434,7 @@
- @Html.CheckBox("D1.DEP", Model.D1.DEP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.DEP", Model.D1.DEP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.DEPIF\" , \"D1.DEPTREAT\"]" })
@@ -1447,7 +1446,7 @@ - + @@ -1472,7 +1471,7 @@
- @Html.CheckBox("D1.BIPOLDX", Model.D1.BIPOLDX, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.BIPOLDX", Model.D1.BIPOLDX, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.BIPOLDIF\"]" })
@@ -1484,7 +1483,7 @@ - + @@ -1497,7 +1496,7 @@
- @Html.CheckBox("D1.SCHIZOP", Model.D1.SCHIZOP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.SCHIZOP", Model.D1.SCHIZOP, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.SCHIZOIF\"]" })
@@ -1522,7 +1521,7 @@
- @Html.CheckBox("D1.ANXIET", Model.D1.ANXIET, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.ANXIET", Model.D1.ANXIET, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.ANXIETIF\"]" })
@@ -1547,7 +1546,7 @@
- @Html.CheckBox("D1.DELIR", Model.D1.DELIR, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.DELIR", Model.D1.DELIR, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.DELIRIF\"]" })
@@ -1559,7 +1558,7 @@ - + @@ -1572,7 +1571,7 @@
- @Html.CheckBox("D1.PTSDDX", Model.D1.PTSDDX, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.PTSDDX", Model.D1.PTSDDX, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.PTSDDXIF\"]" })
@@ -1584,7 +1583,7 @@ - + @@ -1597,7 +1596,7 @@
- @Html.CheckBox("D1.OTHPSY", Model.D1.OTHPSY, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.OTHPSY", Model.D1.OTHPSY, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.OTHPSYIF\" , \"D1.OTHPSYX\"]" })
@@ -1609,7 +1608,7 @@ - + @@ -1634,7 +1633,7 @@
- @Html.CheckBox("D1.ALCDEM", Model.D1.ALCDEM, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.ALCDEM", Model.D1.ALCDEM, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.ALCDEMIF\" , \"D1.ALCABUSE\"]" })
@@ -1646,7 +1645,7 @@ - + @@ -1671,7 +1670,7 @@
- @Html.CheckBox("D1.IMPSUB", Model.D1.IMPSUB, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.IMPSUB", Model.D1.IMPSUB, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.IMPSUBIF\"]" })
@@ -1683,7 +1682,7 @@ - + @@ -1696,7 +1695,7 @@
- @Html.CheckBox("D1.DYSILL", Model.D1.DYSILL, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.DYSILL", Model.D1.DYSILL, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.DYSILLIF\"]" })
@@ -1708,7 +1707,7 @@ - + @@ -1721,7 +1720,7 @@
- @Html.CheckBox("D1.MEDS", Model.D1.MEDS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.MEDS", Model.D1.MEDS, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.MEDSIF\"]" })
@@ -1733,7 +1732,7 @@ - + @@ -1746,7 +1745,7 @@
- @Html.CheckBox("D1.COGOTH", Model.D1.COGOTH, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.COGOTH", Model.D1.COGOTH, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.COGOTHIF\", \"D1.COGOTHX\"]" })
@@ -1758,7 +1757,7 @@ - + @@ -1785,7 +1784,7 @@
- @Html.CheckBox("D1.COGOTH2", Model.D1.COGOTH2, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.COGOTH2", Model.D1.COGOTH2, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.COGOTH2F\", \"D1.COGOTH2X\"]" })
@@ -1797,7 +1796,7 @@ - + @@ -1824,7 +1823,7 @@
- @Html.CheckBox("D1.COGOTH3", Model.D1.COGOTH3, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" }) + @Html.CheckBox("D1.COGOTH3", Model.D1.COGOTH3, new { @class = "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", data_affects = "true", data_affects_toggle_targets = "[ \"D1.COGOTH3F\", \"D1.COGOTH3X\"]" })
@@ -1836,7 +1835,7 @@ - + diff --git a/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml.cs b/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml.cs index 3052f44f..8d494205 100644 --- a/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml.cs +++ b/src/UDS.Net.Forms/Pages/UDS3/D1.cshtml.cs @@ -25,19 +25,100 @@ public class D1Model : FormPageModel new RadioListItem("Other (e.g., two or more clinicians or other informal group", "3") }; - public Dictionary NORMCOGBehavior = new Dictionary + public Dictionary NORMCOGUIBehavior = new Dictionary { { "0", new UIBehavior { PropertyAttributes = new List { - new UIEnableAttribute("A1.DEMENTED") + new UIEnableAttribute("D1.DEMENTED"), + new UIEnableAttribute("D1.AMNDEM"), + new UIEnableAttribute("D1.PCA"), + new UIEnableAttribute("D1.PPASYN"), + new UIEnableAttribute("D1.FTDSYN"), + new UIEnableAttribute("D1.LBDSYN"), + new UIEnableAttribute("D1.NAMNDEM"), + new UIEnableAttribute("D1.MCIAMEM"), + new UIEnableAttribute("D1.MCIAPLUS"), + new UIEnableAttribute("D1.MCIAPLAN"), + new UIEnableAttribute("D1.MCIAPATT"), + new UIEnableAttribute("D1.MCIAPEX"), + new UIEnableAttribute("D1.MCIAPVIS"), + new UIEnableAttribute("D1.MCINON1"), + new UIEnableAttribute("D1.MCIN1LAN"), + new UIEnableAttribute("D1.MCIN1ATT"), + new UIEnableAttribute("D1.MCIN1EX"), + new UIEnableAttribute("D1.MCIN1VIS"), + new UIEnableAttribute("D1.MCINON2"), + new UIEnableAttribute("D1.MCIN2LAN"), + new UIEnableAttribute("D1.MCIN2ATT"), + new UIEnableAttribute("D1.MCIN2EX"), + new UIEnableAttribute("D1.MCIN2VIS"), + new UIEnableAttribute("D1.IMPNOMCI") + }, InstructionalMessage = "Continue to question 3" } }, { "1", new UIBehavior { PropertyAttributes = new List { - new UIDisableAttribute("A1.HISPORX") + new UIDisableAttribute("D1.DEMENTED"), + new UIDisableAttribute("D1.AMNDEM"), + new UIDisableAttribute("D1.PCA"), + new UIDisableAttribute("D1.PPASYN"), + new UIDisableAttribute("D1.FTDSYN"), + new UIDisableAttribute("D1.LBDSYN"), + new UIDisableAttribute("D1.NAMNDEM"), + new UIDisableAttribute("D1.LBDSYN"), + new UIDisableAttribute("D1.NAMNDEM"), + new UIDisableAttribute("D1.MCIAMEM"), + new UIDisableAttribute("D1.MCIAPLUS"), + new UIDisableAttribute("D1.MCIAPLAN"), + new UIDisableAttribute("D1.MCIAPATT"), + new UIDisableAttribute("D1.MCIAPEX"), + new UIDisableAttribute("D1.MCIAPVIS"), + new UIDisableAttribute("D1.MCINON1"), + new UIDisableAttribute("D1.MCIN1LAN"), + new UIDisableAttribute("D1.MCIN1ATT"), + new UIDisableAttribute("D1.MCIN1EX"), + new UIDisableAttribute("D1.MCIN1VIS"), + new UIDisableAttribute("D1.MCINON2"), + new UIDisableAttribute("D1.MCIN2LAN"), + new UIDisableAttribute("D1.MCIN2ATT"), + new UIDisableAttribute("D1.MCIN2EX"), + new UIDisableAttribute("D1.MCIN2VIS"), + new UIDisableAttribute("D1.IMPNOMCI"), + new UIDisableAttribute("D1.ALZDISIF"), + new UIDisableAttribute("D1.LBDIF"), + new UIDisableAttribute("D1.MSAIF"), + new UIDisableAttribute("D1.PSPIF"), + new UIDisableAttribute("D1.CORTIF"), + new UIDisableAttribute("D1.FTLDMOIF"), + new UIDisableAttribute("D1.FTLDNOIF"), + new UIDisableAttribute("D1.CVDIF"), + new UIDisableAttribute("D1.ESSTREIF"), + new UIDisableAttribute("D1.DOWNSIF"), + new UIDisableAttribute("D1.HUNTIF"), + new UIDisableAttribute("D1.PRIONIF"), + new UIDisableAttribute("D1.BRNINJIF"), + new UIDisableAttribute("D1.HYCEPHIF"), + new UIDisableAttribute("D1.EPILEPIF"), + new UIDisableAttribute("D1.NEOPIF"), + new UIDisableAttribute("D1.HIVIF"), + new UIDisableAttribute("D1.OTHCOGIF"), + new UIDisableAttribute("D1.DEPIF"), + new UIDisableAttribute("D1.BIPOLDIF"), + new UIDisableAttribute("D1.SCHIZOIF"), + new UIDisableAttribute("D1.ANXIETIF"), + new UIDisableAttribute("D1.DELIRIF"), + new UIDisableAttribute("D1.PTSDDXIF"), + new UIDisableAttribute("D1.OTHPSYIF"), + new UIDisableAttribute("D1.ALCDEMIF"), + new UIDisableAttribute("D1.IMPSUBIF"), + new UIDisableAttribute("D1.DYSILLIF"), + new UIDisableAttribute("D1.MEDSIF"), + new UIDisableAttribute("D1.COGOTHIF"), + new UIDisableAttribute("D1.COGOTH2F"), + new UIDisableAttribute("D1.COGOTH3F") }, InstructionalMessage = "Skip to question 6" } }, @@ -51,9 +132,16 @@ public class D1Model : FormPageModel new UIDisableAttribute("D1.AMNDEM"), new UIDisableAttribute("D1.PCA"), new UIDisableAttribute("D1.PPASYN"), + new UIDisableAttribute("D1.PPASYNT"), new UIDisableAttribute("D1.FTDSYN"), new UIDisableAttribute("D1.LBDSYN"), - new UIDisableAttribute("D1.NAMNDEM") + new UIDisableAttribute("D1.NAMNDEM"), + new UIEnableAttribute("D1.MCIAMEM"), + new UIEnableAttribute("D1.MCIAPLUS"), + new UIEnableAttribute("D1.MCINON1"), + new UIEnableAttribute("D1.MCINON2"), + new UIEnableAttribute("D1.IMPNOMCI"), + }, InstructionalMessage = "Skip to question 5" } }, @@ -65,9 +153,26 @@ public class D1Model : FormPageModel new UIEnableAttribute("D1.PPASYN"), new UIEnableAttribute("D1.FTDSYN"), new UIEnableAttribute("D1.LBDSYN"), - new UIEnableAttribute("D1.NAMNDEM") + new UIEnableAttribute("D1.NAMNDEM"), + new UIDisableAttribute("D1.MCIAMEM"), + new UIDisableAttribute("D1.MCIAPLUS"), + new UIDisableAttribute("D1.MCIAPLAN"), + new UIDisableAttribute("D1.MCIAPATT"), + new UIDisableAttribute("D1.MCIAPEX"), + new UIDisableAttribute("D1.MCIAPVIS"), + new UIDisableAttribute("D1.MCINON1"), + new UIDisableAttribute("D1.MCIN1LAN"), + new UIDisableAttribute("D1.MCIN1ATT"), + new UIDisableAttribute("D1.MCIN1EX"), + new UIDisableAttribute("D1.MCIN1VIS"), + new UIDisableAttribute("D1.MCINON2"), + new UIDisableAttribute("D1.MCIN2LAN"), + new UIDisableAttribute("D1.MCIN2ATT"), + new UIDisableAttribute("D1.MCIN2EX"), + new UIDisableAttribute("D1.MCIN2VIS"), + new UIDisableAttribute("D1.IMPNOMCI"), }, - InstructionalMessage = "Continue to question 4" + InstructionalMessage = "Continue to question 4a-4f and then SKIP TO QUESTION 6" } }, }; @@ -93,6 +198,56 @@ public class D1Model : FormPageModel new RadioListItem("Yes", "1") }; + public List NORMCOGListItems { get; set; } = new List + { + new RadioListItem("No (CONTINUE TO QUESTION 3)", "0"), + new RadioListItem("Yes (SKIP TO QUESTION 6)", "1") + }; + + public List DEMENTEDListItems { get; set; } = new List + { + new RadioListItem("No (SKIP TO QUESTION 5)", "0"), + new RadioListItem("Yes (CONTINUE TO QUESTION 4)", "1") + }; + + public List PREVSTKListItems { get; set; } = new List + { + new RadioListItem("No (SKIP TO QUESTION 15c)", "0"), + new RadioListItem("Yes", "1") + }; + public Dictionary PREVSTKUIBehavior = new Dictionary + { + { "0", new UIBehavior { + PropertyAttributes = new List + { + new UIDisableAttribute("D1.STROKDEC"), + new UIDisableAttribute("D1.STKIMAG"), + }, + InstructionalMessage ="If Question 15b PREVSTK = 0 (N0), then skip to question 15c" + } }, + + { "1", new UIBehavior { + PropertyAttributes = new List + { + new UIEnableAttribute("D1.STROKDEC"), + new UIEnableAttribute("D1.STKIMAG"), + } + } } + }; + + public Dictionary OTHBIOMUIBehavior = new Dictionary + { + { "0", new UIBehavior { PropertyAttribute = new UIDisableAttribute("D1.OTHBIOMX") } }, + { "1", new UIBehavior { PropertyAttribute = new UIEnableAttribute("D1.OTHBIOMX") } }, + + }; + public Dictionary OTHMUTUIBehavior = new Dictionary + { + { "0", new UIBehavior { PropertyAttribute = new UIDisableAttribute("D1.OTHMUTX") } }, + { "1", new UIBehavior { PropertyAttribute = new UIEnableAttribute("D1.OTHMUTX") } }, + { "9", new UIBehavior { PropertyAttribute = new UIDisableAttribute("D1.OTHMUTX") } }, + + }; public List FindingsListItems { get; set; } = new List { new RadioListItem("No", "0"), @@ -129,6 +284,15 @@ public class D1Model : FormPageModel new RadioListItem("Unknown", "9") }; + public Dictionary FTLDSUBTUIBehavior = new Dictionary + { + { "1", new UIBehavior { PropertyAttribute = new UIDisableAttribute("D1.FTLDSUBX") } }, + { "2", new UIBehavior { PropertyAttribute = new UIDisableAttribute("D1.FTLDSUBX") } }, + { "3", new UIBehavior { PropertyAttribute = new UIEnableAttribute("D1.FTLDSUBX") } }, + { "9", new UIBehavior { PropertyAttribute = new UIDisableAttribute("D1.FTLDSUBX") } }, + + }; + public List ImagingListItems { get; set; } = new List { new RadioListItem("No", "0"), diff --git a/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js b/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js new file mode 100644 index 00000000..d5d30b7e --- /dev/null +++ b/src/UDS.Net.Forms/wwwroot/js/js_controllers/fancycheckboxes_controller.js @@ -0,0 +1,21 @@ +import { Controller } from '@hotwired/stimulus'; + +export default class extends Controller { + static targets = ['checkbox'] + + connect() { + this.checkboxTargets.forEach((checkbox) => { + checkbox.addEventListener('click', () => this.checkboxChange(checkbox)) + }) + } + + checkboxChange(selectedCheckbox) { + this.checkboxTargets.forEach((checkbox) => { + if (checkbox !== selectedCheckbox) { + checkbox.checked = false; + checkbox.dispatchEvent(new Event('change')) + } + }) + + } +} \ No newline at end of file diff --git a/src/UDS.Net.Forms/wwwroot/js/stimulus_controllers.js b/src/UDS.Net.Forms/wwwroot/js/stimulus_controllers.js index 31872bd8..a967e33b 100644 --- a/src/UDS.Net.Forms/wwwroot/js/stimulus_controllers.js +++ b/src/UDS.Net.Forms/wwwroot/js/stimulus_controllers.js @@ -2,9 +2,11 @@ import { Application } from "@hotwired/stimulus" /* Import custom stimulus controllers */ import Dropdown from "./js_controllers/dropdown_controller.js" import MobileMenu from "./js_controllers/mobilemenu_controller.js" +import FancyCheckboxes from "./js_controllers/fancycheckboxes_controller.js" window.Stimulus = Application.start() /* Register custom stimulus controllers*/ Stimulus.register("dropdown", Dropdown) Stimulus.register("mobilemenu", MobileMenu) +Stimulus.register("fancycheckboxes", FancyCheckboxes)