-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from CEOsys/feat/ext-relative-time
Feat/ext relative time
- Loading branch information
Showing
17 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Extension: RelativeTime | ||
Id: relative-time | ||
Description: "Timing in which the characteristic is determined." | ||
* ^context[0].type = #element | ||
* ^context[0].expression = "EvidenceVariable.characteristic" | ||
* ^context[1].type = #element | ||
* ^context[1].expression = "PlanDefinition.action" | ||
* ^context[2].type = #element | ||
* ^context[2].expression = "ActivityDefinition" | ||
* value[x] 0..0 | ||
* . ^short = "Timing in which the characteristic is determined" | ||
* . ^definition = "Timing in which the characteristic is determined." | ||
* extension contains contextReference 0..1 and contextDefinition 0..1 and contextPath 0..1 and contextCode 0..1 and offset 0..1 and text 0..1 | ||
* extension[contextReference].value[x] only Reference | ||
* ^short = "The specific event occurrence or resource context used as a base point (reference point) in time" | ||
* ^definition = "The specific event occurrence or resource context used as a base point (reference point) in time. This establishes the context in which the path is evaluated." | ||
* extension[contextDefinition].value[x] only canonical | ||
* ^short = "The type of event used as a base point" | ||
* ^definition = "The type of event used as a base point. Instances of this definition will establish the context for evaluating the path to determine the base time for the offset." | ||
* extension[contextPath].value[x] only string | ||
* ^short = "Path to the element defining the point in time" | ||
* ^definition = "Path to the element defining the point in time. Any valid FHIRPath expression." | ||
* extension[contextCode].value[x] only CodeableConcept | ||
* ^short = "Coded representation of the event used as a base point (reference point) in time" | ||
* ^definition = "Coded representation of the event used as a base point (reference point) in time." | ||
* extension[offset].value[x] only Duration or Range | ||
* ^short = "An offset or offset range before (negative values) or after (positive values) the event" | ||
* ^definition = "An offset or offset range before (negative values) or after (positive values) the event. Range is limited to time-valued quantities (Durations)." | ||
* extension[text].value[x] only string | ||
* ^short = "aFree-text description" | ||
* ^definition = "Free-text (human-readable) description." |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Author: Gregor Lichtner @glichtner | ||
Profile: ProcedureAction | ||
Parent: RecommendationAction | ||
Id: procedure-action | ||
Title: "Procedure Action" | ||
Description: "Definition of a procedure action." | ||
* insert metadata(2024-05-22, #draft, 0.1.0) | ||
* kind = $cs-fhir-types#ServiceRequest "ServiceRequest" | ||
* code 1..1 | ||
* code from vs-procedures (required) | ||
* timingTiming 1..1 | ||
* product[x] 0..0 | ||
* dosage 0..0 | ||
* quantity 0..0 | ||
|
||
Instance: ExampleProcedureAction | ||
InstanceOf: procedure-action | ||
Usage: #example | ||
Title: "Example Procedure Action" | ||
Description: "Example of a procedure action." | ||
* name = "ExampleProcedureAction" | ||
* version = "1.0" | ||
* experimental = true | ||
* publisher = "CPGonEBMonFHIR" | ||
* description = "Example of a procedure action." | ||
* timingTiming | ||
* repeat | ||
* frequency = 1 | ||
* period = 1 | ||
* periodUnit = #d "d" | ||
* status = #active | ||
* insert canonical-url(example/recommendation-action/procedure-example) | ||
* code = $sct-int#172703006 "Destruction of lesion of middle ear (procedure)" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Author: Gregor Lichtner @glichtner | ||
ValueSet: Procedures | ||
Id: vs-procedures | ||
Title: "Procedures" | ||
Description: "Procedures" | ||
* insert metadata(2024-05-22, #draft, 0.1.0) | ||
* insert cpg-computable-valueset | ||
* include codes from system $sct-int where concept is-a #71388002 "Procedure (procedure)" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#### Timing Datatype Interpretation Modifications | ||
|
||
This Implementation guide has a modified interpretation of the `Timing` datatype. Specifically, fields that have corresponding "Max" fields (`count`, `duration`, `frequency`, `period`) are now interpreted as minimum values. To specify an exact value, the base field and its corresponding `Max` field must be set to the same value. | ||
|
||
These changes pertain to the following profiles / elements: | ||
|
||
- [RecommendationEligibilityCriteria.characteristic][SD:Recommendation Eligibility Criteria] | ||
- [RecommendationAction][SD:Recommendation Action] | ||
- [RecommendationPlan.action][SD:Recommendation Plan] | ||
|
||
|
||
**Changes to Timing Datatype** | ||
|
||
| Field | Description | Example | | ||
|--------------|-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------| | ||
| count | **Minimal number of times this event should be repeated.** | `count: 2` means the event should occur at least 2 times. | | ||
| countMax | **Maximum number of times this event should be repeated.** | `countMax: 5` means the event should occur no more than 5 times. | | ||
| duration | **Minimal duration this event should last.** | `duration: 1` (assuming units are hours) means the event should last at least 1 hour. | | ||
| durationMax | **Maximal duration this event should last.** | `durationMax: 3` (assuming units are hours) means the event should last no more than 3 hours. | | ||
| frequency | **Indicates the minimal number of repetitions that should occur within a period.** | `frequency: 1` means the event should occur at least once per period. | | ||
| frequencyMax | **Indicates the maximum number of repetitions that should occur within a period.** | `frequencyMax: 4` means the event should occur no more than four times per period. | | ||
| period | **The minimal duration to which the frequency applies.** | `period: 1` (assuming units are days) means the frequency applies to at least 1 day. | | ||
| periodMax | **The maximum duration to which the frequency applies.** | `periodMax: 7` (assuming units are days) means the frequency applies to no more than 7 days. | | ||
{:.grid} | ||
|
||
**Examples** | ||
|
||
* Example 1: Exact number of Occurrences | ||
```json | ||
{ | ||
"repeat": { | ||
"count": 2, | ||
"countMax": 2 | ||
} | ||
} | ||
``` | ||
- This indicates the event should occur exactly 2 times. | ||
|
||
* Example 2: Occurrences Range | ||
```json | ||
{ | ||
"repeat": { | ||
"count": 2, | ||
"countMax": 5 | ||
} | ||
} | ||
``` | ||
- This indicates the event should occur at least 2 times but no more than 5 times. | ||
|
||
* Example 3: Minimal Duration | ||
```json | ||
{ | ||
"repeat": { | ||
"duration": 1, | ||
"durationUnit": "h" | ||
} | ||
} | ||
``` | ||
- This indicates the event should last one **or more** hours. | ||
|
||
* Example 4: Maximal duration | ||
```json | ||
{ | ||
"repeat": { | ||
"durationMax": 2, | ||
"durationUnit": "h" | ||
} | ||
} | ||
``` | ||
- This indicates the event should last no more than two hours. | ||
|
||
**Implementation Notes** | ||
|
||
- Ensure that when setting the exact value, both the base field and its corresponding "Max" field are set to the same value. | ||
- These changes aim to provide more flexibility and clarity in specifying the timing and frequency of events, ensuring that minimal and maximal constraints are clear to implementers. | ||
|
||
{% include link-list.md %} |
This file contains 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
15 changes: 15 additions & 0 deletions
15
input/intro-notes/StructureDefinition-procedure-action-intro.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% include variables.md %} | ||
{% assign id = {{include.id}} %} | ||
{% assign resource = site.data.structuredefinitions.[id] %} | ||
|
||
### Guidance | ||
|
||
|
||
|
||
{% capture resource_inheritance %} | ||
This profile of a FHIR {{resource.type}} is derived from the [{{resource.base | split: '/' | last}}]({{resource.base}}) FHIR resource. | ||
{% endcapture %} | ||
|
||
{{ resource_inheritance | strip_newlines }} | ||
|
||
{% include link-list.md %} |
This file contains 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
This file contains 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
This file contains 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
15 changes: 15 additions & 0 deletions
15
input/intro-notes/StructureDefinition-relative-time-intro.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% include variables.md %} | ||
{% assign id = {{include.id}} %} | ||
{% assign resource = site.data.structuredefinitions.[id] %} | ||
|
||
### Guidance | ||
|
||
This extension allows the use of the FHIR R6 [RelativeTime Datatype](https://build.fhir.org/datatypes.html#RelativeTime) in the context of the CPG-on-EBM-on-FHIR project. | ||
|
||
The extension can be used in the following places: | ||
|
||
- [`RecommendationEligibilityCriteria.characteristic`][SD:Recommendation Eligibility Criteria] | ||
- [`RecommendationAction`][SD:Recommendation Action] | ||
- [`RecommendationPlan.action`][SD:Recommendation Plan] | ||
|
||
{% include link-list.md %} |
This file contains 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