From 75b80335ed4b502a0bb7b22049e3be49652bee6f Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 6 Apr 2022 12:53:53 +0300 Subject: [PATCH] Added prepopulations for pop type and ever tested for hts initial from hts eligibility screening --- .../htmlforms/hts/htsInitialTest.html | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/omod/src/main/webapp/resources/htmlforms/hts/htsInitialTest.html b/omod/src/main/webapp/resources/htmlforms/hts/htsInitialTest.html index 3a42bf4bb1..33f86d0927 100644 --- a/omod/src/main/webapp/resources/htmlforms/hts/htsInitialTest.html +++ b/omod/src/main/webapp/resources/htmlforms/hts/htsInitialTest.html @@ -561,6 +561,34 @@ jq("#hts-entry-point option[value='160522']").hide(); //ER jq("#hts-entry-point option[value='5622']").hide(); //O + //Prepopulated fields from the HTS eligibility forms + var prev_populationType = ""; + var prev_keyPopulationType = ""; + var prev_EverTested = ""; + + var PREVIOUS_POPULATION_TYPE = prev_populationType.replace(/[^\d]/g, ''); + var PREVIOUS_KEY_POPULATION_TYPE = prev_keyPopulationType.replace(/[^\d]/g, ''); + var EVER_TESTED = prev_EverTested.replace(/[^\d]/g, ''); + + if (PREVIOUS_POPULATION_TYPE == 164929) { + jq("#population-type input[value=164929]").prop("checked", true); + jq('#key-population').show(); + } + if (PREVIOUS_POPULATION_TYPE == 164928) { + jq("#population-type input[value=164928]").prop("checked", true); + jq('#key-population').hide(); + } + if (PREVIOUS_POPULATION_TYPE == 138643) { + jq("#population-type input[value=164928]").prop("checked", true); + jq('#key-population').hide(); + } + if (PREVIOUS_KEY_POPULATION_TYPE != "" || PREVIOUS_KEY_POPULATION_TYPE != null) { + jq("#key-population input[type=checkbox][value="+PREVIOUS_KEY_POPULATION_TYPE+"]").prop("checked",true); + } + if (EVER_TESTED == 1065) { + jq("#ever-tested input[value=1065]").prop("checked", true); + } + if(IS_KDoD_SITE==false) { jq('#dodOnly').hide();