Skip to content

Commit

Permalink
Merge pull request #219 from cqframework/feature_data_date_roller_ext…
Browse files Browse the repository at this point in the history
…ension_2

Feature data date roller extension
  • Loading branch information
bryantaustin13 committed Apr 25, 2022
2 parents bf6f7a3 + 11497b4 commit fa6fead
Show file tree
Hide file tree
Showing 8 changed files with 268 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<MedicationRequest xmlns="http:https://hl7.org/fhir">
<id value="example-rec-10-no-screenings-prefetch"/>
<extension url="http:https://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller">
<extension url="dateLastUpdated">
<valueDateTime value="2022-04-22" />
</extension>
<extension url="frequency">
<valueDuration>
<value value="30.0" />
<unit value="days" />
<system value="http:https://unitsofmeasure.org" />
<code value="d" />
</valueDuration>
</extension>
</extension>
<status value="active"/>
<intent value="order"/>
<category>
Expand All @@ -21,16 +34,7 @@
<context>
<reference value="Encounter/example-rec-10-no-screenings-prefetch"/>
</context>
<authoredOn>
<extension url="http:https://fhir.org/guides/cdc/opioid-cds/StructureDefinition/cdc-valueset-query">
<extension url="language">
<valueUri value="text/cql" />
</extension>
<extension url="expression">
<valueString value="Today() - 90 days"/>
</extension>
</extension>
</authoredOn>
<authoredOn value="2022-04-22" />
<dosageInstruction>
<timing>
<repeat>
Expand All @@ -47,14 +51,8 @@
</dosageInstruction>
<dispenseRequest>
<validityPeriod>
<extension url="http:https://fhir.org/guides/cdc/opioid-cds/StructureDefinition/cdc-valueset-query">
<extension url="language">
<valueUri value="text/cql" />
</extension>
<extension url="expression">
<valueString value="FHIR.Period { start: FHIR.dateTime { value: Today() - 90 days }, end: FHIR.dateTime { value: Today() } }"/>
</extension>
</extension>
<start value="2022-01-22" />
<end value="2022-04-22" />
</validityPeriod>
<numberOfRepeatsAllowed value="3"/>
<expectedSupplyDuration>
Expand Down
1 change: 1 addition & 0 deletions ig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ template = cqf.opioidcds.fhir.template#current
#template = /Users/Adam/Src/cqframework/cqf-opioidcds-ig-template
usage-stats-opt-out = false
fhir-version = 3.0.2

5 changes: 5 additions & 0 deletions ig.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,11 @@
"defns": "cdc-valueset-exclusion-definitions.html",
"base": "cdc-valueset-exclusion.html",
"source": "structuredefinition-cdc-valueset-exclusion.json"
},
"StructureDefinition/dataDateRoller": {
"defns": "dataDateRoller-definitions.html",
"base": "dataDataRoller.html",
"source": "structuredefinition-data-date-roller-extension.json"
}
}
}
22 changes: 22 additions & 0 deletions input-cache/txcache/snomed.cache
Original file line number Diff line number Diff line change
Expand Up @@ -830,3 +830,25 @@ v: {
"system" : "http:https://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http:https://snomed.info/sct",
"version" : "http:https://snomed.info/sct/731000124108",
"code" : "371422002"
}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "History of substance abuse",
"code" : "371422002",
"system" : "http:https://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http:https://snomed.info/sct",
"version" : "http:https://snomed.info/sct/731000124108",
"code" : "288821000119103"
}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "History of laxative abuse (situation)",
"code" : "288821000119103",
"system" : "http:https://snomed.info/sct"
}
-------------------------------------------------------------------------------------
11 changes: 11 additions & 0 deletions input-cache/txcache/ucum.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http:https://unitsofmeasure.org",
"code" : "d"
}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "d",
"code" : "d",
"system" : "http:https://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
116 changes: 116 additions & 0 deletions input/extensions/structuredefinition-data-date-roller-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"resourceType" : "StructureDefinition",
"id" : "dataDateRoller",
"url" : "http:https://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
"version" : "0.0.1",
"name" : "DataDateRollerExtension",
"title" : "Data Date-Roller Extension",
"status" : "draft",
"description" : "Declares the DateLastUpdated and Frequency arguments to be used by the Data Date Roller for maintaining/rolling test data dates to keep them from going stale.",
"jurisdiction": [
{
"coding": [
{
"system": "urn:iso:std:iso:3166",
"code": "US",
"display": "United States of America"
}
]
}
],
"fhirVersion" : "3.0.2",
"kind" : "complex-type",
"abstract" : false,
"contextType" : "resource",
"context": [ "Element"],
"type" : "Extension",
"baseDefinition" : "http:https://hl7.org/fhir/StructureDefinition/Extension",
"derivation" : "constraint",
"differential" : {
"element" : [{
"id" : "Extension",
"path" : "Extension",
"short" : "Data Date Roller Arguments",
"definition" : "The DateLastUpdated and Frequency arguments for the data date roller.",
"min" : 0,
"max" : "*"
},
{
"id" : "Extension.extension:dateLastUpdated",
"path" : "Extension.extension",
"sliceName" : "dateLastUpdated",
"short" : "Date that datetime-valued elements were last updated",
"definition" : "The date that datetime-valued elements of the resource were last updated.",
"min" : 0,
"max" : "1",
"type" : [{
"code" : "Extension"
}]
},
{
"id" : "Extension.extension:dateLastUpdated.extension",
"path" : "Extension.extension.extension",
"max" : "0"
},
{
"id" : "Extension.extension:dateLastUpdated.url",
"path" : "Extension.extension.url",
"type" : [{
"code" : "uri"
}],
"fixedUri" : "dateLastUpdated"
},
{
"id" : "Extension.extension:dateLastUpdated.value[x]",
"path" : "Extension.extension.value[x]",
"min" : 1,
"type" : [{
"code" : "dateTime"
}]
},
{
"id" : "Extension.extension:frequency",
"path" : "Extension.extension",
"sliceName" : "frequency",
"short" : "How often and by what offset the dateTime values should be adjusted forward",
"definition" : "Frequency is used to specify how often the dateTime-valued elements within the resource should have their values updated and also, the offset or duration by which they should be adjusted forward. The determination for when to update the values and by how much should be made by comparing the current dateTime to the value of dateLastUpdated. If the duration specified by frequency has elapsed since the dateLastUpdated value, then the dateTime-valued elements within the resource should all be updated - their value incremented by the duration specified in the frequency value.",
"min" : 0,
"max" : "1",
"type" : [{
"code" : "Extension"
}]
},
{
"id" : "Extension.extension:frequency.extension",
"path" : "Extension.extension.extension",
"max" : "0"
},
{
"id" : "Extension.extension:frequency.url",
"path" : "Extension.extension.url",
"type" : [{
"code" : "uri"
}],
"fixedUri" : "frequency"
},
{
"id" : "Extension.extension:frequency.value[x]",
"path" : "Extension.extension.value[x]",
"min" : 1,
"type" : [{
"code" : "Duration"
}]
},
{
"id" : "Extension.url",
"path" : "Extension.url",
"fixedUri" : "http:https://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller"
},
{
"id" : "Extension.value[x]",
"path" : "Extension.value[x]",
"min" : 0,
"max" : "0"
}]
}
}
8 changes: 8 additions & 0 deletions input/opioid-cds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,14 @@
<reference value="StructureDefinition/cdc-valueset-exclusion"/>
</sourceReference>
</resource>
<resource>
<example value="true"/>
<name value="Extension - Data Date Roller"/>
<description value="Extension for parameters to the Data Data Roller tooling."/>
<sourceReference>
<reference value="StructureDefinition/dataDateRoller"/>
</sourceReference>
</resource>
<!--
<resource>
<example value="true"/>
Expand Down
Loading

0 comments on commit fa6fead

Please sign in to comment.