Repository navigation
Export audiograms with their sensitivity test details - #205
Draft
PSchmiedmayer wants to merge 6 commits into
Draft
PSchmiedmayer wants to merge 6 commits into
PSchmiedmayer wants to merge 6 commits into
Conversation
An HKAudiogramSample converts to the audiogram panel: one component per sensitivity test, coded where the catalog names its ear and frequency and labeled with its exact frequency otherwise, each carrying the frequency, ear, conduction method, masking state and clamping bounds in the sensitivity-test extension. A test that lasts states its whole period. The generator emits the catalog's component extension and the members each component fixes, so the ear, frequency and extension URL come from the guide instead of the component ids.
Pins grove-fhir to the audiogram guide branch at ce72a63, which contains grove-fhir 0.9.0, and regenerates the contracts from it.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
♻️ Current situation & Problem
This replaces #195, which closed when its branch was merged into the integration branch; the branch and commits are unchanged.
GroveHealthKitFHIR listed
HKAudiogramSampleas a type it did not convert yet, so an exporter refused every audiogram.The HealthKit guide's audiogram panel had one threshold per ear at each LOINC-coded frequency and nothing else.
An
HKAudiogramSensitivityTestalso states its conduction method, whether it was masked and the clamping bounds of the source, and a test can use a frequency that has no LOINC code.SchmiedmayerLab/grove-fhir#87 adds a sensitivity test extension on every panel component that holds these facts, and lets the panel state the sample's whole period.
This change implements that contract in Grove.
⚙️ Release Notes
.sample(_:)record.healthkit-audiogram-sensitivity-testextension with the frequency, ear and conduction method, the masking state where HealthKit exposes it, and the clamping bounds where the source states any.measurementNotMappable.078aa1c170cdf027e9f71bded85b8153229f31ad, the head of Preserve HealthKit audiogram sensitivity test details grove-fhir#87, whichScripts/validate-fhir-conformance.shand the test workflow pin by commit.A component at a frequency the guide does not code:
{ "code": { "text": "Air conduction threshold, right ear, 1250.5 Hz" }, "extension": [{ "url": "https://grovealliance.org/fhir/healthkit/StructureDefinition/healthkit-audiogram-sensitivity-test", "extension": [ { "url": "frequency", "valueQuantity": { "value": 1250.5, "unit": "Hz", "system": "http://unitsofmeasure.org", "code": "Hz" } }, { "url": "ear", "valueCode": "right" }, { "url": "conduction", "valueCode": "air" }, { "url": "masked", "valueBoolean": false } ] }], "valueQuantity": { "value": 30, "unit": "dB", "system": "http://unitsofmeasure.org", "code": "dB" } }📚 Documentation
✅ Testing
HealthKitAudiogramContentTestsis new and covers coded components with masking and clamping bounds, exact uncoded frequencies, the millihertz comparison, per-ear masking and component order, the refused shapes, and the period or instant of a whole audiogram.HealthKitContentCompilerTestsadds a case that refuses an audiogram contract without its component extension or with a component that fixes no single ear and frequency.guide-example-audiogramandaudiogram-test-detailsjoin the validated conformance fixtures.guide-example-audiogramreproduces the guide'sHealthkitAudiogramPanelExample, whichScripts/check-ig-example-containment.pynow pairs with it.audiogram-test-detailscovers a six-minute test with a masked, clamped coded frequency and two frequencies the guide does not code.test_generate_grove_fhir_swift_contract.pycovers the generated component extension and fixed members, and refuses extension values the generator cannot type.Code of Conduct & Contributing Guidelines
By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: