|
218 | 218 | <xsl:variable name="theScenarioParamsMedMij" select="concat('?', $theParamParts, $theAdditionalParamParts)"/> |
219 | 219 |
|
220 | 220 | <xsl:variable name="returnCount" select="count($adaInstance/medicamenteuze_behandeling/*[not(self::identificatie)])"/> |
221 | | - <xsl:variable name="returnMedicationCount" select="count($adaInstance/bouwstenen/farmaceutisch_product)"/> |
222 | | - <xsl:variable name="returnEntryCount" select="$returnCount + $returnMedicationCount"/> |
| 221 | + <!-- Select ADA Medication entries --> |
| 222 | + <xsl:variable name="medicationValues" as="xs:string*" |
| 223 | + select="$adaInstance/medicamenteuze_behandeling//farmaceutisch_product/@value"/> |
| 224 | + <xsl:variable name="medicationValuesDistinct" as="xs:string*" select="distinct-values($medicationValues)"/> |
| 225 | + <xsl:variable name="expectedMedCount" select="count($medicationValuesDistinct)"/> |
| 226 | + <xsl:variable name="returnEntryCount" select="$returnCount + $expectedMedCount"/> |
223 | 227 | <xsl:variable name="returnEntryBreakdown"> |
224 | 228 | <xsl:choose> |
225 | 229 | <xsl:when test="$returnEntryCount gt 0"> |
226 | | - <xsl:value-of select="concat('(Consists of ', $returnCount, ' ', $matchResource, ' and ', $returnMedicationCount, ' Medication resources.)')"/> |
| 230 | + <xsl:value-of select="concat('(Consists of ', $returnCount, ' ', $matchResource, ' and ', $expectedMedCount, ' Medication resources.)')"/> |
227 | 231 | </xsl:when> |
228 | 232 | <xsl:otherwise> |
229 | 233 | <xsl:text>(Consists of no resources.)</xsl:text> |
|
269 | 273 | <name value="Scenario {$scenarioset}.{$scenario}"/> |
270 | 274 | <description value="{$description}"/> |
271 | 275 | <xsl:choose> |
272 | | - <xsl:when test="$transactionTypeNormalized = 'retrieve'"> |
273 | | - <!-- Select ADA primary building-block entries --> |
274 | | - <xsl:variable name="adaBouwstenen" |
275 | | - select="$adaInstance/medicamenteuze_behandeling/*[not(self::identificatie)]"/> |
276 | | - |
277 | | - <!-- Select ADA Medication entries --> |
278 | | - <xsl:variable name="medicationValues" as="xs:string*" |
279 | | - select="$adaInstance/medicamenteuze_behandeling//farmaceutisch_product/@value"/> |
280 | | - <xsl:variable name="medicationValuesDistinct" as="xs:string*" |
281 | | - select="distinct-values($medicationValues)"/> |
282 | | - |
283 | | - <!-- Aantal unieke medicamenten --> |
284 | | - <xsl:variable name="expectedMedCount" select="count($medicationValuesDistinct)"/> |
285 | | - |
286 | | - <!-- Build filtered identifier sets and expected counts --> |
287 | | - <xsl:variable name="identifiers" as="xs:string*" select="$adaBouwstenen/identificatie/@value"/> |
288 | | - <xsl:variable name="expectedCount" select="count($identifiers)"/> |
| 276 | + <xsl:when test="$transactionTypeNormalized = 'retrieve'"> |
| 277 | + <!-- Build filtered identifier sets and expected counts --> |
289 | 278 | <nts:include value="test.client.search" scope="common" nts:in-targets="#default"> |
290 | 279 | <nts:with-parameter name="description" value="Test client to retrieve {$matchResource} resource(s) representing MP9 building block {$buildingBlockLong}"/> |
291 | 280 | <nts:with-parameter name="resource" value="{$matchResource}"/> |
|
299 | 288 | <nts:include value="canary-assert.response.successfulSearch" scope="common"/> |
300 | 289 | <nts:include value="assert-returnCount" scope="project"> |
301 | 290 | <nts:with-parameter name="resource" value="{$matchResource}"/> |
302 | | - <nts:with-parameter name="count" value="{$expectedCount}"/> |
| 291 | + <nts:with-parameter name="count" value="{$returnCount}"/> |
303 | 292 | </nts:include> |
304 | 293 | <!-- Assert Medication count --> |
305 | 294 | <nts:include value="assert-returnCount" scope="project"> |
306 | 295 | <nts:with-parameter name="resource" value="Medication"/> |
307 | 296 | <nts:with-parameter name="count" value="{$expectedMedCount}"/> |
308 | 297 | </nts:include> |
309 | 298 | </xsl:when> |
310 | | - <xsl:when test="$transactionTypeNormalized = 'serve'"> |
311 | | - <!-- Select ADA primary building-block entries --> |
312 | | - <xsl:variable name="adaBouwstenen" |
313 | | - select="$adaInstance/medicamenteuze_behandeling/*[not(self::identificatie)]"/> |
314 | | - |
315 | | - <!-- Select ADA Medication entries --> |
316 | | - <xsl:variable name="medicationValues" as="xs:string*" |
317 | | - select="$adaInstance/medicamenteuze_behandeling//farmaceutisch_product/@value"/> |
318 | | - <xsl:variable name="medicationValuesDistinct" as="xs:string*" |
319 | | - select="distinct-values($medicationValues)"/> |
320 | | - |
321 | | - <!-- Aantal unieke medicamenten --> |
322 | | - <xsl:variable name="expectedMedCount" select="count($medicationValuesDistinct)"/> |
323 | | - |
324 | | - |
325 | | - <!-- Build filtered identifier sets and expected counts --> |
326 | | - <xsl:variable name="identifiers" as="xs:string*" select="$adaBouwstenen/identificatie/@value"/> |
327 | | - <xsl:variable name="expectedCount" select="count($identifiers)"/> |
| 299 | + <xsl:when test="$transactionTypeNormalized = 'serve'"> |
328 | 300 | <!--NICTIZ-29763 removed CheckContent from target so no content asserts scripts will be generated |
329 | 301 | <nts:include value="test.server.search" scope="common" nts:in-targets="#default CheckContent">--> |
330 | 302 | <nts:include value="test.server.search" scope="common" nts:in-targets="#default"> |
|
341 | 313 | <nts:include value="assert-responseBundleContent-noMM"/> |
342 | 314 | <nts:include value="assert-returnCountAtLeast" scope="project"> |
343 | 315 | <nts:with-parameter name="resource" value="{$matchResource}"/> |
344 | | - <nts:with-parameter name="count" value="{$expectedCount}"/> |
| 316 | + <nts:with-parameter name="count" value="{$returnCount}"/> |
345 | 317 | </nts:include> |
346 | 318 | <!-- Assert Medication count --> |
347 | 319 | <nts:include value="assert-returnCount" scope="project"> |
|
473 | 445 |
|
474 | 446 | <xsl:variable name="description" as="xs:string?" select="$adaInstance/@desc"/> |
475 | 447 | <xsl:variable name="returnCount" select="count($adaInstance/medicamenteuze_behandeling/*[not(self::identificatie)])"/> |
476 | | - <!-- We add the medication products, since those are in an include in the query --> |
477 | | - <xsl:variable name="returnEntryCount" select="$returnCount + count($adaInstance/bouwstenen/farmaceutisch_product)"/> |
| 448 | + <!-- Select ADA Medication entries --> |
| 449 | + <xsl:variable name="medicationValues" as="xs:string*" |
| 450 | + select="$adaInstance/medicamenteuze_behandeling//farmaceutisch_product/@value"/> |
| 451 | + <xsl:variable name="medicationValuesDistinct" as="xs:string*" select="distinct-values($medicationValues)"/> |
| 452 | + <xsl:variable name="expectedMedCount" select="count($medicationValuesDistinct)"/> |
| 453 | + <xsl:variable name="returnEntryCount" select="$returnCount + $expectedMedCount"/> |
478 | 454 | <xsl:variable name="returnEntryBreakdown"> |
479 | 455 | <xsl:choose> |
480 | 456 | <xsl:when test="$returnEntryCount gt 0"> |
481 | | - <xsl:value-of select="concat('(Consists of ', $returnCount, ' ', $matchResource, ' and ', count($adaInstance/bouwstenen/farmaceutisch_product), ' Medication resources.)')"/> |
| 457 | + <xsl:value-of select="concat('(Consists of ', $returnCount, ' ', $matchResource, ' and ', $expectedMedCount, ' Medication resources.)')"/> |
482 | 458 | </xsl:when> |
483 | 459 | <xsl:otherwise> |
484 | 460 | <xsl:text>(Consists of no resources.)</xsl:text> |
|
521 | 497 | <name value="Scenario {$theScenario}"/> |
522 | 498 | <description value="{$description}"/> |
523 | 499 | <xsl:choose> |
524 | | - <xsl:when test="$transactionTypeNormalized = 'retrieve'"> |
525 | | - <!-- Select ADA primary building-block entries --> |
526 | | - <xsl:variable name="adaBouwstenen" |
527 | | - select="$adaInstance/medicamenteuze_behandeling/*[not(self::identificatie)]"/> |
528 | | - |
529 | | - <!-- Select ADA Medication entries --> |
530 | | - <xsl:variable name="medicationValues" as="xs:string*" |
531 | | - select="$adaInstance/medicamenteuze_behandeling//farmaceutisch_product/@value"/> |
532 | | - <xsl:variable name="medicationValuesDistinct" as="xs:string*" |
533 | | - select="distinct-values($medicationValues)"/> |
534 | | - |
535 | | - <!-- Aantal unieke medicamenten --> |
536 | | - <xsl:variable name="expectedMedCount" select="count($medicationValuesDistinct)"/> |
537 | | - |
538 | | - <!-- Build filtered identifier sets and expected counts --> |
539 | | - <xsl:variable name="identifiers" as="xs:string*" select="$adaBouwstenen/identificatie/@value"/> |
540 | | - <xsl:variable name="expectedCount" select="count($identifiers)"/> |
| 500 | + <xsl:when test="$transactionTypeNormalized = 'retrieve'"> |
541 | 501 | <nts:include value="test.client.search" scope="common" nts:in-targets="#default"> |
542 | 502 | <nts:with-parameter name="description" value="Test client to retrieve {$matchResource} resource(s) representing MP9 building block {$buildingBlockLong}"/> |
543 | 503 | <nts:with-parameter name="resource" value="{$matchResource}"/> |
|
560 | 520 | <nts:with-parameter name="count" value="{$expectedMedCount}"/> |
561 | 521 | </nts:include> |
562 | 522 | </xsl:when> |
563 | | - <xsl:when test="$transactionTypeNormalized = 'serve'"> |
564 | | - <!-- Select ADA primary building-block entries --> |
565 | | - <xsl:variable name="adaBouwstenen" |
566 | | - select="$adaInstance/medicamenteuze_behandeling/*[not(self::identificatie)]"/> |
567 | | - |
568 | | - <!-- Select ADA Medication entries --> |
569 | | - <xsl:variable name="medicationValues" as="xs:string*" |
570 | | - select="$adaInstance/medicamenteuze_behandeling//farmaceutisch_product/@value"/> |
571 | | - <xsl:variable name="medicationValuesDistinct" as="xs:string*" |
572 | | - select="distinct-values($medicationValues)"/> |
573 | | - |
574 | | - <!-- Aantal unieke medicamenten --> |
575 | | - <xsl:variable name="expectedMedCount" select="count($medicationValuesDistinct)"/> |
576 | | - |
577 | | - |
578 | | - <!-- Build filtered identifier sets and expected counts --> |
579 | | - <xsl:variable name="identifiers" as="xs:string*" select="$adaBouwstenen/identificatie/@value"/> |
580 | | - <xsl:variable name="expectedCount" select="count($identifiers)"/> |
581 | | - |
| 523 | + <xsl:when test="$transactionTypeNormalized = 'serve'"> |
582 | 524 | <!--NICTIZ-29763 removed CheckContent from target so no content asserts scripts will be generated |
583 | 525 | <nts:include value="test.server.search" scope="common" nts:in-targets="#default CheckContent">--> |
584 | 526 | <nts:include value="test.server.search" scope="common" nts:in-targets="#default"> |
|
0 commit comments