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 a timingPhaseDetail extension #67

Merged
merged 12 commits into from
Aug 29, 2024
Merged

Add a timingPhaseDetail extension #67

merged 12 commits into from
Aug 29, 2024

Conversation

pipliggins
Copy link
Collaborator

@pipliggins pipliggins commented Aug 14, 2024

As per the description in https://github.com/globaldothealth/isaric3/blob/main/1_workstreams/1.01_ISARIC3/Timing_Variables.md

timingPhaseDetail is a complex (i.e. nested) extension which in FHIR format appears as

{
            "url": "timingPhaseDetail",
            "extension": [
                {
                    "url": "timingDetail",
                    "valueRange": {
                        "low": {"value": -7, "unit": "days"},
                        "high": {"value": 0, "unit": "days"},
                    },
                },
                {
                    "url": "timingPhase",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://snomed.info/sct",
                                "code": "281379000",
                                "display": "pre-admission",
                            }
                        ]
                    },
                },
            ],
        },

where the timingDetail portion can take either a valueCodeableConcept, valueRange, or valueString.

Also edits the flow of the flat2fhir conversion to allow for this structure and cleans up the code a bit.

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.93%. Comparing base (a484c4d) to head (7724350).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   97.71%   97.93%   +0.22%     
==========================================
  Files          42       44       +2     
  Lines        2010     2184     +174     
==========================================
+ Hits         1964     2139     +175     
+ Misses         46       45       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pipliggins pipliggins marked this pull request as ready for review August 22, 2024 15:14
@pipliggins pipliggins requested a review from abhidg August 22, 2024 15:14
@pipliggins pipliggins linked an issue Aug 22, 2024 that may be closed by this pull request
@pipliggins pipliggins merged commit 5142a6a into main Aug 29, 2024
3 checks passed
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.

Add additional ISARIC-specific extensions
2 participants