Repository navigation
Add a medical preset; fix presets declaring path-named fields - #27
Open
adammharris wants to merge 2 commits into
Open
adammharris wants to merge 2 commits into
adammharris wants to merge 2 commits into
Conversation
…m`) is written as one key
`Workspace::apply_preset` wrote each entry through the dotted-path editor,
so a preset declaring the field `generated.how` landed it as
`fields.generated.how`, nested a level too deep, and one declaring
`codes[].system` was refused ("names every item of a list"). An entry is
now written as literal keys through the new
`prov_store::edit::set_meta_at_keys`, split the way `lookup` already
splits it: a top-level config key, then the entry's name whole.
Behavioural-change: `prov presets --write` and `prov init --preset` write a field declared under a name holding `.` or `[]` as one key under `fields`, where they nested it as a path or refused it.
…eset A patient-held health record as a prov workspace: a closed `kind` with each term mapped to a FHIR resource type; a closed `codes[].system` (ICD-10-CM, SNOMED CT, LOINC, RxNorm, CVX, CPT) with the codes carried rather than enumerated; `clinician` as a `ref` field; a closed `generated.how`; `status` vocabularies scoped under Problems and Medications; views for a timeline, active problems, current medications, records by clinician and drafts awaiting review; year filing for Encounters and Labs; and care-team, emergency and family exports, gated on `audience` and holding on `draft: true`. `audience` defaults to `self`.
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.
Medical preset
presets/medical/is a patient-held health record as a prov workspace:kindis closed, and each term maps to a FHIR resource type (encounter→ Encounter,problem→ Condition,lab→ Observation, and so on).codes[].systemis closed (ICD-10-CM, SNOMED CT, LOINC, RxNorm, CVX, CPT). The record carries the codes themselves; the preset doesn't list them.clinicianis areffield.generated.howis closed (written,drafted,transcribed,imported,converted).statushas separate vocabularies under Problems and under Medications.audienceand holds back anything withdraft: true.audiencedefaults toself.Sign-off order: run
prov unset <note> draftbeforeprov confirm <note> --by <clinician>. A confirmation goes stale at the next edit, so unsettingdraftafter confirming would undo the confirmation.Fix: presets that declare path-named fields
Workspace::apply_presetwrote each entry through the dotted-path editor. That broke on field names that contain path syntax:generated.howwas written asfields.generated.how, two levels deep instead of one key.codes[].systemwas refused ("names every item of a list").Entries are now written as literal keys through a new function,
prov_store::edit::set_meta_at_keys. The key is split the same waylookupalready splits it: a top-level config key, then the whole entry name. The regression test isa_field_named_by_a_path_is_written_as_one_key.Verification
ship cijobs fmt, clippy, test, docs, prov-check and package-isolation all pass. MSRV was skipped on this machine.provon a new workspace:prov init --yesprov presets presets/medical --writeprov newfor Encounters, Problems, Medications, Labs, "Care team" and Importsprov checkreportsok: no findings.