Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USCore 3.1.1 test group, CRD profile tests #26

Merged
merged 14 commits into from
Nov 23, 2024

Conversation

elsaperelli
Copy link
Contributor

@elsaperelli elsaperelli commented Nov 5, 2024

Summary

This task adds US Core 3.1.1 tests to the Light DTR EHR Test Suite as well as tests for the Light DTR EHR REST Capabilities by Resource/Profile.

Originally, the goal of this task was to generate tests using the US Core generator with a capability statement that combined the US Core 3.1.1 capability statement and the Light DTR EHR Capability statement; however, the majority of the CRD Profiles are read only and the US Core generator read test generator relies on search tests in order to work. Therefore, the majority of the tests are handwritten, with the exception of the CRD Coverage patient and context search tests which were generated and brought over (along with the US Core generator infrastructure).

An additional thing to note is the use of the CDex Task profile in the Task validation test since there is seemingly no CRD Task profile.

Testing Guidance

  • In order to test the CRD profile tests, I added a patient with CRD profile resources to a local instance of the inferno-reference-server. I have attached this patient JSON file below.
  • In order to load the patient JSON into the local copy of the reference server, follow these steps:
    • Put the JSON file in the /resources directory
    • docker compose down
    • docker volume rm inferno-reference-server_fhir-pgdata
    • docker compose up --build
  • In the Light DTR EHR test kit, use http://localhost:8080/reference-server/r4
  • For the profile ids use the following for pat001:
    • coverage-example1
    • communicationrequest-example1
    • devicerequest-example1
    • encounter-example1
    • medicationrequest-example1
    • nutritionorder-example1
    • servicerequest-example1
    • cdex-task-example19
    • visionprescription-example, visionprescription-example2

Questions

  • I am a bit confused about the IG's description of the Coverage search by context capability. I am not sure how to properly test that since it looks like the example CRD Coverage does not have a context field, nor does there seem to be one in the profile Snapshot table.
  • Looks like the Ruby lint errors are coming from the US Core generator files that I had to bring over, what is the best way for me to address these?

dtr_bundle_patient_pat001.json

@elsaperelli elsaperelli marked this pull request as ready for review November 5, 2024 16:03
@elsaperelli elsaperelli requested a review from karlnaden November 5, 2024 16:22
@karlnaden
Copy link
Contributor

I am a bit confused about the IG's description of the Coverage search by context capability. I am not sure how to properly test that since it looks like the example CRD Coverage does not have a context field, nor does there seem to be one in the profile Snapshot table.

Well, this is interesting. I agree there is no context search parameter on the Coverage resource, not in base FHIR R4 or defined in DTR or CRD. Looking at the current build version of DTR, it looks like the Coverage resource was a mistake and that QuestionnaireResponse was intended. Some of the text in the published version suggests that as well, e.g. "This requires the server to provide access to the specified resources to allow such an app to retrieve and edit QuestionnaireResponses and related resources." and "context (reference): Allows retrieving QuestionnaireResponse for a context" and the context search parameter is defined in the published IG on QuestionnaireResponse.

I think this is probably enough for us to switch from Coverage to QuestionnaireResponse and so I think that is what we should do, but will get some leadership opinions before confirming.

Copy link
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few details to clean-up, but looking good

@karlnaden
Copy link
Contributor

to address the ci Ruby / test failure, upgrade to us core test kit version 0.9.0 per steve.

Copy link
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add some unit tests which should help fix the one issue I see

@karlnaden
Copy link
Contributor

Assuming that we're going to add sample instances to the hosted Inferno Reference Server so that we can demonstrate these tests, I think we should clean up the errors and update the bundle associated with this pull request. I'm seeing:

  • QuestionnaireResponse: several errors around example urls. Here are SNOMED CT codes I think we could use instead:

SNOMED CT: 248218005 - Awake (slightly different from Awake and at rest, but that's ok for our purposes)
https://browser.ihtsdotools.org/?perspective=full&conceptId1=248218005&edition=MAIN/SNOMEDCT-US/2024-09-01&release=&languages=en

SNOMED CT: 1230326008 - Compressed gas
https://browser.ihtsdotools.org/?perspective=full&conceptId1=1230326008&edition=MAIN/SNOMEDCT-US/2024-09-01&release=&languages=en

SNOMED CT: 261382003 - Mask
https://browser.ihtsdotools.org/?perspective=full&conceptId1=261382003&edition=MAIN/SNOMEDCT-US/2024-09-01&release=&languages=en

  • CommunicationRequest: this has something to do with the cross version extension used (and required) by the profile. Somehow, the IG build filters it out. Probably a separate ticket and question for Dylan.

  • CDex Task: I think everything is related to example urls. These are systems for identifiers so can be updated to be something inferno-related, like perhaps the base FHIR url of the hosted reference server.

Copy link
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small fixes to example execution resources loaded into the reference server, some of which may be other tickets to address in the future.

@elsaperelli
Copy link
Contributor Author

dtr_bundle_patient_pat001.json

Updated patient bundle to load in the reference server! Only the CDex Task has errors now, creating a ticket to address this.

@elsaperelli
Copy link
Contributor Author

Added the necessary resources for testing this to the existing dtr_bundle_patient_pat015.json file: inferno-framework/inferno-reference-server#188. Modified the preset to reflect this.

@elsaperelli elsaperelli merged commit 3f9d03a into main Nov 23, 2024
3 checks passed
@elsaperelli elsaperelli deleted the fi-3336-us-core-tests branch November 23, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants