Skip to content

Commit

Permalink
Fixes #4471 - DetectedIssue.status valueset and search param (#4483)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyebberson committed May 1, 2024
1 parent f610371 commit 09d9593
Show file tree
Hide file tree
Showing 7 changed files with 196 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/definitions/dist/fhir/r4/profiles-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -119211,7 +119211,7 @@
}],
"strength" : "required",
"description" : "Indicates the status of the identified issue.",
"valueSet" : "http://hl7.org/fhir/ValueSet/observation-status|4.0.1"
"valueSet" : "http://hl7.org/fhir/ValueSet/detectedissue-status"
},
"mapping" : [{
"identity" : "workflow",
Expand Down
37 changes: 37 additions & 0 deletions packages/definitions/dist/fhir/r4/search-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -17528,6 +17528,43 @@
"VisionPrescription"]
}
},
{
"fullUrl" : "http://hl7.org/fhir/SearchParameter/DetectedIssue-status",
"resource" : {
"resourceType" : "SearchParameter",
"id" : "DetectedIssue-status",
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "trial-use"
}],
"url" : "http://hl7.org/fhir/SearchParameter/DetectedIssue-status",
"version" : "4.0.1",
"name" : "status",
"status" : "draft",
"experimental" : false,
"date" : "2019-11-01T09:29:23+11:00",
"publisher" : "Health Level Seven International (Orders and Observations)",
"contact" : [{
"telecom" : [{
"system" : "url",
"value" : "http://hl7.org/fhir"
}]
},
{
"telecom" : [{
"system" : "url",
"value" : "http://www.hl7.org/Special/committees/orders/index.cfm"
}]
}],
"description" : "The status of the detected issue",
"code" : "status",
"base" : ["DetectedIssue"],
"type" : "token",
"expression" : "DetectedIssue.status",
"xpath" : "f:DetectedIssue/f:status",
"xpathUsage" : "normal"
}
},
{
"fullUrl" : "http://hl7.org/fhir/SearchParameter/Device-device-name",
"resource" : {
Expand Down
145 changes: 145 additions & 0 deletions packages/definitions/dist/fhir/r4/valuesets.json
Original file line number Diff line number Diff line change
Expand Up @@ -156515,5 +156515,150 @@
}]
}
}
},
{
"fullUrl" : "http://hl7.org/fhir/detectedissue-status",
"resource" : {
"resourceType" : "CodeSystem",
"id" : "detectedissue-status",
"meta" : {
"lastUpdated" : "2023-03-26T15:21:02.749+11:00",
"profile" : ["http://hl7.org/fhir/StructureDefinition/shareablecodesystem"]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>This code system <code>http://hl7.org/fhir/detectedissue-status</code> defines the following codes:</p><table class=\"codes\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td></tr><tr><td style=\"white-space:nowrap\">mitigated<a name=\"detectedissue-status-mitigated\"> </a></td><td>Mitigated</td><td>Indicates the detected issue has been mitigated</td></tr></table></div>"
},
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "cds"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "trial-use"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger" : 1
}],
"url" : "http://hl7.org/fhir/detectedissue-status",
"identifier" : [{
"system" : "urn:ietf:rfc:3986",
"value" : "urn:oid:2.16.840.1.113883.4.642.4.2026"
}],
"version" : "5.0.0",
"name" : "DetectedIssueStatus",
"title" : "Detected Issue Status",
"status" : "active",
"experimental" : false,
"date" : "2021-01-05T10:01:24+11:00",
"publisher" : "HL7 (FHIR Project)",
"contact" : [{
"telecom" : [{
"system" : "url",
"value" : "http://hl7.org/fhir"
},
{
"system" : "email",
"value" : "fhir@lists.hl7.org"
}]
}],
"description" : "Indicates the status of the detected issue. This code system contains only status codes that are not already defined and used from the ObservationStatus code system.",
"jurisdiction" : [{
"coding" : [{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}]
}],
"caseSensitive" : true,
"content" : "complete",
"concept" : [{
"code" : "mitigated",
"display" : "Mitigated",
"definition" : "Indicates the detected issue has been mitigated"
}]
}
},
{
"fullUrl" : "http://hl7.org/fhir/ValueSet/detectedissue-status",
"resource" : {
"resourceType" : "ValueSet",
"id" : "detectedissue-status",
"meta" : {
"lastUpdated" : "2023-03-26T15:21:02.749+11:00",
"profile" : ["http://hl7.org/fhir/StructureDefinition/shareablevalueset"]
},
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>This value set includes codes based on the following rules:</p><ul><li>Include these codes as defined in <a href=\"codesystem-observation-status.html\"><code>http://hl7.org/fhir/observation-status</code></a><table class=\"none\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td><td><b><a href=\"valueset-resource-status.html\">Canonical Mapping for &quot;Detected Issue Status&quot;</a></b></td></tr><tr><td><a href=\"codesystem-observation-status.html#observation-status-preliminary\">preliminary</a></td><td>Preliminary</td><td>This is an initial or interim observation: data may be incomplete or unverified.</td><td><span title=\"EQUIVALENT\">~</span><a href=\"codesystem-resource-status.html#resource-status-draft\">draft</a></td></tr><tr><td><a href=\"codesystem-observation-status.html#observation-status-final\">final</a></td><td>Final</td><td>The observation is complete and there are no further actions needed. Additional information such &quot;released&quot;, &quot;signed&quot;, etc. would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied.</td><td><span title=\"EQUIVALENT\">~</span><a href=\"codesystem-resource-status.html#resource-status-complete\">complete</a></td></tr><tr><td><a href=\"codesystem-observation-status.html#observation-status-entered-in-error\">entered-in-error</a></td><td>Entered in Error</td><td>The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be &quot;cancelled&quot; rather than &quot;entered-in-error&quot;.).</td><td><span title=\"EQUIVALENT\">~</span><a href=\"codesystem-resource-status.html#resource-status-error\">error</a></td></tr></table></li><li>Include these codes as defined in <a href=\"codesystem-detectedissue-status.html\"><code>http://hl7.org/fhir/detectedissue-status</code></a><table class=\"none\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td><td><b><a href=\"valueset-resource-status.html\">Canonical Mapping for &quot;Detected Issue Status&quot;</a></b></td></tr><tr><td><a href=\"codesystem-detectedissue-status.html#detectedissue-status-mitigated\">mitigated</a></td><td>Mitigated</td><td>Indicates the detected issue has been mitigated</td><td><span title=\"EQUIVALENT\">~</span><a href=\"codesystem-resource-status.html#resource-status-inactive\">inactive</a></td></tr></table></li></ul></div>"
},
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "cds"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "trial-use"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger" : 2
}],
"url" : "http://hl7.org/fhir/ValueSet/detectedissue-status",
"identifier" : [{
"system" : "urn:ietf:rfc:3986",
"value" : "urn:oid:2.16.840.1.113883.4.642.3.3158"
}],
"version" : "5.0.0",
"name" : "DetectedIssueStatus",
"title" : "Detected Issue Status",
"status" : "draft",
"experimental" : false,
"date" : "2020-12-28T16:55:11+11:00",
"publisher" : "HL7 (FHIR Project)",
"contact" : [{
"telecom" : [{
"system" : "url",
"value" : "http://hl7.org/fhir"
},
{
"system" : "email",
"value" : "fhir@lists.hl7.org"
}]
}],
"description" : "Indicates the status of a detected issue",
"jurisdiction" : [{
"coding" : [{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}]
}],
"compose" : {
"include" : [{
"system" : "http://hl7.org/fhir/observation-status",
"concept" : [{
"code" : "preliminary",
"display" : "Preliminary"
},
{
"code" : "final",
"display" : "Final"
},
{
"code" : "entered-in-error",
"display" : "Entered in Error"
}]
},
{
"system" : "http://hl7.org/fhir/detectedissue-status",
"concept" : [{
"code" : "mitigated",
"display" : "Mitigated"
}]
}]
}
}
}]
}
2 changes: 1 addition & 1 deletion packages/fhirtypes/dist/DetectedIssue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export interface DetectedIssue {
/**
* Indicates the status of the detected issue.
*/
status: 'registered' | 'preliminary' | 'final' | 'amended' | 'corrected' | 'cancelled' | 'entered-in-error' | 'unknown';
status: 'preliminary' | 'final' | 'entered-in-error' | 'mitigated';

/**
* Identifies the general type of issue identified.
Expand Down
2 changes: 0 additions & 2 deletions packages/generator/src/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ function buildCreateTables(result: SchemaDefinition, resourceType: string, fhirT
name: resourceType + '_Token',
columns: [
{ name: 'resourceId', type: 'UUID NOT NULL' },
{ name: 'index', type: 'INTEGER' },
{ name: 'code', type: 'TEXT NOT NULL' },
{ name: 'system', type: 'TEXT' },
{ name: 'value', type: 'TEXT' },
Expand Down Expand Up @@ -401,7 +400,6 @@ function buildValueSetElementTable(result: SchemaDefinition): void {
result.tables.push({
name: 'ValueSetElement',
columns: [
{ name: 'id', type: 'UUID NOT NULL PRIMARY KEY' }, // Deprecated - to be removed
{ name: 'resourceId', type: 'UUID NOT NULL' },
{ name: 'system', type: 'TEXT' },
{ name: 'code', type: 'TEXT' },
Expand Down
1 change: 1 addition & 0 deletions packages/server/src/migrations/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ export * as v64 from './v64';
export * as v65 from './v65';
export * as v66 from './v66';
export * as v67 from './v67';
export * as v68 from './v68';
11 changes: 11 additions & 0 deletions packages/server/src/migrations/schema/v68.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Generated by @medplum/generator
* Do not edit manually.
*/

import { PoolClient } from 'pg';

export async function run(client: PoolClient): Promise<void> {
await client.query('ALTER TABLE IF EXISTS "DetectedIssue" ADD COLUMN IF NOT EXISTS "status" TEXT');
await client.query('CREATE INDEX CONCURRENTLY IF NOT EXISTS DetectedIssue_status_idx ON "DetectedIssue" ("status")');
}

0 comments on commit 09d9593

Please sign in to comment.