cancer_registry_reporting_test_kit 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cancer_registry_reporting_test_kit/ehr_suite.rb +14 -0
- data/lib/cancer_registry_reporting_test_kit/hdea_suite.rb +8 -0
- data/lib/cancer_registry_reporting_test_kit/requirements/{cancer-registry-reporting-test-kit_requirements.csv → cancer_registry_reporting_test_kit_requirements.csv} +213 -161
- data/lib/cancer_registry_reporting_test_kit/requirements/generated/{cancer-registry-reporting-test-kit_requirements_coverage.csv → ccrr_ehr_requirements_coverage.csv} +116 -161
- data/lib/cancer_registry_reporting_test_kit/requirements/generated/ccrr_v100_report_generation_requirements_coverage.csv +47 -0
- data/lib/cancer_registry_reporting_test_kit/requirements/hl7.fhir.us.central-cancer-registry-reporting_1.0.0_requirements.xlsx +0 -0
- data/lib/cancer_registry_reporting_test_kit/requirements/hl7.fhir.us.mcode_3.0.0_reqs.xlsx +0 -0
- data/lib/cancer_registry_reporting_test_kit/version.rb +2 -2
- data/lib/cancer_registry_reporting_test_kit.rb +0 -1
- metadata +7 -8
- data/lib/cancer_registry_reporting_test_kit/requirements/cancer-registry-reporting-test-kit_out_of_scope_requirements.csv +0 -77
- data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +0 -22
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +0 -284
- data/lib/requirements_config.yaml +0 -22
@@ -0,0 +1,47 @@
|
|
1
|
+
Req Set,ID,URL,Requirement,Conformance,Actors,Conditionality,Not Tested Reason,Not Tested Details,Cancer Registry Reporting Health Data Exchange App (HDEA) Test Suite Short ID(s),Cancer Registry Reporting Health Data Exchange App (HDEA) Test Suite Full ID(s)
|
2
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,2,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#must-support-definition,[HDEA] Systems SHALL be capable of processing resource instances [returned by EHRs] containing the MUST SUPPORT data elements without generating an error or causing the application to fail.,SHALL,HDEA,true,,,"",""
|
3
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,7,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#must-support-definition,[HDEA] Systems SHALL interpret missing data elements within resource instances returned from API requests as data not present.,SHALL,HDEA,true,,,"",""
|
4
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,10,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#must-support-definition,"When data is not available for any of the mandatory elements specified in the IG [for inclusion within a cancer report], a data absent reason extension should be added to satisfy the requirement along with an appropriate value from the [data-absent-reason value set](http://hl7.org/fhir/ValueSet/data-absent-reason)",SHOULD,HDEA,true,,,"",""
|
5
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,13,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#overall-security-requirements,Implementations must meet the general security requirements documented in [FHIR Security guidance](http://hl7.org/fhir/security.html),SHALL,"EHR,HDEA,Trusted Third Party,Cancer Registry",false,,,"",""
|
6
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,15,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#overall-security-requirements,Implementers of this IG SHOULD follow the [HIPAA guidance](https://www.naaccr.org/hippa) [(broken link)] to ensure applicable security and privacy laws are implemented.,SHOULD,"EHR,HDEA,Trusted Third Party,Cancer Registry",false,Not Verifiable,Broken link meaning that specific requirements are not known.,NA,NA
|
7
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,17,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#authentication-and-authorization-requirements,Health Data Exchange App[s] (backend services app[s]) ... are required to conform to the [MedMorph Authentication and Authorization Requirements](http://hl7.org/fhir/us/medmorph/STU1/spec.html#authentication-and-authorization-requirements) for the following interactions: HDEA accessing data from the EHR.,SHALL,HDEA,false,,,"",""
|
8
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,18,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#authentication-and-authorization-requirements,"Health Data Exchange App[s] (backend services app[s]) ... are required to conform to the [MedMorph Authentication and Authorization Requirements](http://hl7.org/fhir/us/medmorph/STU1/spec.html#authentication-and-authorization-requirements) for the following interactions:
|
9
|
+
HDEA posting data to the Central Cancer Registry data store via the TTP or directly to the Central Cancer Registry.",SHALL,HDEA,false,,,"",""
|
10
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,55,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#authorization-requirements-1,The HDEA SHALL support the [Authentication and Authorization Requirements](https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#authentication-and-authorization-requirements) outlined above as a client.,SHALL,HDEA,false,,,"",""
|
11
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,56,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#subscription-requirements-1,The HDEA SHALL create Subscriptions for the [encounter-end Subscription Topic](http://hl7.org/fhir/us/medmorph/STU1/StructureDefinition-medmorph-encounter-end-subscription.html),SHALL,HDEA,false,,,"",""
|
12
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,57,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#subscription-requirements-1,The HDEA SHALL support [rest-hook](http://hl7.org/fhir/R4/subscription.html#2.46.7.1) Subscription channel to receive notifications from the EHR.,SHALL,HDEA,false,,,"",""
|
13
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,58,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#subscription-notification-api,The HDEA SHALL support a POST API /receive-notification with a payload of the Subscription Notification Bundle to receive the notifications from the EHR,SHALL,HDEA,true,,,"",""
|
14
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,59,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,The HDEA SHALL allow the healthcare organization to activate ... a specific Knowledge Artifact. Activation indicates applying the Knowledge Artifact ... for events occurring within the healthcare organization,SHALL,HDEA,false,,,"",""
|
15
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,60,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,The HDEA SHALL allow the healthcare organization to … deactivate a specific Knowledge Artifact. …deactivation indicates not applying the Knowledge Artifact for events occurring within the healthcare organization,SHALL,HDEA,false,,,"",""
|
16
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,61,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,HDEA SHALL process the MedMorph Central Cancer Registry Reporting Knowledge Artifact and create Subscription resources in the EHR for each trigger event.,SHALL,HDEA,true,,,"",""
|
17
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,62,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,"For the Central Cancer Registry Reporting IG, the HDEA SHALL create the Subscription for the [encounter-close Subscription Topic](http://hl7.org/fhir/us/medmorph/STU1/StructureDefinition-medmorph-encounter-end-subscription.html) trigger event",SHALL,HDEA,true,,,"",""
|
18
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,63,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,"Upon deactivation of a Knowledge Artifact, The HDEA SHALL delete the Subscriptions previously created by the BSA (Backend service app /aka HDEA) for the Knowledge Artifact. (e.g delete the Subscription created for encounter-close trigger event)",SHALL,HDEA,true,,,"",""
|
19
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,64,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,The HDEA SHALL implement FhirPath expression processing to process the Central Cancer Registry Reporting Knowledge Artifact actions,SHALL,HDEA,true,,,"",""
|
20
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,65,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,The HDEA SHALL use the default queries outlined by the Central Cancer Registry Reporting Knowledge Artifact unless overridden by the healthcare organization,SHALL,HDEA,true,,,"",""
|
21
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,66,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#knowledge-artifact-processing-requirements,The HDEA SHALL ensure no duplicate reports are submitted for the same patient and encounter occurring within a healthcare organization,SHALL,HDEA,true,,,"",""
|
22
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,67,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#data-api-requirements-1,The HDEA acting as a client SHALL use the APIs as outlined in the [EHR Capability Statement](https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/CapabilityStatement-central-cancer-registry-reporting-ehr.html) to access patient data from the EHR,SHALL,HDEA,false,,,"",""
|
23
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,68,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#report-generation-requirements,The HDEA SHALL create a central cancer registry report following the constraints identified in Central [Cancer Registry Content Bundle](https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-content-bundle.html),SHALL,HDEA,false,,,1,ccrr_v100_report_generation-ccrr_report_resources
|
24
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,69,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#report-generation-requirements,The HDEA SHALL package the central cancer registry report following the constraints identified [indicated by elements with the Must Support flag] in [Central Cancer Registry Reporting Bundle](https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-reporting-bundle.html).,SHALL,HDEA,false,,,"",""
|
25
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,70,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#report-generation-requirements,The HDEA SHALL submit the message containing the central cancer registry report to the endpoint identified in the MedMorph Central Cancer Registry Reporting Knowledge Artifact unless overridden by the healthcare organization,SHALL,HDEA,true,,,"",""
|
26
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,71,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#report-generation-requirements,The HDEA SHALL submit the message containing the central cancer registry report to the endpoint identified in the MedMorph Central Cancer Registry Reporting Knowledge Artifact (when) overidden by the healthcare organization,SHALL NOT,HDEA,true,,,"",""
|
27
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,72,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#medmorph-ra-requirements,The HDEA SHALL implement the MedMorph HDEA requirements as outlined in the [MedMorph HDEA requirements](http://hl7.org/fhir/us/medmorph/STU1/CapabilityStatement-medmorph-healthdata-exchange-app-client.html),SHALL,HDEA,false,,,"",""
|
28
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,83,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The subject element of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD be the] Patient who is the subject of the closed encounter,SHOULD,HDEA,false,,,"",""
|
29
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,84,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The encounter element of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD be t]he encounter that triggered the HDEA (i.e, closed encounter)",SHOULD,HDEA,false,,,"",""
|
30
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,85,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The] Primary Cancer Condition [section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] Condition[s] with a category of “encounter-diagnosis” for the closed encounter with a Condition.code value that is on the reportability list. All Conditions ... [which] do not have a clinicalStatuses of inactive can be considered to determine the primary cancer condition along with a verificationStatus of confirmed.,SHOULD,HDEA,true,,,"",""
|
31
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,86,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The] Secondary Cancer Condition [section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] Condition[s] with a category of “encounter-diagnosis” for the closed encounter with a Condition.code that is present in the Secondary Cancer Disorder Value Set.All Conditions ... [which] do not have a clinicalStatuses of inactive can be considered to determine the primary cancer condition along with a verificationStatus of Confirmed,SHOULD,HDEA,true,,,"",""
|
32
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,87,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The] Cancer Stage Group [section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain a]ll Observations with the Cancer Stage Group information and a status of final, amended, or corrected",SHOULD,HDEA,false,,,"",""
|
33
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,88,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) MAY contain all] TNM Primary Tumor Category: ... Observation with TNM tumor information having a status of final, amended, or corrected",SHOULD,HDEA,false,,,"",""
|
34
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,89,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) MAY contain all] TNM Regional Nodes Category: ... Observation with TNM Regional Nodes information having a status of final, amended, or corrected",SHOULD,HDEA,false,,,"",""
|
35
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,90,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) MAY contain all] TNM Distant Metastases Category: ... Observation with TNM Metastases information having a status of final, amended, or corrected",SHOULD,HDEA,false,,,"",""
|
36
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,91,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The] Radiotherapy Course Summary [section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain a]ll Procedures with the Radiotherapy course summary information having a status of completed, not-done, stopped, entered-in-error, unknown and a category of 108290001-Radiation Oncology and/or Radiotherapy (Procedure).",SHOULD,HDEA,true,,,"",""
|
37
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,92,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The Plan of Care section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] Cancer-Related Medication Request[s]: Medications requested during the closed encounter with a status of active, completed, cancelled, entered-in-error, stopped, unknown and an intent of order.",SHOULD,HDEA,true,,,"",""
|
38
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,93,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The Medications Administered section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] Cancer-Related Medication Administration: Medications administered during the closed encounter with a status of completed, in-progress, entered-in-error, stopped or unknown.",SHOULD,HDEA,true,,,"",""
|
39
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,94,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The ODH section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] Usual Work information for the patient with a status of final.,SHOULD,HDEA,false,,,"",""
|
40
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,95,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The Results section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all r]esults linked to the encounter or ordered during the encounter or results received during the Encounter with a status of final,SHOULD,HDEA,true,,,"",""
|
41
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,96,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,"[The Vital Signs section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain a]ll vital signs for the encounter with a status of final, corrected, unknown or amended",SHOULD,HDEA,false,,,"",""
|
42
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,97,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The Procedures section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all p]rocedures performed during the closed encounter with a status of completed or unknown.,SHOULD,HDEA,true,,,"",""
|
43
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,98,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The Results section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] DiagnosticReport Profile for Laboratory Results Reporting [instances representing r]esults linked to the encounter or ordered during the encounter or results received during the Encounter and a Status of final,SHOULD,HDEA,true,,,"",""
|
44
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,99,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The Notes section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] DiagnosticReport Profile for Report and Note exchange [instances representing r]esults linked to the encounter or ordered during the encounter or results received during the Encounter and a Status of final,SHOULD,HDEA,true,,,"",""
|
45
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,100,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The Notes section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] DocumentReference [instances representing] ... notes created during the encounter with a status of current,SHOULD,HDEA,false,,,"",""
|
46
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,101,https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html#guidance-on-populating-the-data-for-each-section,[The Social History section of the [Central Cancer Registry Report Composition](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/StructureDefinition-ccrr-composition.html) SHOULD contain all] Smoking Status [Observations] associated with the patient with a status of final.,SHOULD,HDEA,false,,,"",""
|
47
|
+
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,102,https://www.hl7.org/fhir/us/central-cancer-registry-reporting/STU1/spec.html#must-support-definition,[HDEA] Systems SHALL be capable of populating data elements as specified by the profiles [with the must support flag],SHALL,HDEA,true,,,1,ccrr_v100_report_generation-ccrr_report_resources
|
Binary file
|
Binary file
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'cancer_registry_reporting_test_kit/metadata'
|
4
|
-
require_relative 'inferno_requirements_tools/ext/inferno_core/runnable'
|
5
4
|
require_relative 'cancer_registry_reporting_test_kit/ehr_suite'
|
6
5
|
require_relative 'cancer_registry_reporting_test_kit/hdea_suite'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cancer_registry_reporting_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inferno Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
@@ -315,16 +315,15 @@ files:
|
|
315
315
|
- lib/cancer_registry_reporting_test_kit/metadata.rb
|
316
316
|
- lib/cancer_registry_reporting_test_kit/must_support_test.rb
|
317
317
|
- lib/cancer_registry_reporting_test_kit/primitive_type.rb
|
318
|
-
- lib/cancer_registry_reporting_test_kit/requirements/
|
319
|
-
- lib/cancer_registry_reporting_test_kit/requirements/
|
320
|
-
- lib/cancer_registry_reporting_test_kit/requirements/generated/
|
318
|
+
- lib/cancer_registry_reporting_test_kit/requirements/cancer_registry_reporting_test_kit_requirements.csv
|
319
|
+
- lib/cancer_registry_reporting_test_kit/requirements/generated/ccrr_ehr_requirements_coverage.csv
|
320
|
+
- lib/cancer_registry_reporting_test_kit/requirements/generated/ccrr_v100_report_generation_requirements_coverage.csv
|
321
|
+
- lib/cancer_registry_reporting_test_kit/requirements/hl7.fhir.us.central-cancer-registry-reporting_1.0.0_requirements.xlsx
|
322
|
+
- lib/cancer_registry_reporting_test_kit/requirements/hl7.fhir.us.mcode_3.0.0_reqs.xlsx
|
321
323
|
- lib/cancer_registry_reporting_test_kit/search_test.rb
|
322
324
|
- lib/cancer_registry_reporting_test_kit/search_test_properties.rb
|
323
325
|
- lib/cancer_registry_reporting_test_kit/validation_test.rb
|
324
326
|
- lib/cancer_registry_reporting_test_kit/version.rb
|
325
|
-
- lib/inferno_requirements_tools/ext/inferno_core/runnable.rb
|
326
|
-
- lib/inferno_requirements_tools/tasks/requirements_coverage.rb
|
327
|
-
- lib/requirements_config.yaml
|
328
327
|
homepage: https://github.com/inferno-framework/cancer-registry-reporting-test-kit
|
329
328
|
licenses:
|
330
329
|
- Apache-2.0
|
@@ -1,77 +0,0 @@
|
|
1
|
-
Req Set,ID,Reason,Details
|
2
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,15,Not Verifiable,Broken link meaning that specific requirements are not known.
|
3
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,16,Not Tested,"Transport of data outside of US Core API use, including the use of MedMorph, is not yet mature enough to test."
|
4
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,17,Not Tested,"Transport of data outside of US Core API use, including the use of MedMorph, is not yet mature enough to test."
|
5
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,18,Not Tested,"Transport of data outside of US Core API use, including the use of MedMorph, is not yet mature enough to test."
|
6
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,22,Not Tested,"Requirement 101 nearly the same, but 101 goes into more detail."
|
7
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,23,Not Tested,Attestation
|
8
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,36,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
9
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,37,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
10
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,38,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
11
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,39,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
12
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,40,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
13
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,41,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
14
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,42,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
15
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,44,Not Tested,
|
16
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,46,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
17
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,47,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
18
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,48,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
19
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,49,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
20
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,50,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
21
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,51,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
22
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,52,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
23
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,53,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
24
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,56,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
25
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,57,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
26
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,58,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
27
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,59,Not Tested,Use of the MedMorph framework is not yet mature enough to test.
|
28
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,60,Not Tested,Use of the MedMorph framework is not yet mature enough to test.
|
29
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,61,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
30
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,62,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
31
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,63,Not Tested,"Use of the MedMorph framework, including the use of Subscriptions, is not yet mature enough to test."
|
32
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,64,Not Tested,Use of the MedMorph framework is not yet mature enough to test.
|
33
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,65,Not Tested,Use of the MedMorph framework is not yet mature enough to test.
|
34
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,67,Not Tested,Use of the EHR's APIs to access data will not be tested at this time.
|
35
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,69,Not Tested,"Use of the MedMorph framework, including its use of FHIR Messaging, is not yet mature enough to test."
|
36
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,70,Not Tested,"Use of the MedMorph framework, including its use of FHIR Messaging, is not yet mature enough to test."
|
37
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,71,Not Tested,"Use of the MedMorph framework, including its use of FHIR Messaging, is not yet mature enough to test."
|
38
|
-
hl7.fhir.us.central-cancer-registry-reporting_1.0.0,72,Not Tested,Use of the MedMorph framework is not yet mature enough to test.
|
39
|
-
hl7.fhir.us.mcode_3.0.0,2,Not Verifiable,"Cannot know from testing whether the resource ""should"" be for a primary or secondary cancer"
|
40
|
-
hl7.fhir.us.mcode_3.0.0,4,Not Tested,Focus on SHALL requirements
|
41
|
-
hl7.fhir.us.mcode_3.0.0,5,Not Tested,Focus on SHALL requirements
|
42
|
-
hl7.fhir.us.mcode_3.0.0,7,Not Verifiable,
|
43
|
-
hl7.fhir.us.mcode_3.0.0,8,Not Tested,Focus on SHALL requirements
|
44
|
-
hl7.fhir.us.mcode_3.0.0,10,Not Tested,Focus on SHALL requirements
|
45
|
-
hl7.fhir.us.mcode_3.0.0,13,Not Tested,Focus on SHALL requirements
|
46
|
-
hl7.fhir.us.mcode_3.0.0,14,Not Tested,Will test broadly that a data sender can return conformant PrimaryCancerDisorder resources
|
47
|
-
hl7.fhir.us.mcode_3.0.0,15,Not Verifiable,"""would reasonably be expected to conform to this profile"" is too subjective"
|
48
|
-
hl7.fhir.us.mcode_3.0.0,30,Not Tested,Focus on SHALL requirements
|
49
|
-
hl7.fhir.us.mcode_3.0.0,33,Not Tested,Focus on SHALL requirements
|
50
|
-
hl7.fhir.us.mcode_3.0.0,34,Not Tested,Focus on SHALL requirements
|
51
|
-
hl7.fhir.us.mcode_3.0.0,35,Not Verifiable,"Depending on the field (e.g. free text), it is difficult to check if a field's value is ""nonsense"""
|
52
|
-
hl7.fhir.us.mcode_3.0.0,37,Not Tested,Focus on SHALL requirements
|
53
|
-
hl7.fhir.us.mcode_3.0.0,38,Not Tested,Focus on the profiles that are required
|
54
|
-
hl7.fhir.us.mcode_3.0.0,51,Not Tested,Focus on SHALL requirements
|
55
|
-
hl7.fhir.us.mcode_3.0.0,55,Not Tested,Focus on SHALL requirements
|
56
|
-
hl7.fhir.us.mcode_3.0.0,67,Not Tested,Focus on SHALL requirements
|
57
|
-
hl7.fhir.us.mcode_3.0.0,69,Not Tested,Focus on SHALL requirements
|
58
|
-
hl7.fhir.us.mcode_3.0.0,70,Not Tested,Will test broadly that a data sender can return conformant SecondaryCancerDisorder resources
|
59
|
-
hl7.fhir.us.mcode_3.0.0,71,Not Tested,Focus on SHALL requirements
|
60
|
-
hl7.fhir.us.mcode_3.0.0,72,Not Tested,Focus on SHALL requirements
|
61
|
-
hl7.fhir.us.mcode_3.0.0,74,Not Tested,Focus on SHALL requirements
|
62
|
-
hl7.fhir.us.mcode_3.0.0,76,Not Tested,Focus on SHALL requirements
|
63
|
-
hl7.fhir.us.mcode_3.0.0,78,Not Tested,Focus on SHALL requirements
|
64
|
-
hl7.fhir.us.mcode_3.0.0,80,Not Tested,Focus on SHALL requirements
|
65
|
-
hl7.fhir.us.mcode_3.0.0,84,Not Tested,Focus on SHALL requirements
|
66
|
-
hl7.fhir.us.mcode_3.0.0,85,Not Tested,Will test broadly that a data sender can return conformant RadioTherapyCourseSummary resources
|
67
|
-
hl7.fhir.us.mcode_3.0.0,86,Not Tested,Focus on SHALL requirements
|
68
|
-
hl7.fhir.us.mcode_3.0.0,87,Not Tested,Focus on SHALL requirements
|
69
|
-
hl7.fhir.us.mcode_3.0.0,89,Not Verifiable,Can't tell if a resource is the initial diagnosis
|
70
|
-
hl7.fhir.us.mcode_3.0.0,90,Not Tested,Focus on SHALL requirements
|
71
|
-
hl7.fhir.us.mcode_3.0.0,91,Not Tested,Focus on SHALL requirements
|
72
|
-
hl7.fhir.us.mcode_3.0.0,92,Not Tested,Focus on SHALL requirements
|
73
|
-
hl7.fhir.us.mcode_3.0.0,93,Not Tested,Focus on SHALL requirements
|
74
|
-
hl7.fhir.us.mcode_3.0.0,94,Not Verifiable,Difficult to programmatically check if these 3 values are self-consistent
|
75
|
-
hl7.fhir.us.mcode_3.0.0,95,Not Tested,Focus on SHALL requirements
|
76
|
-
hl7.fhir.us.mcode_3.0.0,97,Not Tested,Focus on SHALL requirements
|
77
|
-
hl7.fhir.us.mcode_3.0.0,98,Not Tested,Focus on SHALL requirements
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Inferno
|
2
|
-
module DSL
|
3
|
-
# This module contains the DSL for defining child entities in the test
|
4
|
-
# definition framework.
|
5
|
-
module Runnable
|
6
|
-
# Set/Get the IDs of requirements verifed by this runnable
|
7
|
-
# Set with [] to clear the list
|
8
|
-
#
|
9
|
-
# @param requirements [Array<String>]
|
10
|
-
# @return [Array<String>] the requirement IDs
|
11
|
-
def verifies_requirements(*requirement_ids)
|
12
|
-
if requirement_ids.empty?
|
13
|
-
@requirement_ids || []
|
14
|
-
elsif requirement_ids == [[]]
|
15
|
-
@requirement_ids = []
|
16
|
-
else
|
17
|
-
@requirement_ids = requirement_ids
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,284 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'csv'
|
4
|
-
require 'yaml'
|
5
|
-
require_relative '../ext/inferno_core/runnable'
|
6
|
-
|
7
|
-
module InfernoRequirementsTools
|
8
|
-
module Tasks
|
9
|
-
# This class manages the mapping of test kit tests to requirements that they verify
|
10
|
-
# and creates a CSV file with the tests that cover each requirement.
|
11
|
-
# It expects a CSV file in the repo at `lib/[test kit id]/requirements/[test kit id]_requirements.csv`
|
12
|
-
# that serves as the source of the requirement set for the test kit. The requirements in
|
13
|
-
# this files are identified by a requirement set and an id and tests, groups, and suites
|
14
|
-
# within in the test kit can claim that they verify a requirement by including a reference
|
15
|
-
# to that requirementin the form <requirement set>@<id> in their `verifies_requirements` field.
|
16
|
-
# Requirements that are out of scope can be listed in a companion file
|
17
|
-
# `lib/[test kit id]/requirements/[test kit id]_out_of_scope_requirements.csv`.
|
18
|
-
#
|
19
|
-
# The `run` method generates a CSV file at
|
20
|
-
# `lib/[test kit id]/requirements/generated/[test kit id]_requirements_coverage.csv``.
|
21
|
-
# This file will be identical to the input spreadsheet, plus an additional column which holds a comma separated
|
22
|
-
# list of inferno test IDs that test each requirement. These test IDs are Inferno short form IDs that represent the
|
23
|
-
# position of the test within its group and suite. For example, the fifth test in the second group will have an ID
|
24
|
-
# of 2.05. This ID is also shown in the Inferno web UI.
|
25
|
-
#
|
26
|
-
# The `run_check` method will check whether the previously generated file is up-to-date.
|
27
|
-
class RequirementsCoverage
|
28
|
-
VERSION = '0.2.0' # update when making meaningful changes to this method for tracking used versions
|
29
|
-
CONFIG = YAML.load_file(File.join('lib', 'requirements_config.yaml'))
|
30
|
-
|
31
|
-
TEST_KIT_ID = CONFIG['test_kit_id']
|
32
|
-
TEST_SUITES = CONFIG['suites'].map do |test_suite|
|
33
|
-
Object.const_get(test_suite['class_name'])
|
34
|
-
end
|
35
|
-
|
36
|
-
SUITE_ID_TO_ACTOR_MAP = CONFIG['suites'].each_with_object({}) do |test_suite, hash|
|
37
|
-
hash[test_suite['id']] = test_suite['suite_actor']
|
38
|
-
end
|
39
|
-
|
40
|
-
# Derivative constants
|
41
|
-
TEST_KIT_CODE_FOLDER = TEST_KIT_ID
|
42
|
-
DASHERIZED_TEST_KIT_ID = TEST_KIT_ID.gsub('_', '-')
|
43
|
-
INPUT_HEADERS = [
|
44
|
-
'Req Set',
|
45
|
-
'ID',
|
46
|
-
'URL',
|
47
|
-
'Requirement',
|
48
|
-
'Conformance',
|
49
|
-
'Actor',
|
50
|
-
'Sub-Requirement(s)',
|
51
|
-
'Conditionality'
|
52
|
-
].freeze
|
53
|
-
SHORT_ID_HEADER = 'Short ID(s)'
|
54
|
-
FULL_ID_HEADER = 'Full ID(s)'
|
55
|
-
INPUT_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_requirements.csv".freeze
|
56
|
-
INPUT_FILE = File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', INPUT_FILE_NAME).freeze
|
57
|
-
NOT_TESTED_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_out_of_scope_requirements.csv".freeze
|
58
|
-
NOT_TESTED_FILE = File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', NOT_TESTED_FILE_NAME).freeze
|
59
|
-
OUTPUT_HEADERS = INPUT_HEADERS + TEST_SUITES.flat_map do |suite|
|
60
|
-
["#{suite.title} #{SHORT_ID_HEADER}", "#{suite.title} #{FULL_ID_HEADER}"]
|
61
|
-
end
|
62
|
-
OUTPUT_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_requirements_coverage.csv".freeze
|
63
|
-
OUTPUT_FILE_DIRECTORY = File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', 'generated')
|
64
|
-
OUTPUT_FILE = File.join(OUTPUT_FILE_DIRECTORY, OUTPUT_FILE_NAME).freeze
|
65
|
-
|
66
|
-
def input_rows
|
67
|
-
@input_rows ||=
|
68
|
-
CSV.parse(File.open(INPUT_FILE, 'r:bom|utf-8'), headers: true).map do |row|
|
69
|
-
row.to_h.slice(*INPUT_HEADERS)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
def not_tested_requirements_map
|
74
|
-
@not_tested_requirements_map ||= load_not_tested_requirements
|
75
|
-
end
|
76
|
-
|
77
|
-
def load_not_tested_requirements
|
78
|
-
return {} unless File.exist?(NOT_TESTED_FILE)
|
79
|
-
|
80
|
-
not_tested_requirements = {}
|
81
|
-
CSV.parse(File.open(NOT_TESTED_FILE, 'r:bom|utf-8'), headers: true).each do |row|
|
82
|
-
row_hash = row.to_h
|
83
|
-
not_tested_requirements["#{row_hash['Req Set']}@#{row_hash['ID']}"] = row_hash
|
84
|
-
end
|
85
|
-
|
86
|
-
not_tested_requirements
|
87
|
-
end
|
88
|
-
|
89
|
-
# Of the form:
|
90
|
-
# {
|
91
|
-
# 'req-id-1': [
|
92
|
-
# { short_id: 'short-id-1', full_id: 'long-id-1', suite_id: 'suite-id-1' },
|
93
|
-
# { short_id: 'short-id-2', full_id: 'long-id-2', suite_id: 'suite-id-2' }
|
94
|
-
# ],
|
95
|
-
# 'req-id-2': [{ short_id: 'short-id-3', full_id: 'long-id-3', suite_id: 'suite-id-3' }],
|
96
|
-
# ...
|
97
|
-
# }
|
98
|
-
def inferno_requirements_map
|
99
|
-
@inferno_requirements_map ||= TEST_SUITES.each_with_object({}) do |suite, requirements_map|
|
100
|
-
serialize_requirements(suite, 'suite', suite.id, requirements_map)
|
101
|
-
suite.groups.each do |group|
|
102
|
-
map_group_requirements(group, suite.id, requirements_map)
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
def new_csv
|
108
|
-
@new_csv ||=
|
109
|
-
CSV.generate(+"\xEF\xBB\xBF") do |csv|
|
110
|
-
csv << OUTPUT_HEADERS
|
111
|
-
input_rows.each do |row| # NOTE: use row order from source file
|
112
|
-
next if row['Conformance'] == 'DEPRECATED' # filter out deprecated rows
|
113
|
-
|
114
|
-
TEST_SUITES.each do |suite|
|
115
|
-
suite_actor = SUITE_ID_TO_ACTOR_MAP[suite.id]
|
116
|
-
if row['Actor']&.include?(suite_actor)
|
117
|
-
add_suite_tests_for_row(row, suite)
|
118
|
-
else
|
119
|
-
row["#{suite.title} #{SHORT_ID_HEADER}"] = 'NA'
|
120
|
-
row["#{suite.title} #{FULL_ID_HEADER}"] = 'NA'
|
121
|
-
end
|
122
|
-
end
|
123
|
-
csv << row.values
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
def add_suite_tests_for_row(row, suite)
|
129
|
-
set_and_req_id = "#{row['Req Set']}@#{row['ID']}"
|
130
|
-
items = get_items_for_requirement(set_and_req_id, suite)
|
131
|
-
short_ids = items[0]
|
132
|
-
full_ids = items[1]
|
133
|
-
if short_ids.blank? && not_tested_requirements_map.key?(set_and_req_id)
|
134
|
-
row["#{suite.title} #{SHORT_ID_HEADER}"] = 'Not Tested'
|
135
|
-
row["#{suite.title} #{FULL_ID_HEADER}"] = 'Not Tested'
|
136
|
-
else
|
137
|
-
row["#{suite.title} #{SHORT_ID_HEADER}"] = short_ids&.join(', ')
|
138
|
-
row["#{suite.title} #{FULL_ID_HEADER}"] = full_ids&.join(', ')
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
def get_items_for_requirement(set_and_req_id, suite)
|
143
|
-
suite_requirement_items = inferno_requirements_map[set_and_req_id]&.filter do |item|
|
144
|
-
item[:suite_id] == suite.id
|
145
|
-
end
|
146
|
-
[
|
147
|
-
suite_requirement_items&.map { |item| item[:short_id] },
|
148
|
-
suite_requirement_items&.map { |item| item[:full_id] }
|
149
|
-
]
|
150
|
-
end
|
151
|
-
|
152
|
-
def input_requirement_ids
|
153
|
-
@input_requirement_ids ||= input_rows.map { |row| "#{row['Req Set']}@#{row['ID']}" }
|
154
|
-
end
|
155
|
-
|
156
|
-
# The requirements present in Inferno that aren't in the input spreadsheet
|
157
|
-
def unmatched_requirements_map
|
158
|
-
@unmatched_requirements_map ||= inferno_requirements_map.except(*input_requirement_ids)
|
159
|
-
end
|
160
|
-
|
161
|
-
def old_csv
|
162
|
-
@old_csv ||= File.read(OUTPUT_FILE)
|
163
|
-
end
|
164
|
-
|
165
|
-
def run
|
166
|
-
unless File.exist?(INPUT_FILE)
|
167
|
-
puts "Could not find input file: #{INPUT_FILE}. Aborting requirements coverage generation..."
|
168
|
-
exit(1)
|
169
|
-
end
|
170
|
-
|
171
|
-
if unmatched_requirements_map.any?
|
172
|
-
puts "WARNING: The following requirements indicated in the test kit are not present in #{INPUT_FILE_NAME}"
|
173
|
-
output_requirements_map_table(unmatched_requirements_map)
|
174
|
-
end
|
175
|
-
|
176
|
-
if File.exist?(OUTPUT_FILE)
|
177
|
-
if old_csv == new_csv
|
178
|
-
puts "'#{OUTPUT_FILE_NAME}' file is up to date."
|
179
|
-
return
|
180
|
-
else
|
181
|
-
puts 'Requirements coverage has changed.'
|
182
|
-
end
|
183
|
-
else
|
184
|
-
puts "No existing #{OUTPUT_FILE_NAME}."
|
185
|
-
end
|
186
|
-
|
187
|
-
puts "Writing to file #{OUTPUT_FILE}..."
|
188
|
-
FileUtils.mkdir_p(OUTPUT_FILE_DIRECTORY)
|
189
|
-
File.write(OUTPUT_FILE, new_csv)
|
190
|
-
puts 'Done.'
|
191
|
-
end
|
192
|
-
|
193
|
-
def run_check
|
194
|
-
unless File.exist?(INPUT_FILE)
|
195
|
-
puts "Could not find input file: #{INPUT_FILE}. Aborting requirements coverage check..."
|
196
|
-
exit(1)
|
197
|
-
end
|
198
|
-
|
199
|
-
if unmatched_requirements_map.any?
|
200
|
-
puts "The following requirements indicated in the test kit are not present in #{INPUT_FILE_NAME}"
|
201
|
-
output_requirements_map_table(unmatched_requirements_map)
|
202
|
-
end
|
203
|
-
|
204
|
-
if File.exist?(OUTPUT_FILE)
|
205
|
-
if old_csv == new_csv
|
206
|
-
puts "'#{OUTPUT_FILE_NAME}' file is up to date."
|
207
|
-
return unless unmatched_requirements_map.any?
|
208
|
-
else
|
209
|
-
puts <<~MESSAGE
|
210
|
-
#{OUTPUT_FILE_NAME} file is out of date.
|
211
|
-
To regenerate the file, run:
|
212
|
-
|
213
|
-
bundle exec rake requirements:generate_coverage
|
214
|
-
|
215
|
-
MESSAGE
|
216
|
-
end
|
217
|
-
else
|
218
|
-
puts <<~MESSAGE
|
219
|
-
No existing #{OUTPUT_FILE_NAME} file.
|
220
|
-
To generate the file, run:
|
221
|
-
|
222
|
-
bundle exec rake requirements:generate_coverage
|
223
|
-
|
224
|
-
MESSAGE
|
225
|
-
end
|
226
|
-
|
227
|
-
puts 'Check failed.'
|
228
|
-
exit(1)
|
229
|
-
end
|
230
|
-
|
231
|
-
def map_group_requirements(group, suite_id, requirements_map)
|
232
|
-
serialize_requirements(group, group.short_id, suite_id, requirements_map)
|
233
|
-
group.tests&.each { |test| serialize_requirements(test, test.short_id, suite_id, requirements_map) }
|
234
|
-
group.groups&.each { |subgroup| map_group_requirements(subgroup, suite_id, requirements_map) }
|
235
|
-
end
|
236
|
-
|
237
|
-
def serialize_requirements(runnable, short_id, suite_id, requirements_map)
|
238
|
-
runnable.verifies_requirements&.each do |requirement_id|
|
239
|
-
requirement_id_string = requirement_id.to_s
|
240
|
-
|
241
|
-
requirements_map[requirement_id_string] ||= []
|
242
|
-
requirements_map[requirement_id_string] << { short_id:, full_id: runnable.id, suite_id: }
|
243
|
-
end
|
244
|
-
end
|
245
|
-
|
246
|
-
# Output the requirements in the map like so:
|
247
|
-
#
|
248
|
-
# requirement_id | short_id | full_id
|
249
|
-
# ---------------+------------+----------
|
250
|
-
# req-id-1 | short-id-1 | full-id-1
|
251
|
-
# req-id-2 | short-id-2 | full-id-2
|
252
|
-
#
|
253
|
-
def output_requirements_map_table(requirements_map)
|
254
|
-
headers = %w[requirement_id short_id full_id]
|
255
|
-
col_widths = headers.map(&:length)
|
256
|
-
col_widths[0] = [col_widths[0], requirements_map.keys.map(&:length).max].max
|
257
|
-
col_widths[1] = ([col_widths[1]] + requirements_map.values.flatten.map { |item| item[:short_id].length }).max
|
258
|
-
col_widths[2] = ([col_widths[2]] + requirements_map.values.flatten.map { |item| item[:full_id].length }).max
|
259
|
-
col_widths.map { |width| width + 3 }
|
260
|
-
|
261
|
-
puts [
|
262
|
-
headers[0].ljust(col_widths[0]),
|
263
|
-
headers[1].ljust(col_widths[1]),
|
264
|
-
headers[2].ljust(col_widths[2])
|
265
|
-
].join(' | ')
|
266
|
-
puts col_widths.map { |width| '-' * width }.join('-+-')
|
267
|
-
output_requirements_map_table_contents(requirements_map, col_widths)
|
268
|
-
puts
|
269
|
-
end
|
270
|
-
|
271
|
-
def output_requirements_map_table_contents(requirements_map, col_widths)
|
272
|
-
requirements_map.each do |requirement_id, runnables|
|
273
|
-
runnables.each do |runnable|
|
274
|
-
puts [
|
275
|
-
requirement_id.ljust(col_widths[0]),
|
276
|
-
runnable[:short_id].ljust(col_widths[1]),
|
277
|
-
runnable[:full_id].ljust(col_widths[2])
|
278
|
-
].join(' | ')
|
279
|
-
end
|
280
|
-
end
|
281
|
-
end
|
282
|
-
end
|
283
|
-
end
|
284
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
test_kit_id: cancer_registry_reporting_test_kit
|
2
|
-
|
3
|
-
suites:
|
4
|
-
- id: ccrr_ehr
|
5
|
-
class_name: CancerRegistryReportingTestKit::EHRSuite
|
6
|
-
suite_actor: EHR
|
7
|
-
- id: ccrr_v100_report_generation
|
8
|
-
class_name: CancerRegistryReportingTestKit::CCRRV100::HDEASuite
|
9
|
-
suite_actor: HDEA
|
10
|
-
|
11
|
-
requirement_sets:
|
12
|
-
- id: hl7.fhir.us.central-cancer-registry-reporting_1.0.0
|
13
|
-
folder: Central Cancer Registry Reporting
|
14
|
-
requirements: All
|
15
|
-
actor_map:
|
16
|
-
- {spec: EHR, test_kit: EHR}
|
17
|
-
- {spec: HDEA, test_kit: HDEA}
|
18
|
-
- id: hl7.fhir.us.mcode_3.0.0
|
19
|
-
folder: mCode
|
20
|
-
requirements: Referenced
|
21
|
-
actor_map:
|
22
|
-
- {spec: mCode Data Sender, test_kit: EHR}
|