Skip to content

Commit 8a5210e

Browse files
authored
Fixes for non-HPV vaccinations
Two changes: generate-cohort age range has been increase so children can accept non-HPV vaccinations nurse-journey token regex changed to work with hyphenated sessions (EG session-8). Only affected non-HPV vaccinations
1 parent fc5bef6 commit 8a5210e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

performance-tests/E2E/generate-cohort.jmx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def PARENT_2_PHONE = []
5757
def PARENT_2_RELATIONSHIP = []
5858
def CHILD_SCHOOL_URN =[]
5959

60-
def startDate = Date.parse('yyyy-MM-dd','2011-09-01')
60+
def startDate = Date.parse('yyyy-MM-dd','2008-09-01')
6161
def endDate = Date.parse('yyyy-MM-dd','2012-08-31')
6262
def newNHSNumbers = []
6363

@@ -88,7 +88,7 @@ try {
8888
PARENT_2_PHONE.add(lineSplit[15])
8989
PARENT_2_RELATIONSHIP.add(lineSplit[16])
9090
CHILD_SCHOOL_URN.add(lineSplit[17])
91-
91+
9292
line = reader.readLine();
9393
}
9494

@@ -114,7 +114,7 @@ for(outrow=1;outrow<=rowcount;outrow++){
114114
vars.put("CHILD_DATE_OF_BIRTH",(startDate + r.nextInt(endDate-startDate)).format('yyyy-MM-dd'))
115115
vars.put("CHILD_FIRST_NAME",CHILD_FIRST_NAME.get(r.nextInt(CHILD_FIRST_NAME.size())))
116116
vars.put("CHILD_LAST_NAME",CHILD_LAST_NAME.get(r.nextInt(CHILD_LAST_NAME.size())))
117-
117+
118118
checkdigit="10"
119119
while(checkdigit=="10"){
120120
nhsnumber=(r.nextInt(999999) + 999000000).toString()
@@ -132,7 +132,7 @@ for(outrow=1;outrow<=rowcount;outrow++){
132132
//Add the unique nhs number to the array
133133
newNHSNumbers.add(nhsnumber)
134134
vars.put("CHILD_NHS_NUMBER",nhsnumber)
135-
135+
136136
vars.put("PARENT_1_NAME",PARENT_1_NAME.get(r.nextInt(PARENT_1_NAME.size())).tokenize(' ').first() + " " + vars.get("CHILD_LAST_NAME"))
137137
vars.put("PARENT_2_NAME",PARENT_2_NAME.get(r.nextInt(PARENT_2_NAME.size())).tokenize(' ').first() + " " + vars.get("CHILD_LAST_NAME"))
138138
vars.put("PARENT_1_EMAIL",vars.get("PARENT_1_NAME").replaceAll(' ','.') + "@example.com")
@@ -141,12 +141,12 @@ for(outrow=1;outrow<=rowcount;outrow++){
141141
vars.put("PARENT_2_PHONE",PARENT_2_PHONE.get(r.nextInt(PARENT_2_PHONE.size())))
142142
vars.put("PARENT_1_RELATIONSHIP",PARENT_1_RELATIONSHIP.get(r.nextInt(PARENT_1_RELATIONSHIP.size())))
143143
vars.put("PARENT_2_RELATIONSHIP",PARENT_2_RELATIONSHIP.get(r.nextInt(PARENT_2_RELATIONSHIP.size())))
144-
144+
145145
vars.put("CHILD_SCHOOL_URN",vars.get("URN"))
146-
146+
147147
rowPartOne=(vars.get("CHILD_ADDRESS_LINE_1") + "," + vars.get("CHILD_ADDRESS_LINE_2") + "," + vars.get("CHILD_POSTCODE") + "," + vars.get("CHILD_TOWN") + "," + vars.get("CHILD_PREFERRED_GIVEN_NAME") + "," + vars.get("CHILD_DATE_OF_BIRTH") + "," + vars.get("CHILD_FIRST_NAME") + "," + vars.get("CHILD_LAST_NAME") + "," + vars.get("CHILD_NHS_NUMBER") + ",")
148148
rowPartTwo=(vars.get("PARENT_1_EMAIL") + "," + vars.get("PARENT_1_NAME") + "," + vars.get("PARENT_1_PHONE") + "," + vars.get("PARENT_1_RELATIONSHIP") + "," + vars.get("PARENT_2_EMAIL") + "," + vars.get("PARENT_2_NAME") + "," + vars.get("PARENT_2_PHONE") + "," + vars.get("PARENT_2_RELATIONSHIP") + "," + vars.get("CHILD_SCHOOL_URN"))
149-
149+
150150
writer.println(rowPartOne + rowPartTwo)
151151
// log.info(vars.get("CHILD_FIRST_NAME") + "," + vars.get("CHILD_LAST_NAME"))
152152
}

performance-tests/E2E/nurse-journey.jmx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ vars.put("SessionId", cohortCodes.get(vars.get("CHILD_SCHOOL_URN&
12941294
<stringProp name="script">SampleResult.setIgnore()
12951295
if(vars.get(&quot;BatchId&quot;)==&quot;BatchId_NotFound&quot;){
12961296
log.error(&quot;No batch found&quot;)
1297-
1297+
12981298
}
12991299
</stringProp>
13001300
</JSR223Sampler>
@@ -3005,7 +3005,7 @@ vars.put(&quot;ParentPhone&quot;,vars.get(&quot;ExistingContact_g4&quot;));</str
30053005
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Authenticity_Token Regular Expression Extractor" enabled="true">
30063006
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
30073007
<stringProp name="RegexExtractor.refname">Authenticity_Token</stringProp>
3008-
<stringProp name="RegexExtractor.regex">&lt;form action=&quot;/sessions/\w+/patients/\d+/\w+/triages&quot; accept-charset=&quot;UTF-8&quot; method=&quot;post&quot;&gt;&lt;input type=&quot;hidden&quot; name=&quot;authenticity_token&quot; value=&quot;(.+?)&quot; autocomplete=&quot;off&quot; /&gt;</stringProp>
3008+
<stringProp name="RegexExtractor.regex">&lt;form action=&quot;\/sessions\/.*?\/patients\/\d+\/.*?\/triages&quot; accept-charset=&quot;UTF-8&quot; method=&quot;post&quot;&gt;&lt;input type=&quot;hidden&quot; name=&quot;authenticity_token&quot; value=&quot;(.+?)&quot; autocomplete=&quot;off&quot; \/&gt;</stringProp>
30093009
<stringProp name="RegexExtractor.template">$1$</stringProp>
30103010
<stringProp name="RegexExtractor.default">Authenticity_Token_NotFoundfromhere</stringProp>
30113011
<boolProp name="RegexExtractor.default_empty_value">false</boolProp>
@@ -3276,7 +3276,7 @@ vars.put(&quot;ParentPhone&quot;,vars.get(&quot;ExistingContact_g4&quot;));</str
32763276
<stringProp name="script">SampleResult.setIgnore()
32773277
if(vars.get(&quot;BatchId&quot;)==&quot;BatchId_NotFound&quot;){
32783278
log.error(&quot;No batch found&quot;)
3279-
3279+
32803280
}
32813281
</stringProp>
32823282
</JSR223Sampler>
@@ -3449,7 +3449,7 @@ if(vars.get(&quot;BatchId&quot;)==&quot;BatchId_NotFound&quot;){
34493449
<stringProp name="script">SampleResult.setIgnore()
34503450
if(vars.get(&quot;BatchId&quot;)==&quot;BatchId_NotFound&quot;){
34513451
log.error(&quot;No batch found&quot;)
3452-
3452+
34533453
}
34543454
</stringProp>
34553455
</JSR223Sampler>

0 commit comments

Comments
 (0)