JohnMoehrke Consent with Segmented data - Testing Guide (TG)
0.1.0-current - ci-build International flag

JohnMoehrke Consent with Segmented data - Testing Guide (TG), published by John Moehrke (himself). This guide is not an authorized publication; it is the continuous build for version 0.1.0-current built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/JohnMoehrke/ConsentWithSeg-testing/ and changes regularly. See the Directory of published versions

: The test plan for the IG - XML Representation

Page standards status: Informative

Raw xml | Download


<TestPlan xmlns="http://hl7.org/fhir">
  <id value="theTestPlan"/>
  <url
       value="http://johnmoehrke.github.io/ConsentWithSeg-testing/TestPlan/theTestPlan"/>
  <version value="0.1.0-current"/>
  <status value="active"/>
  <date value="2024-11-20T15:14:57+00:00"/>
  <publisher value="John Moehrke (himself)"/>
  <contact>
    <name value="John Moehrke (himself)"/>
    <telecom>
      <system value="url"/>
      <value value="http://healthcaresecprivacy.blogspot.com"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="JohnMoehrke@gmail.com"/>
    </telecom>
  </contact>
  <contact>
    <name value="John Moehrke (himself)"/>
    <telecom>
      <system value="email"/>
      <value value="JohnMoehrke@gmail.com"/>
    </telecom>
  </contact>
  <description value="Test user access against various kinds of Consent"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <testTools value="some good tool"/>
  <testCase>
    <sequence value="1"/>
    <scope>🔗 
      <reference value="Consent/ex-consent-treat"/>
    </scope>
    <testRun>
      <narrative
                 value="```Gherkin
Feature: Basic Consent 

Background: purpose of use is allowed

Scenario: User requests access and is authorized due to basic consent 

Scenario Outline: basic
  Given @ConsentRecorder has or has not recorded a \&lt;Consent\&gt;
    And default rule is \&lt;default\&gt;
  When \&lt;user\&gt; uses @UserApp to request access control token
    And @AccessControlDecider actor consults the @ConsentRepository
    And \&lt;Consent\&gt; 
  Then Authorization \&lt;auth\&gt;

Examples:

  | Consent | default | User  | auth   |
  |---------|---------|-------|--------|
  | none    | deny    | User1 | deny   |
  | none    | deny    | User2 | deny   |
  | none    | permit  | User1 | permit |
  | none    | permit  | User2 | permit |
  | permit  | ~any~   | User1 | permit |
  | permit  | ~any~   | User2 | permit |
  | deny    | ~any~   | User1 | deny   |
  | deny    | ~any~   | User2 | deny   |
```"/>
      <script>
        <language>
          <coding>
            <system value="urn:ietf:bcp:13"/>
            <code value="text/x-gherkin"/>
          </coding>
          <text value="Gherkin"/>
        </language>
        <sourceReference>🔗 
          <reference value="DocumentReference/Dr-only-non-sensitive-script"/>
        </sourceReference>
      </script>
    </testRun>
  </testCase>
  <testCase>
    <sequence value="2"/>
    <scope>🔗 
      <reference value="Consent/ex-consent-treat"/>
    </scope>
    <testRun>
      <narrative value="Feature: todo"/>
    </testRun>
  </testCase>
  <testCase>
    <sequence value="3"/>
    <scope>🔗 
      <reference value="Consent/ex-consent-treat"/>
    </scope>
    <testRun>
      <narrative value="Feature: todo"/>
    </testRun>
  </testCase>
  <testCase>
    <sequence value="4"/>
    <scope>🔗 
      <reference value="Consent/ex-consent-treat"/>
    </scope>
    <testRun>
      <narrative
                 value="```Gherkin
Feature: Consent authorize activity for non-sensitive data

Scenario: User requests access and is permitted normal data due to Consent 
  Given ConsentRecorder records Consent
    And The Consent given is for the User
    And The Consent given restricts data for this user to non-sensitive data
  When User uses UserApp to request data
    And AccessControl actor consults the ConsentRepository
    And Consent is found, 
    And Consent found does authorize this user only for non-sensitive data
  Then Only non-sensitive data can be given
    And SLS inspects the Search Response bundle and tags sensitive data (R-ConfidentialityCode)
    And AccessEnforcement removes from the Search Response Bundle the data tagged as sensitive (R-ConfidentalityCode)
    And Only non-sensitive data is given
```"/>
      <script>
        <language>
          <coding>
            <system value="urn:ietf:bcp:13"/>
            <code value="text/x-gherkin"/>
          </coding>
          <text value="Gherkin"/>
        </language>
        <sourceReference>🔗 
          <reference value="DocumentReference/Dr-give-consent-script"/>
        </sourceReference>
      </script>
    </testRun>
  </testCase>
</TestPlan>