From 9b9e1fe64d9fead83cdd1429e2530a0fcf999628 Mon Sep 17 00:00:00 2001 From: Pavel R Date: Tue, 12 Mar 2024 19:37:27 +0100 Subject: [PATCH 1/3] Remove summary items grouping and sorting. Ref: https://github.com/hl7au/au-fhir-core-inferno/issues/4 --- .../generated/v0.3.0/summary.md | 1909 +++++++++++------ .../generator/mdsummary_generator.rb | 53 +- .../generator/templates/summary.md.erb | 14 +- 3 files changed, 1221 insertions(+), 755 deletions(-) diff --git a/lib/au_core_test_kit/generated/v0.3.0/summary.md b/lib/au_core_test_kit/generated/v0.3.0/summary.md index 3dc5856e..89453700 100644 --- a/lib/au_core_test_kit/generated/v0.3.0/summary.md +++ b/lib/au_core_test_kit/generated/v0.3.0/summary.md @@ -1,12 +1,8 @@ -# Capabilities by Resource/Profile +# 1 AU Core FHIR API -# 1 Patient +# 1.1 Patient -## Profiles - - -### [Patient ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-patient) #### Background The AU Core Patient sequence verifies that the system under test is @@ -64,8 +60,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -77,7 +71,7 @@ read succeeds. ## Test scenarios -### 1.1 Search: _id (SHALL) +### 1.1.1 Search: _id (SHALL) **HTTP GET** @@ -94,7 +88,7 @@ Accept: application/fhir+json {test endpoint}/Patient?_id={_id} ``` -### 1.2 Search: family (SHOULD) +### 1.1.2 Search: family (SHOULD) **HTTP GET** @@ -111,7 +105,7 @@ Accept: application/fhir+json {test endpoint}/Patient?family={family} ``` -### 1.3 Search: identifier (SHALL) +### 1.1.3 Search: identifier (SHALL) **HTTP GET** @@ -128,7 +122,7 @@ Accept: application/fhir+json {test endpoint}/Patient?identifier={identifier} ``` -### 1.4 Search: name (SHOULD) +### 1.1.4 Search: name (SHOULD) **HTTP GET** @@ -145,7 +139,7 @@ Accept: application/fhir+json {test endpoint}/Patient?name={name} ``` -### 1.5 Search: birthdate+family (SHOULD) +### 1.1.5 Search: birthdate+family (SHOULD) **HTTP GET** @@ -162,7 +156,7 @@ Accept: application/fhir+json {test endpoint}/Patient?birthdate={birthdate}&family={family} ``` -### 1.6 Search: birthdate+name (SHOULD) +### 1.1.6 Search: birthdate+name (SHOULD) **HTTP GET** @@ -179,7 +173,7 @@ Accept: application/fhir+json {test endpoint}/Patient?birthdate={birthdate}&name={name} ``` -### 1.7 Search: family+gender (SHOULD) +### 1.1.7 Search: family+gender (SHOULD) **HTTP GET** @@ -196,7 +190,7 @@ Accept: application/fhir+json {test endpoint}/Patient?family={family}&gender={gender} ``` -### 1.8 Search: gender+name (SHOULD) +### 1.1.8 Search: gender+name (SHOULD) **HTTP GET** @@ -214,12 +208,8 @@ Accept: application/fhir+json ``` -# 2 Observation +# 1.2 Observation Body Weight -## Profiles - - -### [Observation Body Weight ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-bodyweight) #### Background The AU Core Observation Body Weight sequence verifies that the system under test is @@ -280,7 +270,122 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Blood Pressure ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-bloodpressure) +## Interactions + + +* read (SHALL) + +* search-type (SHALL) + + +## Test scenarios + + +### 1.2.1 Search: patient+code (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.2.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.2.3 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.2.4 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.2.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.2.6 Search: patient+code+date (SHOULD) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` + + +# 1.3 Observation Blood Pressure + #### Background The AU Core Observation Blood Pressure sequence verifies that the system under test is @@ -341,7 +446,122 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Body Height ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-bodyheight) +## Interactions + + +* read (SHALL) + +* search-type (SHALL) + + +## Test scenarios + + +### 1.3.1 Search: patient+code (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.3.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.3.3 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.3.4 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.3.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.3.6 Search: patient+code+date (SHOULD) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` + + +# 1.4 Observation Body Height + #### Background The AU Core Observation Body Height sequence verifies that the system under test is @@ -402,73 +622,127 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Pathology Result ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path) -#### Background +## Interactions -The AU Core Observation Pathology Result sequence verifies that the system under test is -able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Pathology Result Observation as -specified in the AU Core v0.3.0 Implementation Guide. -#### Testing Methodology -##### Searching -This test sequence will first perform each required search associated -with this resource. This sequence will perform searches with the -following parameters: +* read (SHALL) -* patient + category -* patient -* patient + category + date -* patient + code -* patient + category + status +* search-type (SHALL) -###### Search Parameters -The first search uses the selected patient(s) from the prior launch -sequence. Any subsequent searches will look for its parameter values -from the results of the first search. For example, the `identifier` -search in the patient sequence is performed by looking for an existing -`Patient.identifier` from any of the resources returned in the `_id` -search. If a value cannot be found this way, the search is skipped. -###### Search Validation -Inferno will retrieve up to the first 20 bundle pages of the reply for -Observation resources and save them for subsequent tests. Each of -these resources is then checked to see if it matches the searched -parameters in accordance with [FHIR search -guidelines](https://www.hl7.org/fhir/search.html). The test will fail, -for example, if a Patient search for `gender=male` returns a `female` -patient. +## Test scenarios -##### Must Support -Each profile contains elements marked as "must support". This test -sequence expects to see each of these elements at least once. If at -least one cannot be found, the test will fail. The test will look -through the Observation resources found in the first test for these -elements. +### 1.4.1 Search: patient+code (SHALL) -##### Profile Validation -Each resource returned from the first search is expected to conform to -the [AU Core Pathology Result Observation](http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path). Each element is checked against -teminology binding and cardinality requirements. +**HTTP GET** -Elements with a required binding are validated against their bound -ValueSet. If the code/system in the element is not part of the ValueSet, -then the test will fail. +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` -##### Reference Validation -At least one instance of each external reference in elements marked as -"must support" within the resources provided by the system must resolve. -The test will attempt to read each reference found and will fail if no -read succeeds. +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.4.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.4.3 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.4.4 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.4.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.4.6 Search: patient+code+date (SHOULD) +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` + + +# 1.5 Observation Pathology Result -### [Observation Body Temperature ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-bodytemp) #### Background -The AU Core Observation Body Temperature sequence verifies that the system under test is +The AU Core Observation Pathology Result sequence verifies that the system under test is able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Body Temperature as +must contain resources conforming to the AU Core Pathology Result Observation as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -477,10 +751,10 @@ This test sequence will first perform each required search associated with this resource. This sequence will perform searches with the following parameters: -* patient + code -* patient * patient + category +* patient * patient + category + date +* patient + code * patient + category + status ###### Search Parameters @@ -510,7 +784,7 @@ elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Body Temperature](http://hl7.org.au/fhir/core/StructureDefinition/au-core-bodytemp). Each element is checked against +the [AU Core Pathology Result Observation](http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -524,12 +798,127 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Heart Rate ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-heartrate) +## Interactions + + +* read (SHALL) + +* search-type (SHALL) + + +## Test scenarios + + +### 1.5.1 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.5.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.5.3 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.5.4 Search: patient+code (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.5.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.5.6 Search: patient+code+date (SHOULD) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` + + +# 1.6 Observation Body Temperature + #### Background -The AU Core Observation Heart Rate sequence verifies that the system under test is +The AU Core Observation Body Temperature sequence verifies that the system under test is able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Heart Rate as +must contain resources conforming to the AU Core Body Temperature as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -571,7 +960,7 @@ elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Heart Rate](http://hl7.org.au/fhir/core/StructureDefinition/au-core-heartrate). Each element is checked against +the [AU Core Body Temperature](http://hl7.org.au/fhir/core/StructureDefinition/au-core-bodytemp). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -585,12 +974,127 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Waist Circumference ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-waistcircum) +## Interactions + + +* read (SHALL) + +* search-type (SHALL) + + +## Test scenarios + + +### 1.6.1 Search: patient+code (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.6.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.6.3 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.6.4 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.6.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.6.6 Search: patient+code+date (SHOULD) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` + + +# 1.7 Observation Heart Rate + #### Background -The AU Core Observation Waist Circumference sequence verifies that the system under test is +The AU Core Observation Heart Rate sequence verifies that the system under test is able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Waist Circumference as +must contain resources conforming to the AU Core Heart Rate as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -632,7 +1136,7 @@ elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Waist Circumference](http://hl7.org.au/fhir/core/StructureDefinition/au-core-waistcircum). Each element is checked against +the [AU Core Heart Rate](http://hl7.org.au/fhir/core/StructureDefinition/au-core-heartrate). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -646,12 +1150,127 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Respiration Rate ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-resprate) +## Interactions + + +* read (SHALL) + +* search-type (SHALL) + + +## Test scenarios + + +### 1.7.1 Search: patient+code (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.7.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.7.3 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.7.4 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.7.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.7.6 Search: patient+code+date (SHOULD) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` + + +# 1.8 Observation Waist Circumference + #### Background -The AU Core Observation Respiration Rate sequence verifies that the system under test is +The AU Core Observation Waist Circumference sequence verifies that the system under test is able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Respiration Rate as +must contain resources conforming to the AU Core Waist Circumference as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -693,7 +1312,7 @@ elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Respiration Rate](http://hl7.org.au/fhir/core/StructureDefinition/au-core-resprate). Each element is checked against +the [AU Core Waist Circumference](http://hl7.org.au/fhir/core/StructureDefinition/au-core-waistcircum). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -707,73 +1326,127 @@ The test will attempt to read each reference found and will fail if no read succeeds. -### [Observation Diagnostic Result ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult) -#### Background +## Interactions -The AU Core Observation Diagnostic Result sequence verifies that the system under test is -able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Diagnostic Result Observation as -specified in the AU Core v0.3.0 Implementation Guide. -#### Testing Methodology -##### Searching -This test sequence will first perform each required search associated -with this resource. This sequence will perform searches with the -following parameters: +* read (SHALL) -* patient -* patient + category -* patient + category + date -* patient + code -* patient + category + status +* search-type (SHALL) -###### Search Parameters -The first search uses the selected patient(s) from the prior launch -sequence. Any subsequent searches will look for its parameter values -from the results of the first search. For example, the `identifier` -search in the patient sequence is performed by looking for an existing -`Patient.identifier` from any of the resources returned in the `_id` -search. If a value cannot be found this way, the search is skipped. -###### Search Validation -Inferno will retrieve up to the first 20 bundle pages of the reply for -Observation resources and save them for subsequent tests. Each of -these resources is then checked to see if it matches the searched -parameters in accordance with [FHIR search -guidelines](https://www.hl7.org/fhir/search.html). The test will fail, -for example, if a Patient search for `gender=male` returns a `female` -patient. +## Test scenarios -##### Must Support -Each profile contains elements marked as "must support". This test -sequence expects to see each of these elements at least once. If at -least one cannot be found, the test will fail. The test will look -through the Observation resources found in the first test for these -elements. +### 1.8.1 Search: patient+code (SHALL) -##### Profile Validation -Each resource returned from the first search is expected to conform to -the [AU Core Diagnostic Result Observation](http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult). Each element is checked against -teminology binding and cardinality requirements. +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&code={code} +``` + +### 1.8.2 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.8.3 Search: patient+category (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category} +``` + +### 1.8.4 Search: patient+category+date (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&date={date} +``` + +### 1.8.5 Search: patient+category+status (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient}&category={category}&status={status} +``` + +### 1.8.6 Search: patient+code+date (SHOULD) + +**HTTP GET** + +```bash +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` -Elements with a required binding are validated against their bound -ValueSet. If the code/system in the element is not part of the ValueSet, -then the test will fail. +**For browser based calls:** -##### Reference Validation -At least one instance of each external reference in elements marked as -"must support" within the resources provided by the system must resolve. -The test will attempt to read each reference found and will fail if no -read succeeds. +```bash +{test endpoint}/Observation?patient={patient}&code={code}&date={date} +``` -### [Observation Smoking Status ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus) +# 1.9 Observation Respiration Rate + #### Background -The AU Core Observation Smoking Status sequence verifies that the system under test is +The AU Core Observation Respiration Rate sequence verifies that the system under test is able to provide correct responses for Observation queries. These queries -must contain resources conforming to the AU Core Smoking Status as +must contain resources conforming to the AU Core Respiration Rate as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -815,7 +1488,7 @@ elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Smoking Status](http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus). Each element is checked against +the [AU Core Respiration Rate](http://hl7.org.au/fhir/core/StructureDefinition/au-core-resprate). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -829,8 +1502,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -842,7 +1513,7 @@ read succeeds. ## Test scenarios -### 2.1 Search: patient+code (SHALL) +### 1.9.1 Search: patient+code (SHALL) **HTTP GET** @@ -859,7 +1530,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 2.2 Search: patient (SHALL) +### 1.9.2 Search: patient (SHALL) **HTTP GET** @@ -876,7 +1547,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 2.3 Search: patient+category (SHALL) +### 1.9.3 Search: patient+category (SHALL) **HTTP GET** @@ -893,7 +1564,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 2.4 Search: patient+category+date (SHALL) +### 1.9.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -910,7 +1581,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 2.5 Search: patient+category+status (SHALL) +### 1.9.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -927,7 +1598,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 2.6 Search: patient+code+date (SHOULD) +### 1.9.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -944,7 +1615,98 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code}&date={date} ``` -### 2.1 Search: patient+category (SHALL) + +# 1.10 Observation Diagnostic Result + +#### Background + +The AU Core Observation Diagnostic Result sequence verifies that the system under test is +able to provide correct responses for Observation queries. These queries +must contain resources conforming to the AU Core Diagnostic Result Observation as +specified in the AU Core v0.3.0 Implementation Guide. + +#### Testing Methodology +##### Searching +This test sequence will first perform each required search associated +with this resource. This sequence will perform searches with the +following parameters: + +* patient +* patient + category +* patient + category + date +* patient + code +* patient + category + status + +###### Search Parameters +The first search uses the selected patient(s) from the prior launch +sequence. Any subsequent searches will look for its parameter values +from the results of the first search. For example, the `identifier` +search in the patient sequence is performed by looking for an existing +`Patient.identifier` from any of the resources returned in the `_id` +search. If a value cannot be found this way, the search is skipped. + +###### Search Validation +Inferno will retrieve up to the first 20 bundle pages of the reply for +Observation resources and save them for subsequent tests. Each of +these resources is then checked to see if it matches the searched +parameters in accordance with [FHIR search +guidelines](https://www.hl7.org/fhir/search.html). The test will fail, +for example, if a Patient search for `gender=male` returns a `female` +patient. + + +##### Must Support +Each profile contains elements marked as "must support". This test +sequence expects to see each of these elements at least once. If at +least one cannot be found, the test will fail. The test will look +through the Observation resources found in the first test for these +elements. + +##### Profile Validation +Each resource returned from the first search is expected to conform to +the [AU Core Diagnostic Result Observation](http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult). Each element is checked against +teminology binding and cardinality requirements. + +Elements with a required binding are validated against their bound +ValueSet. If the code/system in the element is not part of the ValueSet, +then the test will fail. + +##### Reference Validation +At least one instance of each external reference in elements marked as +"must support" within the resources provided by the system must resolve. +The test will attempt to read each reference found and will fail if no +read succeeds. + + +## Interactions + + +* read (SHALL) + +* search-type (SHALL) + + +## Test scenarios + + +### 1.10.1 Search: patient (SHALL) + +**HTTP GET** + +```bash +GET /Observation?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/Observation?patient={patient} +``` + +### 1.10.2 Search: patient+category (SHALL) **HTTP GET** @@ -961,7 +1723,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 2.3 Search: patient+category+date (SHALL) +### 1.10.3 Search: patient+category+date (SHALL) **HTTP GET** @@ -978,7 +1740,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 2.4 Search: patient+code (SHALL) +### 1.10.4 Search: patient+code (SHALL) **HTTP GET** @@ -995,12 +1757,12 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 2.1 Search: patient (SHALL) +### 1.10.5 Search: patient+category+status (SHALL) **HTTP GET** ```bash -GET /Observation?patient={patient} HTTP/1.1 +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1009,15 +1771,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Observation?patient={patient} +{test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 2.2 Search: patient+category (SHALL) +### 1.10.6 Search: patient+code+date (SHOULD) **HTTP GET** ```bash -GET /Observation?patient={patient}&category={category} HTTP/1.1 +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1026,21 +1788,17 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Observation?patient={patient}&category={category} +{test endpoint}/Observation?patient={patient}&code={code}&date={date} ``` -# 3 MedicationRequest - -## Profiles - +# 1.11 Observation Smoking Status -### [MedicationRequest ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationrequest) #### Background -The AU Core MedicationRequest sequence verifies that the system under test is -able to provide correct responses for MedicationRequest queries. These queries -must contain resources conforming to the AU Core MedicationRequest as +The AU Core Observation Smoking Status sequence verifies that the system under test is +able to provide correct responses for Observation queries. These queries +must contain resources conforming to the AU Core Smoking Status as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -1049,12 +1807,11 @@ This test sequence will first perform each required search associated with this resource. This sequence will perform searches with the following parameters: +* patient + code * patient -* _id -* identifier -* patient + intent -* patient + intent + status -* patient + intent + authoredon +* patient + category +* patient + category + date +* patient + category + status ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -1066,7 +1823,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -MedicationRequest resources and save them for subsequent tests. Each of +Observation resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -1078,12 +1835,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the MedicationRequest resources found in the first test for these +through the Observation resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core MedicationRequest](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationrequest). Each element is checked against +the [AU Core Smoking Status](http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -1097,8 +1854,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -1110,12 +1865,12 @@ read succeeds. ## Test scenarios -### 3.1 Search: patient (SHALL) +### 1.11.1 Search: patient+code (SHALL) **HTTP GET** ```bash -GET /MedicationRequest?patient={patient} HTTP/1.1 +GET /Observation?patient={patient}&code={code} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1124,15 +1879,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationRequest?patient={patient} +{test endpoint}/Observation?patient={patient}&code={code} ``` -### 3.2 Search: _id (SHALL) +### 1.11.2 Search: patient (SHALL) **HTTP GET** ```bash -GET /MedicationRequest?_id={_id} HTTP/1.1 +GET /Observation?patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1141,15 +1896,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationRequest?_id={_id} +{test endpoint}/Observation?patient={patient} ``` -### 3.3 Search: identifier (SHALL) +### 1.11.3 Search: patient+category (SHALL) **HTTP GET** ```bash -GET /MedicationRequest?identifier={identifier} HTTP/1.1 +GET /Observation?patient={patient}&category={category} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1158,15 +1913,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationRequest?identifier={identifier} +{test endpoint}/Observation?patient={patient}&category={category} ``` -### 3.4 Search: patient+intent (SHALL) +### 1.11.4 Search: patient+category+date (SHALL) **HTTP GET** ```bash -GET /MedicationRequest?patient={patient}&intent={intent} HTTP/1.1 +GET /Observation?patient={patient}&category={category}&date={date} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1175,15 +1930,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationRequest?patient={patient}&intent={intent} +{test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 3.5 Search: patient+intent+status (SHALL) +### 1.11.5 Search: patient+category+status (SHALL) **HTTP GET** ```bash -GET /MedicationRequest?patient={patient}&intent={intent}&status={status} HTTP/1.1 +GET /Observation?patient={patient}&category={category}&status={status} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1192,15 +1947,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationRequest?patient={patient}&intent={intent}&status={status} +{test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 3.6 Search: patient+intent+authoredon (SHALL) +### 1.11.6 Search: patient+code+date (SHOULD) **HTTP GET** ```bash -GET /MedicationRequest?patient={patient}&intent={intent}&authoredon={authoredon} HTTP/1.1 +GET /Observation?patient={patient}&code={code}&date={date} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1209,21 +1964,17 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationRequest?patient={patient}&intent={intent}&authoredon={authoredon} +{test endpoint}/Observation?patient={patient}&code={code}&date={date} ``` -# 4 Encounter - -## Profiles +# 1.12 AllergyIntolerance - -### [Encounter ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-encounter) #### Background -The AU Core Encounter sequence verifies that the system under test is -able to provide correct responses for Encounter queries. These queries -must contain resources conforming to the AU Core Encounter as +The AU Core AllergyIntolerance sequence verifies that the system under test is +able to provide correct responses for AllergyIntolerance queries. These queries +must contain resources conforming to the AU Core AllergyIntolerance as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -1233,7 +1984,6 @@ with this resource. This sequence will perform searches with the following parameters: * patient -* date + patient ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -1245,7 +1995,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -Encounter resources and save them for subsequent tests. Each of +AllergyIntolerance resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -1254,132 +2004,45 @@ patient. ##### Must Support -Each profile contains elements marked as "must support". This test -sequence expects to see each of these elements at least once. If at -least one cannot be found, the test will fail. The test will look -through the Encounter resources found in the first test for these -elements. - -##### Profile Validation -Each resource returned from the first search is expected to conform to -the [AU Core Encounter](http://hl7.org.au/fhir/core/StructureDefinition/au-core-encounter). Each element is checked against -teminology binding and cardinality requirements. - -Elements with a required binding are validated against their bound -ValueSet. If the code/system in the element is not part of the ValueSet, -then the test will fail. - -##### Reference Validation -At least one instance of each external reference in elements marked as -"must support" within the resources provided by the system must resolve. -The test will attempt to read each reference found and will fail if no -read succeeds. - - - - -## Interactions - - -* read (SHALL) - -* search-type (SHALL) - - -## Test scenarios - - -### 4.1 Search: patient (SHALL) - -**HTTP GET** - -```bash -GET /Encounter?patient={patient} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** - -```bash -{test endpoint}/Encounter?patient={patient} -``` - -### 4.2 Search: date+patient (SHALL) - -**HTTP GET** - -```bash -GET /Encounter?date={date}&patient={patient} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** - -```bash -{test endpoint}/Encounter?date={date}&patient={patient} -``` - -### 4.3 Search: class+patient (SHOULD) - -**HTTP GET** - -```bash -GET /Encounter?class={class}&patient={patient} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** +Each profile contains elements marked as "must support". This test +sequence expects to see each of these elements at least once. If at +least one cannot be found, the test will fail. The test will look +through the AllergyIntolerance resources found in the first test for these +elements. -```bash -{test endpoint}/Encounter?class={class}&patient={patient} -``` +##### Profile Validation +Each resource returned from the first search is expected to conform to +the [AU Core AllergyIntolerance](http://hl7.org.au/fhir/core/StructureDefinition/au-core-allergyintolerance). Each element is checked against +teminology binding and cardinality requirements. -### 4.4 Search: patient+discharge-disposition (SHOULD) +Elements with a required binding are validated against their bound +ValueSet. If the code/system in the element is not part of the ValueSet, +then the test will fail. -**HTTP GET** +##### Reference Validation +At least one instance of each external reference in elements marked as +"must support" within the resources provided by the system must resolve. +The test will attempt to read each reference found and will fail if no +read succeeds. -```bash -GET /Encounter?patient={patient}&discharge-disposition={discharge-disposition} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` -**For browser based calls:** +## Interactions -```bash -{test endpoint}/Encounter?patient={patient}&discharge-disposition={discharge-disposition} -``` -### 4.5 Search: patient+location (SHOULD) +* read (SHALL) -**HTTP GET** +* search-type (SHALL) -```bash -GET /Encounter?patient={patient}&location={location} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` -**For browser based calls:** +## Test scenarios -```bash -{test endpoint}/Encounter?patient={patient}&location={location} -``` -### 4.6 Search: patient+status (SHOULD) +### 1.12.1 Search: patient (SHALL) **HTTP GET** ```bash -GET /Encounter?patient={patient}&status={status} HTTP/1.1 +GET /AllergyIntolerance?patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1388,15 +2051,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Encounter?patient={patient}&status={status} +{test endpoint}/AllergyIntolerance?patient={patient} ``` -### 4.7 Search: patient+type (SHOULD) +### 1.12.2 Search: patient+clinical-status (SHOULD) **HTTP GET** ```bash -GET /Encounter?patient={patient}&type={type} HTTP/1.1 +GET /AllergyIntolerance?patient={patient}&clinical-status={clinical-status} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1405,16 +2068,12 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Encounter?patient={patient}&type={type} +{test endpoint}/AllergyIntolerance?patient={patient}&clinical-status={clinical-status} ``` -# 5 Condition - -## Profiles - +# 1.13 Condition -### [Condition ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-condition) #### Background The AU Core Condition sequence verifies that the system under test is @@ -1473,8 +2132,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -1486,7 +2143,7 @@ read succeeds. ## Test scenarios -### 5.1 Search: patient (SHALL) +### 1.13.1 Search: patient (SHALL) **HTTP GET** @@ -1503,7 +2160,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient} ``` -### 5.2 Search: patient+category (SHALL) +### 1.13.2 Search: patient+category (SHALL) **HTTP GET** @@ -1520,7 +2177,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&category={category} ``` -### 5.3 Search: patient+clinical-status (SHALL) +### 1.13.3 Search: patient+clinical-status (SHALL) **HTTP GET** @@ -1537,7 +2194,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&clinical-status={clinical-status} ``` -### 5.4 Search: patient+category+clinical-status (SHOULD) +### 1.13.4 Search: patient+category+clinical-status (SHOULD) **HTTP GET** @@ -1554,7 +2211,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&category={category}&clinical-status={clinical-status} ``` -### 5.5 Search: patient+code (SHOULD) +### 1.13.5 Search: patient+code (SHOULD) **HTTP GET** @@ -1571,7 +2228,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&code={code} ``` -### 5.6 Search: patient+onset-date (SHOULD) +### 1.13.6 Search: patient+onset-date (SHOULD) **HTTP GET** @@ -1589,17 +2246,13 @@ Accept: application/fhir+json ``` -# 6 Procedure - -## Profiles - +# 1.14 Encounter -### [Procedure ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-procedure) #### Background -The AU Core Procedure sequence verifies that the system under test is -able to provide correct responses for Procedure queries. These queries -must contain resources conforming to the AU Core Procedure as +The AU Core Encounter sequence verifies that the system under test is +able to provide correct responses for Encounter queries. These queries +must contain resources conforming to the AU Core Encounter as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -1609,7 +2262,7 @@ with this resource. This sequence will perform searches with the following parameters: * patient -* patient + date +* date + patient ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -1621,7 +2274,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -Procedure resources and save them for subsequent tests. Each of +Encounter resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -1633,12 +2286,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the Procedure resources found in the first test for these +through the Encounter resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Procedure](http://hl7.org.au/fhir/core/StructureDefinition/au-core-procedure). Each element is checked against +the [AU Core Encounter](http://hl7.org.au/fhir/core/StructureDefinition/au-core-encounter). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -1652,8 +2305,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -1665,12 +2316,12 @@ read succeeds. ## Test scenarios -### 6.1 Search: patient (SHALL) +### 1.14.1 Search: patient (SHALL) **HTTP GET** ```bash -GET /Procedure?patient={patient} HTTP/1.1 +GET /Encounter?patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1679,15 +2330,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Procedure?patient={patient} +{test endpoint}/Encounter?patient={patient} ``` -### 6.2 Search: patient+date (SHALL) +### 1.14.2 Search: date+patient (SHALL) **HTTP GET** ```bash -GET /Procedure?patient={patient}&date={date} HTTP/1.1 +GET /Encounter?date={date}&patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1696,15 +2347,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Procedure?patient={patient}&date={date} +{test endpoint}/Encounter?date={date}&patient={patient} ``` -### 6.3 Search: patient+code+date (SHOULD) +### 1.14.3 Search: class+patient (SHOULD) **HTTP GET** ```bash -GET /Procedure?patient={patient}&code={code}&date={date} HTTP/1.1 +GET /Encounter?class={class}&patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1713,15 +2364,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Procedure?patient={patient}&code={code}&date={date} +{test endpoint}/Encounter?class={class}&patient={patient} ``` -### 6.4 Search: patient+status (SHOULD) +### 1.14.4 Search: patient+discharge-disposition (SHOULD) **HTTP GET** ```bash -GET /Procedure?patient={patient}&status={status} HTTP/1.1 +GET /Encounter?patient={patient}&discharge-disposition={discharge-disposition} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1730,92 +2381,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Procedure?patient={patient}&status={status} +{test endpoint}/Encounter?patient={patient}&discharge-disposition={discharge-disposition} ``` - -# 8 Immunization - -## Profiles - - -### [Immunization ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-immunization) -#### Background - -The AU Core Immunization sequence verifies that the system under test is -able to provide correct responses for Immunization queries. These queries -must contain resources conforming to the AU Core Immunization as -specified in the AU Core v0.3.0 Implementation Guide. - -#### Testing Methodology -##### Searching -This test sequence will first perform each required search associated -with this resource. This sequence will perform searches with the -following parameters: - -* patient -* patient + status - -###### Search Parameters -The first search uses the selected patient(s) from the prior launch -sequence. Any subsequent searches will look for its parameter values -from the results of the first search. For example, the `identifier` -search in the patient sequence is performed by looking for an existing -`Patient.identifier` from any of the resources returned in the `_id` -search. If a value cannot be found this way, the search is skipped. - -###### Search Validation -Inferno will retrieve up to the first 20 bundle pages of the reply for -Immunization resources and save them for subsequent tests. Each of -these resources is then checked to see if it matches the searched -parameters in accordance with [FHIR search -guidelines](https://www.hl7.org/fhir/search.html). The test will fail, -for example, if a Patient search for `gender=male` returns a `female` -patient. - - -##### Must Support -Each profile contains elements marked as "must support". This test -sequence expects to see each of these elements at least once. If at -least one cannot be found, the test will fail. The test will look -through the Immunization resources found in the first test for these -elements. - -##### Profile Validation -Each resource returned from the first search is expected to conform to -the [AU Core Immunization](http://hl7.org.au/fhir/core/StructureDefinition/au-core-immunization). Each element is checked against -teminology binding and cardinality requirements. - -Elements with a required binding are validated against their bound -ValueSet. If the code/system in the element is not part of the ValueSet, -then the test will fail. - -##### Reference Validation -At least one instance of each external reference in elements marked as -"must support" within the resources provided by the system must resolve. -The test will attempt to read each reference found and will fail if no -read succeeds. - - - - -## Interactions - - -* read (SHALL) - -* search-type (SHALL) - - -## Test scenarios - - -### 8.1 Search: patient (SHALL) +### 1.14.5 Search: patient+location (SHOULD) **HTTP GET** ```bash -GET /Immunization?patient={patient} HTTP/1.1 +GET /Encounter?patient={patient}&location={location} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1824,15 +2398,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Immunization?patient={patient} +{test endpoint}/Encounter?patient={patient}&location={location} ``` -### 8.2 Search: patient+status (SHALL) +### 1.14.6 Search: patient+status (SHOULD) **HTTP GET** ```bash -GET /Immunization?patient={patient}&status={status} HTTP/1.1 +GET /Encounter?patient={patient}&status={status} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1841,15 +2415,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Immunization?patient={patient}&status={status} +{test endpoint}/Encounter?patient={patient}&status={status} ``` -### 8.3 Search: patient+date (SHOULD) +### 1.14.7 Search: patient+type (SHOULD) **HTTP GET** ```bash -GET /Immunization?patient={patient}&date={date} HTTP/1.1 +GET /Encounter?patient={patient}&type={type} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -1858,21 +2432,17 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Immunization?patient={patient}&date={date} +{test endpoint}/Encounter?patient={patient}&type={type} ``` -# 9 AllergyIntolerance - -## Profiles - +# 1.15 Immunization -### [AllergyIntolerance ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-allergyintolerance) #### Background -The AU Core AllergyIntolerance sequence verifies that the system under test is -able to provide correct responses for AllergyIntolerance queries. These queries -must contain resources conforming to the AU Core AllergyIntolerance as +The AU Core Immunization sequence verifies that the system under test is +able to provide correct responses for Immunization queries. These queries +must contain resources conforming to the AU Core Immunization as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -1882,6 +2452,7 @@ with this resource. This sequence will perform searches with the following parameters: * patient +* patient + status ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -1893,7 +2464,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -AllergyIntolerance resources and save them for subsequent tests. Each of +Immunization resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -1905,12 +2476,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the AllergyIntolerance resources found in the first test for these +through the Immunization resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core AllergyIntolerance](http://hl7.org.au/fhir/core/StructureDefinition/au-core-allergyintolerance). Each element is checked against +the [AU Core Immunization](http://hl7.org.au/fhir/core/StructureDefinition/au-core-immunization). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -1924,8 +2495,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -1937,105 +2506,65 @@ read succeeds. ## Test scenarios -### 9.1 Search: patient (SHALL) - -**HTTP GET** - -```bash -GET /AllergyIntolerance?patient={patient} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** - -```bash -{test endpoint}/AllergyIntolerance?patient={patient} -``` - -### 9.2 Search: patient+clinical-status (SHOULD) - -**HTTP GET** - -```bash -GET /AllergyIntolerance?patient={patient}&clinical-status={clinical-status} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** - -```bash -{test endpoint}/AllergyIntolerance?patient={patient}&clinical-status={clinical-status} -``` - - -# 10 Medication - -## Profiles - - -### [Medication ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medication) -#### Background - -The AU Core Medication sequence verifies that the system under test is -able to provide correct responses for Medication queries. These queries -must contain resources conforming to the AU Core Medication as -specified in the AU Core v0.3.0 Implementation Guide. - -#### Testing Methodology - - -##### Must Support -Each profile contains elements marked as "must support". This test -sequence expects to see each of these elements at least once. If at -least one cannot be found, the test will fail. The test will look -through the Medication resources found in the first test for these -elements. - -##### Profile Validation -Each resource returned from the first search is expected to conform to -the [AU Core Medication](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medication). Each element is checked against -teminology binding and cardinality requirements. - -Elements with a required binding are validated against their bound -ValueSet. If the code/system in the element is not part of the ValueSet, -then the test will fail. +### 1.15.1 Search: patient (SHALL) -##### Reference Validation -At least one instance of each external reference in elements marked as -"must support" within the resources provided by the system must resolve. -The test will attempt to read each reference found and will fail if no -read succeeds. +**HTTP GET** +```bash +GET /Immunization?patient={patient} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` +**For browser based calls:** +```bash +{test endpoint}/Immunization?patient={patient} +``` -## Interactions +### 1.15.2 Search: patient+status (SHALL) +**HTTP GET** -* read (SHALL) +```bash +GET /Immunization?patient={patient}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` -* search-type (MAY) +**For browser based calls:** + +```bash +{test endpoint}/Immunization?patient={patient}&status={status} +``` +### 1.15.3 Search: patient+date (SHOULD) -## Test scenarios +**HTTP GET** +```bash +GET /Immunization?patient={patient}&date={date} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` +**For browser based calls:** -# 11 MedicationStatement +```bash +{test endpoint}/Immunization?patient={patient}&date={date} +``` -## Profiles +# 1.16 MedicationRequest -### [MedicationStatement ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationstatement) #### Background -The AU Core MedicationStatement sequence verifies that the system under test is -able to provide correct responses for MedicationStatement queries. These queries -must contain resources conforming to the AU Core MedicationStatement as +The AU Core MedicationRequest sequence verifies that the system under test is +able to provide correct responses for MedicationRequest queries. These queries +must contain resources conforming to the AU Core MedicationRequest as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -2045,7 +2574,11 @@ with this resource. This sequence will perform searches with the following parameters: * patient -* patient + status +* _id +* identifier +* patient + intent +* patient + intent + status +* patient + intent + authoredon ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -2057,7 +2590,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -MedicationStatement resources and save them for subsequent tests. Each of +MedicationRequest resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -2069,12 +2602,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the MedicationStatement resources found in the first test for these +through the MedicationRequest resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core MedicationStatement](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationstatement). Each element is checked against +the [AU Core MedicationRequest](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationrequest). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -2088,8 +2621,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -2101,12 +2632,12 @@ read succeeds. ## Test scenarios -### 11.1 Search: patient (SHALL) +### 1.16.1 Search: patient (SHALL) **HTTP GET** ```bash -GET /MedicationStatement?patient={patient} HTTP/1.1 +GET /MedicationRequest?patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2115,15 +2646,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationStatement?patient={patient} +{test endpoint}/MedicationRequest?patient={patient} ``` -### 11.2 Search: patient+status (SHALL) +### 1.16.2 Search: _id (SHALL) **HTTP GET** ```bash -GET /MedicationStatement?patient={patient}&status={status} HTTP/1.1 +GET /MedicationRequest?_id={_id} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2132,15 +2663,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationStatement?patient={patient}&status={status} +{test endpoint}/MedicationRequest?_id={_id} ``` -### 11.3 Search: patient+effective (SHOULD) +### 1.16.3 Search: identifier (SHALL) **HTTP GET** ```bash -GET /MedicationStatement?patient={patient}&effective={effective} HTTP/1.1 +GET /MedicationRequest?identifier={identifier} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2149,21 +2680,68 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/MedicationStatement?patient={patient}&effective={effective} +{test endpoint}/MedicationRequest?identifier={identifier} +``` + +### 1.16.4 Search: patient+intent (SHALL) + +**HTTP GET** + +```bash +GET /MedicationRequest?patient={patient}&intent={intent} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** + +```bash +{test endpoint}/MedicationRequest?patient={patient}&intent={intent} +``` + +### 1.16.5 Search: patient+intent+status (SHALL) + +**HTTP GET** + +```bash +GET /MedicationRequest?patient={patient}&intent={intent}&status={status} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json ``` +**For browser based calls:** + +```bash +{test endpoint}/MedicationRequest?patient={patient}&intent={intent}&status={status} +``` + +### 1.16.6 Search: patient+intent+authoredon (SHALL) + +**HTTP GET** + +```bash +GET /MedicationRequest?patient={patient}&intent={intent}&authoredon={authoredon} HTTP/1.1 +User-Agent: {agent} +Host: {host} +Accept: application/fhir+json +``` + +**For browser based calls:** -# 12 Practitioner +```bash +{test endpoint}/MedicationRequest?patient={patient}&intent={intent}&authoredon={authoredon} +``` -## Profiles +# 1.17 MedicationStatement -### [Practitioner ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-practitioner) #### Background -The AU Core Practitioner sequence verifies that the system under test is -able to provide correct responses for Practitioner queries. These queries -must contain resources conforming to the AU Core Practitioner as +The AU Core MedicationStatement sequence verifies that the system under test is +able to provide correct responses for MedicationStatement queries. These queries +must contain resources conforming to the AU Core MedicationStatement as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -2172,8 +2750,8 @@ This test sequence will first perform each required search associated with this resource. This sequence will perform searches with the following parameters: -* _id -* identifier +* patient +* patient + status ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -2185,7 +2763,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -Practitioner resources and save them for subsequent tests. Each of +MedicationStatement resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -2197,12 +2775,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the Practitioner resources found in the first test for these +through the MedicationStatement resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Practitioner](http://hl7.org.au/fhir/core/StructureDefinition/au-core-practitioner). Each element is checked against +the [AU Core MedicationStatement](http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationstatement). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -2216,8 +2794,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -2229,12 +2805,12 @@ read succeeds. ## Test scenarios -### 12.1 Search: _id (SHALL) +### 1.17.1 Search: patient (SHALL) **HTTP GET** ```bash -GET /Practitioner?_id={_id} HTTP/1.1 +GET /MedicationStatement?patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2243,15 +2819,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Practitioner?_id={_id} +{test endpoint}/MedicationStatement?patient={patient} ``` -### 12.2 Search: identifier (SHALL) +### 1.17.2 Search: patient+status (SHALL) **HTTP GET** ```bash -GET /Practitioner?identifier={identifier} HTTP/1.1 +GET /MedicationStatement?patient={patient}&status={status} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2260,15 +2836,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Practitioner?identifier={identifier} +{test endpoint}/MedicationStatement?patient={patient}&status={status} ``` -### 12.3 Search: name (SHOULD) +### 1.17.3 Search: patient+effective (SHOULD) **HTTP GET** ```bash -GET /Practitioner?name={name} HTTP/1.1 +GET /MedicationStatement?patient={patient}&effective={effective} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2277,21 +2853,17 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Practitioner?name={name} +{test endpoint}/MedicationStatement?patient={patient}&effective={effective} ``` -# 13 Organization - -## Profiles - +# 1.18 Procedure -### [Organization ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-organization) #### Background -The AU Core Organization sequence verifies that the system under test is -able to provide correct responses for Organization queries. These queries -must contain resources conforming to the AU Core Organization as +The AU Core Procedure sequence verifies that the system under test is +able to provide correct responses for Procedure queries. These queries +must contain resources conforming to the AU Core Procedure as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -2300,9 +2872,8 @@ This test sequence will first perform each required search associated with this resource. This sequence will perform searches with the following parameters: -* address -* identifier -* name +* patient +* patient + date ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -2314,7 +2885,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -Organization resources and save them for subsequent tests. Each of +Procedure resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -2326,12 +2897,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the Organization resources found in the first test for these +through the Procedure resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Organization](http://hl7.org.au/fhir/core/StructureDefinition/au-core-organization). Each element is checked against +the [AU Core Procedure](http://hl7.org.au/fhir/core/StructureDefinition/au-core-procedure). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -2345,8 +2916,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -2358,12 +2927,12 @@ read succeeds. ## Test scenarios -### 13.1 Search: _id (SHOULD) +### 1.18.1 Search: patient (SHALL) **HTTP GET** ```bash -GET /Organization?_id={_id} HTTP/1.1 +GET /Procedure?patient={patient} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2372,15 +2941,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Organization?_id={_id} +{test endpoint}/Procedure?patient={patient} ``` -### 13.2 Search: address (SHALL) +### 1.18.2 Search: patient+date (SHALL) **HTTP GET** ```bash -GET /Organization?address={address} HTTP/1.1 +GET /Procedure?patient={patient}&date={date} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2389,15 +2958,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Organization?address={address} +{test endpoint}/Procedure?patient={patient}&date={date} ``` -### 13.3 Search: identifier (SHALL) +### 1.18.3 Search: patient+code+date (SHOULD) **HTTP GET** ```bash -GET /Organization?identifier={identifier} HTTP/1.1 +GET /Procedure?patient={patient}&code={code}&date={date} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2406,15 +2975,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Organization?identifier={identifier} +{test endpoint}/Procedure?patient={patient}&code={code}&date={date} ``` -### 13.4 Search: name (SHALL) +### 1.18.4 Search: patient+status (SHOULD) **HTTP GET** ```bash -GET /Organization?name={name} HTTP/1.1 +GET /Procedure?patient={patient}&status={status} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2423,21 +2992,17 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Organization?name={name} +{test endpoint}/Procedure?patient={patient}&status={status} ``` -# 14 PractitionerRole - -## Profiles +# 1.19 Organization - -### [PractitionerRole ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-practitionerrole) #### Background -The AU Core PractitionerRole sequence verifies that the system under test is -able to provide correct responses for PractitionerRole queries. These queries -must contain resources conforming to the AU Core PractitionerRole as +The AU Core Organization sequence verifies that the system under test is +able to provide correct responses for Organization queries. These queries +must contain resources conforming to the AU Core Organization as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -2446,9 +3011,9 @@ This test sequence will first perform each required search associated with this resource. This sequence will perform searches with the following parameters: -* _id +* address * identifier -* practitioner +* name ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -2460,7 +3025,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -PractitionerRole resources and save them for subsequent tests. Each of +Organization resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -2472,12 +3037,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the PractitionerRole resources found in the first test for these +through the Organization resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core PractitionerRole](http://hl7.org.au/fhir/core/StructureDefinition/au-core-practitionerrole). Each element is checked against +the [AU Core Organization](http://hl7.org.au/fhir/core/StructureDefinition/au-core-organization). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -2491,8 +3056,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -2504,12 +3067,12 @@ read succeeds. ## Test scenarios -### 14.1 Search: _id (SHALL) +### 1.19.1 Search: _id (SHOULD) **HTTP GET** ```bash -GET /PractitionerRole?_id={_id} HTTP/1.1 +GET /Organization?_id={_id} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2518,15 +3081,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/PractitionerRole?_id={_id} +{test endpoint}/Organization?_id={_id} ``` -### 14.2 Search: identifier (SHALL) +### 1.19.2 Search: address (SHALL) **HTTP GET** ```bash -GET /PractitionerRole?identifier={identifier} HTTP/1.1 +GET /Organization?address={address} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2535,15 +3098,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/PractitionerRole?identifier={identifier} +{test endpoint}/Organization?address={address} ``` -### 14.3 Search: practitioner (SHALL) +### 1.19.3 Search: identifier (SHALL) **HTTP GET** ```bash -GET /PractitionerRole?practitioner={practitioner} HTTP/1.1 +GET /Organization?identifier={identifier} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2552,15 +3115,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/PractitionerRole?practitioner={practitioner} +{test endpoint}/Organization?identifier={identifier} ``` -### 14.4 Search: specialty (SHOULD) +### 1.19.4 Search: name (SHALL) **HTTP GET** ```bash -GET /PractitionerRole?specialty={specialty} HTTP/1.1 +GET /Organization?name={name} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2569,21 +3132,17 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/PractitionerRole?specialty={specialty} +{test endpoint}/Organization?name={name} ``` -# 16 Location +# 1.20 Practitioner -## Profiles - - -### [Location ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-location) #### Background -The AU Core Location sequence verifies that the system under test is -able to provide correct responses for Location queries. These queries -must contain resources conforming to the AU Core Location as +The AU Core Practitioner sequence verifies that the system under test is +able to provide correct responses for Practitioner queries. These queries +must contain resources conforming to the AU Core Practitioner as specified in the AU Core v0.3.0 Implementation Guide. #### Testing Methodology @@ -2592,8 +3151,8 @@ This test sequence will first perform each required search associated with this resource. This sequence will perform searches with the following parameters: -* address -* name +* _id +* identifier ###### Search Parameters The first search uses the selected patient(s) from the prior launch @@ -2605,7 +3164,7 @@ search. If a value cannot be found this way, the search is skipped. ###### Search Validation Inferno will retrieve up to the first 20 bundle pages of the reply for -Location resources and save them for subsequent tests. Each of +Practitioner resources and save them for subsequent tests. Each of these resources is then checked to see if it matches the searched parameters in accordance with [FHIR search guidelines](https://www.hl7.org/fhir/search.html). The test will fail, @@ -2617,12 +3176,12 @@ patient. Each profile contains elements marked as "must support". This test sequence expects to see each of these elements at least once. If at least one cannot be found, the test will fail. The test will look -through the Location resources found in the first test for these +through the Practitioner resources found in the first test for these elements. ##### Profile Validation Each resource returned from the first search is expected to conform to -the [AU Core Location](http://hl7.org.au/fhir/core/StructureDefinition/au-core-location). Each element is checked against +the [AU Core Practitioner](http://hl7.org.au/fhir/core/StructureDefinition/au-core-practitioner). Each element is checked against teminology binding and cardinality requirements. Elements with a required binding are validated against their bound @@ -2636,8 +3195,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions @@ -2649,46 +3206,12 @@ read succeeds. ## Test scenarios -### 16.1 Search: address (SHALL) - -**HTTP GET** - -```bash -GET /Location?address={address} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** - -```bash -{test endpoint}/Location?address={address} -``` - -### 16.2 Search: name (SHALL) - -**HTTP GET** - -```bash -GET /Location?name={name} HTTP/1.1 -User-Agent: {agent} -Host: {host} -Accept: application/fhir+json -``` - -**For browser based calls:** - -```bash -{test endpoint}/Location?name={name} -``` - -### 16.3 Search: address-city (SHOULD) +### 1.20.1 Search: _id (SHALL) **HTTP GET** ```bash -GET /Location?address-city={address-city} HTTP/1.1 +GET /Practitioner?_id={_id} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2697,15 +3220,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Location?address-city={address-city} +{test endpoint}/Practitioner?_id={_id} ``` -### 16.4 Search: address-state (SHOULD) +### 1.20.2 Search: identifier (SHALL) **HTTP GET** ```bash -GET /Location?address-state={address-state} HTTP/1.1 +GET /Practitioner?identifier={identifier} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2714,15 +3237,15 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Location?address-state={address-state} +{test endpoint}/Practitioner?identifier={identifier} ``` -### 16.5 Search: address-postalcode (SHOULD) +### 1.20.3 Search: name (SHOULD) **HTTP GET** ```bash -GET /Location?address-postalcode={address-postalcode} HTTP/1.1 +GET /Practitioner?name={name} HTTP/1.1 User-Agent: {agent} Host: {host} Accept: application/fhir+json @@ -2731,16 +3254,12 @@ Accept: application/fhir+json **For browser based calls:** ```bash -{test endpoint}/Location?address-postalcode={address-postalcode} +{test endpoint}/Practitioner?name={name} ``` -# 19 Provenance +# 1.21 Provenance -## Profiles - - -### [Provenance ](http://hl7.org.au/fhir/core/StructureDefinition/au-core-provenance) #### Background The AU Core Provenance sequence verifies that the system under test is @@ -2774,8 +3293,6 @@ The test will attempt to read each reference found and will fail if no read succeeds. - - ## Interactions diff --git a/lib/au_core_test_kit/generator/mdsummary_generator.rb b/lib/au_core_test_kit/generator/mdsummary_generator.rb index c963cbe8..59c5db04 100644 --- a/lib/au_core_test_kit/generator/mdsummary_generator.rb +++ b/lib/au_core_test_kit/generator/mdsummary_generator.rb @@ -38,37 +38,10 @@ def generate File.open(output_file_name, 'w') { |f| f.write(output) } end - def resource_position(resource) - # This hash with resource positions is built on a subjective view and can be changed. - # Used for sorting resources in the summary list. - resource_positions = { - "Patient" => 1, - "Observation" => 2, - "MedicationRequest" => 3, - "Encounter" => 4, - "Condition" => 5, - "Procedure" => 6, - "DiagnosticReport" => 7, - "Immunization" => 8, - "AllergyIntolerance" => 9, - "Medication" => 10, - "MedicationStatement" => 11, - "Practitioner" => 12, - "Organization" => 13, - "PractitionerRole" => 14, - "HealthcareService" => 15, - "Location" => 16, - "DocumentReference" => 17, - "ServiceRequest" => 18, - "Provenance" => 19, - "RelatedPerson" => 20, - } - - resource_positions[resource] - end - def resource_list - mapped_groups = ig_metadata.groups.map do |group| + # TODO: Add CapabilityStatement + groups = ig_metadata.ordered_groups.reject { |group| ["Location", "Medication", "PractitionerRole"].include? group.resource } + mapped_groups = groups.map.with_index do |group, index| title = group.title resource_type = group.resource profile_name = group.profile_name @@ -91,6 +64,7 @@ def resource_list { 'title' => title, 'resource' => resource_type, + 'position' => index + 1, 'profile_url' => profile_url, 'description' => group_description, 'interactions' => group.interactions.map do |interaction| @@ -109,25 +83,6 @@ def resource_list end } end - - mapped_groups.group_by { |group| group['resource'] }.map do |resource, groups| - combined_interactions = groups.flat_map { |group| group['interactions'] }.uniq - combined_searches = groups.flat_map { |group| group['searches'] }.uniq - - { - 'resource' => resource, - 'position' => resource_position(resource), - 'interactions' => combined_interactions, - 'searches' => combined_searches, - 'groups' => groups.map do |group| - { - 'title' => group['title'], - 'profile_url' => group['profile_url'], - 'description' => group['description'], - } - end - } - end.sort_by { |data| data["position"] } end def make_search_string(resource_name, search_names) diff --git a/lib/au_core_test_kit/generator/templates/summary.md.erb b/lib/au_core_test_kit/generator/templates/summary.md.erb index 781b8f59..f5d80108 100644 --- a/lib/au_core_test_kit/generator/templates/summary.md.erb +++ b/lib/au_core_test_kit/generator/templates/summary.md.erb @@ -1,15 +1,9 @@ -# Capabilities by Resource/Profile +# 1 AU Core FHIR API <% resource_list.each do |resource_data| %> -# <%= resource_data["position"] %> <%= resource_data["resource"] %> - -## Profiles - -<% resource_data["groups"].each do |group| %> -### [<%= group["title"] %> ](<%= group["profile_url"] %>) -<%= group["description"] %> -<% end %> +# 1.<%= resource_data["position"] %> <%= resource_data["title"] %> +<%= resource_data["description"] %> ## Interactions @@ -20,7 +14,7 @@ ## Test scenarios <% resource_data["searches"].each do |search_data| %> -### <%= resource_data["position"] %>.<%= search_data["position"] %> Search: <%= search_data["names"].join('+') %> (<%= search_data["expectation"] %>) +### 1.<%= resource_data["position"] %>.<%= search_data["position"] %> Search: <%= search_data["names"].join('+') %> (<%= search_data["expectation"] %>) **HTTP GET** From 108505a954c12f300f47091ef1b02663bc6b64ba Mon Sep 17 00:00:00 2001 From: Pavel R Date: Wed, 13 Mar 2024 14:05:18 +0100 Subject: [PATCH 2/3] Add CapabilityStatement description Ref: https://github.com/hl7au/au-fhir-core-inferno/issues/4 --- .../v0.3.0/capability_statement_group.rb | 37 +- .../generated/v0.3.0/summary.md | 377 ++++++++++++------ .../generator/mdsummary_generator.rb | 15 +- .../generator/templates/summary.md.erb | 4 + lib/au_core_test_kit/helpers.rb | 41 ++ 5 files changed, 309 insertions(+), 165 deletions(-) diff --git a/lib/au_core_test_kit/custom_groups/v0.3.0/capability_statement_group.rb b/lib/au_core_test_kit/custom_groups/v0.3.0/capability_statement_group.rb index e1bcd049..619c7d37 100644 --- a/lib/au_core_test_kit/custom_groups/v0.3.0/capability_statement_group.rb +++ b/lib/au_core_test_kit/custom_groups/v0.3.0/capability_statement_group.rb @@ -1,4 +1,5 @@ require 'tls_test_kit' +require_relative '../../helpers' require_relative '../capability_statement/conformance_support_test' require_relative '../capability_statement/fhir_version_test' require_relative '../capability_statement/json_support_test' @@ -10,41 +11,7 @@ class CapabilityStatementGroup < Inferno::TestGroup id :au_core_v030_capability_statement title 'Capability Statement' short_description 'Retrieve information about supported server functionality using the FHIR capabilties interaction.' - description %( - # Background - The #{title} Sequence tests a FHIR server's ability to formally describe - features supported by the API by using the [Capability - Statement](https://www.hl7.org/fhir/capabilitystatement.html) resource. - The features described in the Capability Statement must be consistent with - the required capabilities of a AU Core server. The Capability Statement - must also advertise the location of the required SMART on FHIR endpoints - that enable authenticated access to the FHIR server resources. - - The Capability Statement resource allows clients to determine which - resources are supported by a FHIR Server. Not all servers are expected to - implement all possible queries and data elements described in the AU Core - API. For example, the AU Core Implementation Guide requires that the - Patient resource and only one additional resource profile from the AU Core - Profiles. - - # Test Methodology - - This test sequence accesses the server endpoint at `/metadata` using a - `GET` request. It parses the Capability Statement and verifies that: - - * The endpoint is secured by an appropriate cryptographic protocol - * The resource matches the expected FHIR version defined by the tests - * The resource is a valid FHIR resource - * The server claims support for JSON encoding of resources - * The server claims support for the Patient resource and one other - resource - - It collects the following information that is saved in the testing session - for use by later tests: - - * List of resources supported - * List of queries parameters supported - ) + description Helpers.get_capability_statement_group_description_text('Capability Statement') run_as_group PROFILES = { diff --git a/lib/au_core_test_kit/generated/v0.3.0/summary.md b/lib/au_core_test_kit/generated/v0.3.0/summary.md index 89453700..34d1fd0a 100644 --- a/lib/au_core_test_kit/generated/v0.3.0/summary.md +++ b/lib/au_core_test_kit/generated/v0.3.0/summary.md @@ -1,7 +1,48 @@ # 1 AU Core FHIR API -# 1.1 Patient +# 1.1 CapabilityStatement + +#### Background +The Capability Statement Sequence tests a FHIR server's ability to formally describe +features supported by the API by using the [Capability +Statement](https://www.hl7.org/fhir/capabilitystatement.html) resource. +The features described in the Capability Statement must be consistent with +the required capabilities of a AU Core server. The Capability Statement +must also advertise the location of the required SMART on FHIR endpoints +that enable authenticated access to the FHIR server resources. + +The Capability Statement resource allows clients to determine which +resources are supported by a FHIR Server. Not all servers are expected to +implement all possible queries and data elements described in the AU Core +API. For example, the AU Core Implementation Guide requires that the +Patient resource and only one additional resource profile from the AU Core +Profiles. + +#### Testing Methodology + +This test sequence accesses the server endpoint at `/metadata` using a +`GET` request. It parses the Capability Statement and verifies that: + +* The endpoint is secured by an appropriate cryptographic protocol +* The resource matches the expected FHIR version defined by the tests +* The resource is a valid FHIR resource +* The server claims support for JSON encoding of resources +* The server claims support for the Patient resource and one other + resource + +It collects the following information that is saved in the testing session +for use by later tests: + +* List of resources supported +* List of queries parameters supported + + + + + + +# 1.2 Patient #### Background @@ -60,6 +101,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -68,10 +110,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.1.1 Search: _id (SHALL) +### 1.2.1 Search: _id (SHALL) **HTTP GET** @@ -88,7 +132,7 @@ Accept: application/fhir+json {test endpoint}/Patient?_id={_id} ``` -### 1.1.2 Search: family (SHOULD) +### 1.2.2 Search: family (SHOULD) **HTTP GET** @@ -105,7 +149,7 @@ Accept: application/fhir+json {test endpoint}/Patient?family={family} ``` -### 1.1.3 Search: identifier (SHALL) +### 1.2.3 Search: identifier (SHALL) **HTTP GET** @@ -122,7 +166,7 @@ Accept: application/fhir+json {test endpoint}/Patient?identifier={identifier} ``` -### 1.1.4 Search: name (SHOULD) +### 1.2.4 Search: name (SHOULD) **HTTP GET** @@ -139,7 +183,7 @@ Accept: application/fhir+json {test endpoint}/Patient?name={name} ``` -### 1.1.5 Search: birthdate+family (SHOULD) +### 1.2.5 Search: birthdate+family (SHOULD) **HTTP GET** @@ -156,7 +200,7 @@ Accept: application/fhir+json {test endpoint}/Patient?birthdate={birthdate}&family={family} ``` -### 1.1.6 Search: birthdate+name (SHOULD) +### 1.2.6 Search: birthdate+name (SHOULD) **HTTP GET** @@ -173,7 +217,7 @@ Accept: application/fhir+json {test endpoint}/Patient?birthdate={birthdate}&name={name} ``` -### 1.1.7 Search: family+gender (SHOULD) +### 1.2.7 Search: family+gender (SHOULD) **HTTP GET** @@ -190,7 +234,7 @@ Accept: application/fhir+json {test endpoint}/Patient?family={family}&gender={gender} ``` -### 1.1.8 Search: gender+name (SHOULD) +### 1.2.8 Search: gender+name (SHOULD) **HTTP GET** @@ -208,7 +252,8 @@ Accept: application/fhir+json ``` -# 1.2 Observation Body Weight + +# 1.3 Observation Body Weight #### Background @@ -270,6 +315,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -278,10 +324,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.2.1 Search: patient+code (SHALL) +### 1.3.1 Search: patient+code (SHALL) **HTTP GET** @@ -298,7 +346,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.2.2 Search: patient (SHALL) +### 1.3.2 Search: patient (SHALL) **HTTP GET** @@ -315,7 +363,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.2.3 Search: patient+category (SHALL) +### 1.3.3 Search: patient+category (SHALL) **HTTP GET** @@ -332,7 +380,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.2.4 Search: patient+category+date (SHALL) +### 1.3.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -349,7 +397,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.2.5 Search: patient+category+status (SHALL) +### 1.3.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -366,7 +414,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.2.6 Search: patient+code+date (SHOULD) +### 1.3.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -384,7 +432,8 @@ Accept: application/fhir+json ``` -# 1.3 Observation Blood Pressure + +# 1.4 Observation Blood Pressure #### Background @@ -446,6 +495,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -454,10 +504,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.3.1 Search: patient+code (SHALL) +### 1.4.1 Search: patient+code (SHALL) **HTTP GET** @@ -474,7 +526,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.3.2 Search: patient (SHALL) +### 1.4.2 Search: patient (SHALL) **HTTP GET** @@ -491,7 +543,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.3.3 Search: patient+category (SHALL) +### 1.4.3 Search: patient+category (SHALL) **HTTP GET** @@ -508,7 +560,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.3.4 Search: patient+category+date (SHALL) +### 1.4.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -525,7 +577,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.3.5 Search: patient+category+status (SHALL) +### 1.4.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -542,7 +594,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.3.6 Search: patient+code+date (SHOULD) +### 1.4.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -560,7 +612,8 @@ Accept: application/fhir+json ``` -# 1.4 Observation Body Height + +# 1.5 Observation Body Height #### Background @@ -622,6 +675,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -630,10 +684,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.4.1 Search: patient+code (SHALL) +### 1.5.1 Search: patient+code (SHALL) **HTTP GET** @@ -650,7 +706,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.4.2 Search: patient (SHALL) +### 1.5.2 Search: patient (SHALL) **HTTP GET** @@ -667,7 +723,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.4.3 Search: patient+category (SHALL) +### 1.5.3 Search: patient+category (SHALL) **HTTP GET** @@ -684,7 +740,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.4.4 Search: patient+category+date (SHALL) +### 1.5.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -701,7 +757,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.4.5 Search: patient+category+status (SHALL) +### 1.5.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -718,7 +774,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.4.6 Search: patient+code+date (SHOULD) +### 1.5.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -736,7 +792,8 @@ Accept: application/fhir+json ``` -# 1.5 Observation Pathology Result + +# 1.6 Observation Pathology Result #### Background @@ -798,6 +855,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -806,10 +864,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.5.1 Search: patient+category (SHALL) +### 1.6.1 Search: patient+category (SHALL) **HTTP GET** @@ -826,7 +886,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.5.2 Search: patient (SHALL) +### 1.6.2 Search: patient (SHALL) **HTTP GET** @@ -843,7 +903,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.5.3 Search: patient+category+date (SHALL) +### 1.6.3 Search: patient+category+date (SHALL) **HTTP GET** @@ -860,7 +920,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.5.4 Search: patient+code (SHALL) +### 1.6.4 Search: patient+code (SHALL) **HTTP GET** @@ -877,7 +937,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.5.5 Search: patient+category+status (SHALL) +### 1.6.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -894,7 +954,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.5.6 Search: patient+code+date (SHOULD) +### 1.6.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -912,7 +972,8 @@ Accept: application/fhir+json ``` -# 1.6 Observation Body Temperature + +# 1.7 Observation Body Temperature #### Background @@ -974,6 +1035,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -982,10 +1044,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.6.1 Search: patient+code (SHALL) +### 1.7.1 Search: patient+code (SHALL) **HTTP GET** @@ -1002,7 +1066,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.6.2 Search: patient (SHALL) +### 1.7.2 Search: patient (SHALL) **HTTP GET** @@ -1019,7 +1083,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.6.3 Search: patient+category (SHALL) +### 1.7.3 Search: patient+category (SHALL) **HTTP GET** @@ -1036,7 +1100,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.6.4 Search: patient+category+date (SHALL) +### 1.7.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -1053,7 +1117,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.6.5 Search: patient+category+status (SHALL) +### 1.7.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -1070,7 +1134,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.6.6 Search: patient+code+date (SHOULD) +### 1.7.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -1088,7 +1152,8 @@ Accept: application/fhir+json ``` -# 1.7 Observation Heart Rate + +# 1.8 Observation Heart Rate #### Background @@ -1150,6 +1215,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -1158,10 +1224,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.7.1 Search: patient+code (SHALL) +### 1.8.1 Search: patient+code (SHALL) **HTTP GET** @@ -1178,7 +1246,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.7.2 Search: patient (SHALL) +### 1.8.2 Search: patient (SHALL) **HTTP GET** @@ -1195,7 +1263,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.7.3 Search: patient+category (SHALL) +### 1.8.3 Search: patient+category (SHALL) **HTTP GET** @@ -1212,7 +1280,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.7.4 Search: patient+category+date (SHALL) +### 1.8.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -1229,7 +1297,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.7.5 Search: patient+category+status (SHALL) +### 1.8.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -1246,7 +1314,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.7.6 Search: patient+code+date (SHOULD) +### 1.8.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -1264,7 +1332,8 @@ Accept: application/fhir+json ``` -# 1.8 Observation Waist Circumference + +# 1.9 Observation Waist Circumference #### Background @@ -1326,6 +1395,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -1334,10 +1404,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.8.1 Search: patient+code (SHALL) +### 1.9.1 Search: patient+code (SHALL) **HTTP GET** @@ -1354,7 +1426,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.8.2 Search: patient (SHALL) +### 1.9.2 Search: patient (SHALL) **HTTP GET** @@ -1371,7 +1443,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.8.3 Search: patient+category (SHALL) +### 1.9.3 Search: patient+category (SHALL) **HTTP GET** @@ -1388,7 +1460,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.8.4 Search: patient+category+date (SHALL) +### 1.9.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -1405,7 +1477,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.8.5 Search: patient+category+status (SHALL) +### 1.9.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -1422,7 +1494,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.8.6 Search: patient+code+date (SHOULD) +### 1.9.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -1440,7 +1512,8 @@ Accept: application/fhir+json ``` -# 1.9 Observation Respiration Rate + +# 1.10 Observation Respiration Rate #### Background @@ -1502,6 +1575,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -1510,10 +1584,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.9.1 Search: patient+code (SHALL) +### 1.10.1 Search: patient+code (SHALL) **HTTP GET** @@ -1530,7 +1606,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.9.2 Search: patient (SHALL) +### 1.10.2 Search: patient (SHALL) **HTTP GET** @@ -1547,7 +1623,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.9.3 Search: patient+category (SHALL) +### 1.10.3 Search: patient+category (SHALL) **HTTP GET** @@ -1564,7 +1640,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.9.4 Search: patient+category+date (SHALL) +### 1.10.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -1581,7 +1657,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.9.5 Search: patient+category+status (SHALL) +### 1.10.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -1598,7 +1674,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.9.6 Search: patient+code+date (SHOULD) +### 1.10.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -1616,7 +1692,8 @@ Accept: application/fhir+json ``` -# 1.10 Observation Diagnostic Result + +# 1.11 Observation Diagnostic Result #### Background @@ -1678,6 +1755,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -1686,10 +1764,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.10.1 Search: patient (SHALL) +### 1.11.1 Search: patient (SHALL) **HTTP GET** @@ -1706,7 +1786,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.10.2 Search: patient+category (SHALL) +### 1.11.2 Search: patient+category (SHALL) **HTTP GET** @@ -1723,7 +1803,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.10.3 Search: patient+category+date (SHALL) +### 1.11.3 Search: patient+category+date (SHALL) **HTTP GET** @@ -1740,7 +1820,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.10.4 Search: patient+code (SHALL) +### 1.11.4 Search: patient+code (SHALL) **HTTP GET** @@ -1757,7 +1837,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.10.5 Search: patient+category+status (SHALL) +### 1.11.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -1774,7 +1854,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.10.6 Search: patient+code+date (SHOULD) +### 1.11.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -1792,7 +1872,8 @@ Accept: application/fhir+json ``` -# 1.11 Observation Smoking Status + +# 1.12 Observation Smoking Status #### Background @@ -1854,6 +1935,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -1862,10 +1944,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.11.1 Search: patient+code (SHALL) +### 1.12.1 Search: patient+code (SHALL) **HTTP GET** @@ -1882,7 +1966,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&code={code} ``` -### 1.11.2 Search: patient (SHALL) +### 1.12.2 Search: patient (SHALL) **HTTP GET** @@ -1899,7 +1983,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient} ``` -### 1.11.3 Search: patient+category (SHALL) +### 1.12.3 Search: patient+category (SHALL) **HTTP GET** @@ -1916,7 +2000,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category} ``` -### 1.11.4 Search: patient+category+date (SHALL) +### 1.12.4 Search: patient+category+date (SHALL) **HTTP GET** @@ -1933,7 +2017,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&date={date} ``` -### 1.11.5 Search: patient+category+status (SHALL) +### 1.12.5 Search: patient+category+status (SHALL) **HTTP GET** @@ -1950,7 +2034,7 @@ Accept: application/fhir+json {test endpoint}/Observation?patient={patient}&category={category}&status={status} ``` -### 1.11.6 Search: patient+code+date (SHOULD) +### 1.12.6 Search: patient+code+date (SHOULD) **HTTP GET** @@ -1968,7 +2052,8 @@ Accept: application/fhir+json ``` -# 1.12 AllergyIntolerance + +# 1.13 AllergyIntolerance #### Background @@ -2026,6 +2111,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2034,10 +2120,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.12.1 Search: patient (SHALL) +### 1.13.1 Search: patient (SHALL) **HTTP GET** @@ -2054,7 +2142,7 @@ Accept: application/fhir+json {test endpoint}/AllergyIntolerance?patient={patient} ``` -### 1.12.2 Search: patient+clinical-status (SHOULD) +### 1.13.2 Search: patient+clinical-status (SHOULD) **HTTP GET** @@ -2072,7 +2160,8 @@ Accept: application/fhir+json ``` -# 1.13 Condition + +# 1.14 Condition #### Background @@ -2132,6 +2221,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2140,10 +2230,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.13.1 Search: patient (SHALL) +### 1.14.1 Search: patient (SHALL) **HTTP GET** @@ -2160,7 +2252,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient} ``` -### 1.13.2 Search: patient+category (SHALL) +### 1.14.2 Search: patient+category (SHALL) **HTTP GET** @@ -2177,7 +2269,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&category={category} ``` -### 1.13.3 Search: patient+clinical-status (SHALL) +### 1.14.3 Search: patient+clinical-status (SHALL) **HTTP GET** @@ -2194,7 +2286,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&clinical-status={clinical-status} ``` -### 1.13.4 Search: patient+category+clinical-status (SHOULD) +### 1.14.4 Search: patient+category+clinical-status (SHOULD) **HTTP GET** @@ -2211,7 +2303,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&category={category}&clinical-status={clinical-status} ``` -### 1.13.5 Search: patient+code (SHOULD) +### 1.14.5 Search: patient+code (SHOULD) **HTTP GET** @@ -2228,7 +2320,7 @@ Accept: application/fhir+json {test endpoint}/Condition?patient={patient}&code={code} ``` -### 1.13.6 Search: patient+onset-date (SHOULD) +### 1.14.6 Search: patient+onset-date (SHOULD) **HTTP GET** @@ -2246,7 +2338,8 @@ Accept: application/fhir+json ``` -# 1.14 Encounter + +# 1.15 Encounter #### Background @@ -2305,6 +2398,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2313,10 +2407,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.14.1 Search: patient (SHALL) +### 1.15.1 Search: patient (SHALL) **HTTP GET** @@ -2333,7 +2429,7 @@ Accept: application/fhir+json {test endpoint}/Encounter?patient={patient} ``` -### 1.14.2 Search: date+patient (SHALL) +### 1.15.2 Search: date+patient (SHALL) **HTTP GET** @@ -2350,7 +2446,7 @@ Accept: application/fhir+json {test endpoint}/Encounter?date={date}&patient={patient} ``` -### 1.14.3 Search: class+patient (SHOULD) +### 1.15.3 Search: class+patient (SHOULD) **HTTP GET** @@ -2367,7 +2463,7 @@ Accept: application/fhir+json {test endpoint}/Encounter?class={class}&patient={patient} ``` -### 1.14.4 Search: patient+discharge-disposition (SHOULD) +### 1.15.4 Search: patient+discharge-disposition (SHOULD) **HTTP GET** @@ -2384,7 +2480,7 @@ Accept: application/fhir+json {test endpoint}/Encounter?patient={patient}&discharge-disposition={discharge-disposition} ``` -### 1.14.5 Search: patient+location (SHOULD) +### 1.15.5 Search: patient+location (SHOULD) **HTTP GET** @@ -2401,7 +2497,7 @@ Accept: application/fhir+json {test endpoint}/Encounter?patient={patient}&location={location} ``` -### 1.14.6 Search: patient+status (SHOULD) +### 1.15.6 Search: patient+status (SHOULD) **HTTP GET** @@ -2418,7 +2514,7 @@ Accept: application/fhir+json {test endpoint}/Encounter?patient={patient}&status={status} ``` -### 1.14.7 Search: patient+type (SHOULD) +### 1.15.7 Search: patient+type (SHOULD) **HTTP GET** @@ -2436,7 +2532,8 @@ Accept: application/fhir+json ``` -# 1.15 Immunization + +# 1.16 Immunization #### Background @@ -2495,6 +2592,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2503,10 +2601,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.15.1 Search: patient (SHALL) +### 1.16.1 Search: patient (SHALL) **HTTP GET** @@ -2523,7 +2623,7 @@ Accept: application/fhir+json {test endpoint}/Immunization?patient={patient} ``` -### 1.15.2 Search: patient+status (SHALL) +### 1.16.2 Search: patient+status (SHALL) **HTTP GET** @@ -2540,7 +2640,7 @@ Accept: application/fhir+json {test endpoint}/Immunization?patient={patient}&status={status} ``` -### 1.15.3 Search: patient+date (SHOULD) +### 1.16.3 Search: patient+date (SHOULD) **HTTP GET** @@ -2558,7 +2658,8 @@ Accept: application/fhir+json ``` -# 1.16 MedicationRequest + +# 1.17 MedicationRequest #### Background @@ -2621,6 +2722,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2629,10 +2731,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.16.1 Search: patient (SHALL) +### 1.17.1 Search: patient (SHALL) **HTTP GET** @@ -2649,7 +2753,7 @@ Accept: application/fhir+json {test endpoint}/MedicationRequest?patient={patient} ``` -### 1.16.2 Search: _id (SHALL) +### 1.17.2 Search: _id (SHALL) **HTTP GET** @@ -2666,7 +2770,7 @@ Accept: application/fhir+json {test endpoint}/MedicationRequest?_id={_id} ``` -### 1.16.3 Search: identifier (SHALL) +### 1.17.3 Search: identifier (SHALL) **HTTP GET** @@ -2683,7 +2787,7 @@ Accept: application/fhir+json {test endpoint}/MedicationRequest?identifier={identifier} ``` -### 1.16.4 Search: patient+intent (SHALL) +### 1.17.4 Search: patient+intent (SHALL) **HTTP GET** @@ -2700,7 +2804,7 @@ Accept: application/fhir+json {test endpoint}/MedicationRequest?patient={patient}&intent={intent} ``` -### 1.16.5 Search: patient+intent+status (SHALL) +### 1.17.5 Search: patient+intent+status (SHALL) **HTTP GET** @@ -2717,7 +2821,7 @@ Accept: application/fhir+json {test endpoint}/MedicationRequest?patient={patient}&intent={intent}&status={status} ``` -### 1.16.6 Search: patient+intent+authoredon (SHALL) +### 1.17.6 Search: patient+intent+authoredon (SHALL) **HTTP GET** @@ -2735,7 +2839,8 @@ Accept: application/fhir+json ``` -# 1.17 MedicationStatement + +# 1.18 MedicationStatement #### Background @@ -2794,6 +2899,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2802,10 +2908,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.17.1 Search: patient (SHALL) +### 1.18.1 Search: patient (SHALL) **HTTP GET** @@ -2822,7 +2930,7 @@ Accept: application/fhir+json {test endpoint}/MedicationStatement?patient={patient} ``` -### 1.17.2 Search: patient+status (SHALL) +### 1.18.2 Search: patient+status (SHALL) **HTTP GET** @@ -2839,7 +2947,7 @@ Accept: application/fhir+json {test endpoint}/MedicationStatement?patient={patient}&status={status} ``` -### 1.17.3 Search: patient+effective (SHOULD) +### 1.18.3 Search: patient+effective (SHOULD) **HTTP GET** @@ -2857,7 +2965,8 @@ Accept: application/fhir+json ``` -# 1.18 Procedure + +# 1.19 Procedure #### Background @@ -2916,6 +3025,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -2924,10 +3034,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.18.1 Search: patient (SHALL) +### 1.19.1 Search: patient (SHALL) **HTTP GET** @@ -2944,7 +3056,7 @@ Accept: application/fhir+json {test endpoint}/Procedure?patient={patient} ``` -### 1.18.2 Search: patient+date (SHALL) +### 1.19.2 Search: patient+date (SHALL) **HTTP GET** @@ -2961,7 +3073,7 @@ Accept: application/fhir+json {test endpoint}/Procedure?patient={patient}&date={date} ``` -### 1.18.3 Search: patient+code+date (SHOULD) +### 1.19.3 Search: patient+code+date (SHOULD) **HTTP GET** @@ -2978,7 +3090,7 @@ Accept: application/fhir+json {test endpoint}/Procedure?patient={patient}&code={code}&date={date} ``` -### 1.18.4 Search: patient+status (SHOULD) +### 1.19.4 Search: patient+status (SHOULD) **HTTP GET** @@ -2996,7 +3108,8 @@ Accept: application/fhir+json ``` -# 1.19 Organization + +# 1.20 Organization #### Background @@ -3056,6 +3169,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -3064,10 +3178,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.19.1 Search: _id (SHOULD) +### 1.20.1 Search: _id (SHOULD) **HTTP GET** @@ -3084,7 +3200,7 @@ Accept: application/fhir+json {test endpoint}/Organization?_id={_id} ``` -### 1.19.2 Search: address (SHALL) +### 1.20.2 Search: address (SHALL) **HTTP GET** @@ -3101,7 +3217,7 @@ Accept: application/fhir+json {test endpoint}/Organization?address={address} ``` -### 1.19.3 Search: identifier (SHALL) +### 1.20.3 Search: identifier (SHALL) **HTTP GET** @@ -3118,7 +3234,7 @@ Accept: application/fhir+json {test endpoint}/Organization?identifier={identifier} ``` -### 1.19.4 Search: name (SHALL) +### 1.20.4 Search: name (SHALL) **HTTP GET** @@ -3136,7 +3252,8 @@ Accept: application/fhir+json ``` -# 1.20 Practitioner + +# 1.21 Practitioner #### Background @@ -3195,6 +3312,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -3203,10 +3321,12 @@ read succeeds. * search-type (SHALL) + + ## Test scenarios -### 1.20.1 Search: _id (SHALL) +### 1.21.1 Search: _id (SHALL) **HTTP GET** @@ -3223,7 +3343,7 @@ Accept: application/fhir+json {test endpoint}/Practitioner?_id={_id} ``` -### 1.20.2 Search: identifier (SHALL) +### 1.21.2 Search: identifier (SHALL) **HTTP GET** @@ -3240,7 +3360,7 @@ Accept: application/fhir+json {test endpoint}/Practitioner?identifier={identifier} ``` -### 1.20.3 Search: name (SHOULD) +### 1.21.3 Search: name (SHOULD) **HTTP GET** @@ -3258,7 +3378,8 @@ Accept: application/fhir+json ``` -# 1.21 Provenance + +# 1.22 Provenance #### Background @@ -3293,6 +3414,7 @@ The test will attempt to read each reference found and will fail if no read succeeds. + ## Interactions @@ -3301,6 +3423,5 @@ read succeeds. * search-type (MAY) -## Test scenarios diff --git a/lib/au_core_test_kit/generator/mdsummary_generator.rb b/lib/au_core_test_kit/generator/mdsummary_generator.rb index 59c5db04..591478fd 100644 --- a/lib/au_core_test_kit/generator/mdsummary_generator.rb +++ b/lib/au_core_test_kit/generator/mdsummary_generator.rb @@ -39,7 +39,6 @@ def generate end def resource_list - # TODO: Add CapabilityStatement groups = ig_metadata.ordered_groups.reject { |group| ["Location", "Medication", "PractitionerRole"].include? group.resource } mapped_groups = groups.map.with_index do |group, index| title = group.title @@ -64,7 +63,7 @@ def resource_list { 'title' => title, 'resource' => resource_type, - 'position' => index + 1, + 'position' => index + 2, 'profile_url' => profile_url, 'description' => group_description, 'interactions' => group.interactions.map do |interaction| @@ -83,6 +82,18 @@ def resource_list end } end + mapped_groups.unshift( + { + 'title' => "CapabilityStatement", + 'resource' => "CapabilityStatement", + 'position' => 1, + 'profile_url' => "CapabilityStatement", + 'description' => Helpers.get_capability_statement_group_description_text('Capability Statement', false), + 'interactions' => [], + 'searches' => [] + } + ) + mapped_groups end def make_search_string(resource_name, search_names) diff --git a/lib/au_core_test_kit/generator/templates/summary.md.erb b/lib/au_core_test_kit/generator/templates/summary.md.erb index f5d80108..34b6befe 100644 --- a/lib/au_core_test_kit/generator/templates/summary.md.erb +++ b/lib/au_core_test_kit/generator/templates/summary.md.erb @@ -5,12 +5,15 @@ <%= resource_data["description"] %> +<% if resource_data["interactions"].any? %> ## Interactions <% resource_data["interactions"].each do |interaction| %> * <%= interaction["code"] %> (<%= interaction["expectation"] %>) <% end %> +<% end %> +<% if resource_data["searches"].any? %> ## Test scenarios <% resource_data["searches"].each do |search_data| %> @@ -31,4 +34,5 @@ Accept: application/fhir+json {test endpoint}<%= search_data["search_string"] %> ``` <% end %> +<% end %> <% end %> \ No newline at end of file diff --git a/lib/au_core_test_kit/helpers.rb b/lib/au_core_test_kit/helpers.rb index 0dcfb7ec..bcde9ac5 100644 --- a/lib/au_core_test_kit/helpers.rb +++ b/lib/au_core_test_kit/helpers.rb @@ -5,6 +5,47 @@ def self.extract_extensions_from_resource(resource, extensions=[]) extensions end + def self.get_capability_statement_group_description_text(title, for_group_description=true) + background_title = for_group_description ? "# Background" : "#### Background" + testing_methodology_title = for_group_description ? "# Testing Methodology" : "#### Testing Methodology" + + <<~DESCRIPTION + #{background_title} + The #{title} Sequence tests a FHIR server's ability to formally describe + features supported by the API by using the [Capability + Statement](https://www.hl7.org/fhir/capabilitystatement.html) resource. + The features described in the Capability Statement must be consistent with + the required capabilities of a AU Core server. The Capability Statement + must also advertise the location of the required SMART on FHIR endpoints + that enable authenticated access to the FHIR server resources. + + The Capability Statement resource allows clients to determine which + resources are supported by a FHIR Server. Not all servers are expected to + implement all possible queries and data elements described in the AU Core + API. For example, the AU Core Implementation Guide requires that the + Patient resource and only one additional resource profile from the AU Core + Profiles. + + #{testing_methodology_title} + + This test sequence accesses the server endpoint at `/metadata` using a + `GET` request. It parses the Capability Statement and verifies that: + + * The endpoint is secured by an appropriate cryptographic protocol + * The resource matches the expected FHIR version defined by the tests + * The resource is a valid FHIR resource + * The server claims support for JSON encoding of resources + * The server claims support for the Patient resource and one other + resource + + It collects the following information that is saved in the testing session + for use by later tests: + + * List of resources supported + * List of queries parameters supported + DESCRIPTION + end + def self.get_group_description_text(title, resource_type, profile_name, group_version, profile_url, required_searches, search_param_name_string, search_validation_resource_type, for_group_description=true) From 4e5b186d612d36a676d0c3fc4501a8cdf8e86366 Mon Sep 17 00:00:00 2001 From: Pavel R Date: Wed, 13 Mar 2024 15:35:02 +0100 Subject: [PATCH 3/3] Refactor MDSummaryGenerator Ref: https://github.com/hl7au/au-fhir-core-inferno/issues/4 --- .../generator/mdsummary_generator.rb | 112 ++++++++++-------- 1 file changed, 61 insertions(+), 51 deletions(-) diff --git a/lib/au_core_test_kit/generator/mdsummary_generator.rb b/lib/au_core_test_kit/generator/mdsummary_generator.rb index 591478fd..6fc4abab 100644 --- a/lib/au_core_test_kit/generator/mdsummary_generator.rb +++ b/lib/au_core_test_kit/generator/mdsummary_generator.rb @@ -2,6 +2,9 @@ require_relative 'special_cases' require_relative '../helpers' +# Resources that we don't need to show in the summary exhibit behavior similar to that of the generated test groups. +EXCLUDED_RESOURCES = %w[Location Medication PractitionerRole] + module AUCoreTestKit class Generator class MDSummaryGenerator @@ -38,62 +41,69 @@ def generate File.open(output_file_name, 'w') { |f| f.write(output) } end - def resource_list - groups = ig_metadata.ordered_groups.reject { |group| ["Location", "Medication", "PractitionerRole"].include? group.resource } - mapped_groups = groups.map.with_index do |group, index| - title = group.title - resource_type = group.resource - profile_name = group.profile_name - profile_url = group.profile_url - required_searches = group.searches.select { |search| search[:expectation] == 'SHALL' } - search_param_name_string = required_searches - .map { |search| search[:names].join(' + ') } - .map { |names| "* #{names}" } - .join("\n") - search_validation_resource_type = "#{resource_type} resources" - group_description = Helpers.get_group_description_text(title, - resource_type, - profile_name, - group.version, - profile_url, - required_searches, - search_param_name_string, - search_validation_resource_type, - false) + def prepare_interactions(interactions) + interactions.map do |interaction| { - 'title' => title, - 'resource' => resource_type, - 'position' => index + 2, - 'profile_url' => profile_url, - 'description' => group_description, - 'interactions' => group.interactions.map do |interaction| - { - 'code' => interaction[:code], - 'expectation' => interaction[:expectation], - } - end, - 'searches' => group.searches.map.with_index do |search, index| - { - 'names' => search[:names], - 'expectation' => search[:expectation], - 'search_string' => make_search_string(group.resource, search[:names]), - 'position' => index + 1 - } - end + 'code' => interaction[:code], + 'expectation' => interaction[:expectation], } end - mapped_groups.unshift( + end + + def prepare_searches(searches, resource_name) + searches.map.with_index do |search, index| { - 'title' => "CapabilityStatement", - 'resource' => "CapabilityStatement", - 'position' => 1, - 'profile_url' => "CapabilityStatement", - 'description' => Helpers.get_capability_statement_group_description_text('Capability Statement', false), - 'interactions' => [], - 'searches' => [] + 'names' => search[:names], + 'expectation' => search[:expectation], + 'search_string' => make_search_string(resource_name, search[:names]), + 'position' => index + 1 } - ) - mapped_groups + end + end + + def prepare_group_description(group) + required_searches = group.searches.select { |search| search[:expectation] == 'SHALL' } + search_param_name_string = required_searches + .map { |search| search[:names].join(' + ') } + .map { |names| "* #{names}" } + .join("\n") + Helpers.get_group_description_text(group.title, + group.resource, + group.profile_name, + group.version, + group.profile_url, + required_searches, + search_param_name_string, + "#{group.resource} resources", + false) + end + + def map_group(group) + { + 'title' => group.title, + 'resource' => group.resource, + 'profile_url' => group.profile_url, + 'description' => prepare_group_description(group), + 'interactions' => prepare_interactions(group.interactions), + 'searches' => prepare_searches(group.searches, group.resource) + } + end + + def capability_statement_group + { + 'title' => "CapabilityStatement", + 'resource' => "CapabilityStatement", + 'profile_url' => "CapabilityStatement", + 'description' => Helpers.get_capability_statement_group_description_text('Capability Statement', false), + 'interactions' => [], + 'searches' => [] + } + end + + def resource_list + filtered_profile_groups = ig_metadata.ordered_groups.reject { |group| EXCLUDED_RESOURCES.include? group.resource } + all_profiles_groups = [capability_statement_group] + filtered_profile_groups.map { |group| map_group(group) } + all_profiles_groups.map.with_index(1) {|hash, index| hash.merge({"position" => index}) } end def make_search_string(resource_name, search_names)