Skip to content

Commit cc3ef07

Browse files
author
Grahame Grieve
committed
more Revise handling of inactive codes
1 parent 521586f commit cc3ef07

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

exec/pack/Messages.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,7 @@ VALUESET_TXVER_BATCH_NOT_SUPPORTED = The terminology server {2} used for the Cod
14721472
SD_ED_BIND_ALL_LOINC_CODES = This binding is to ALL LOINC codes, which includes part codes and answer list codes. The value set choice should be reviewed
14731473
SD_ED_BIND_ALLSCT_CODES = This binding is to ALL SNOMED CT codes, which includes qualifiers etc. The value set choice should be reviewed
14741474
SD_ED_BIND_ALL_CPT_CODES = This binding is to ALL CPT codes, which includes modifiers and internal metadata codes. The value set choice should be reviewed
1475-
INACTIVE_DISPLAY_FOUND_one = ''{1}'' is no longer considered a correct display for code ''{2}'' (status = {4}). The correct display is ''{3}''.
1476-
INACTIVE_DISPLAY_FOUND_other = ''{1}'' is no longer considered a correct display for code ''{2}'' (status = {4}). The correct display is one of {3}.
1477-
INACTIVE_CONCEPT_FOUND = The concept ''{1}'' has a status of {0} and its use should be reviewed.
1475+
INACTIVE_DISPLAY_FOUND_one = ''{1}'' is no longer considered a correct display for code ''{2}'' (status = {4}). The correct display is ''{3}''
1476+
INACTIVE_DISPLAY_FOUND_other = ''{1}'' is no longer considered a correct display for code ''{2}'' (status = {4}). The correct display is one of {3}
1477+
INACTIVE_CONCEPT_FOUND = The concept ''{1}'' has a status of {0} and its use should be reviewed
1478+
CONCEPT_DEPRECATED_IN_VALUESET = The presence of the concept ''{1}'' in the system ''{0}'' in the value set {3} is marked with a status of {2} and its use should be reviewed

library/fhir3/fhir3_utilities.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5207,6 +5207,7 @@ function TFhirCodeSystemHelper.isDeprecated(concept: TFhirCodeSystemConcept): bo
52075207
function TFhirCodeSystemHelper.codeStatus(concept: TFhirCodeSystemConcept): String;
52085208
var
52095209
p : TFhirCodeSystemConceptProperty;
5210+
s : String;
52105211
begin
52115212
result := '';
52125213
for p in concept.property_List do

library/ftx/fhir_valuesets.pas

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,7 @@ function TValueSetChecker.checkConceptSet(path : String; cs: TCodeSystemProvider
21572157
prep : TCodeSystemProviderFilterPreparationContext;
21582158
f : TCodeSystemProviderFilterContext;
21592159
filters : Array of TCodeSystemProviderFilterContext;
2160-
msg, c : String;
2160+
msg, c, sstatus : String;
21612161
cc : TFhirValueSetComposeIncludeConceptW;
21622162
cfl : TFslList<TFhirValueSetComposeIncludeFilterW>;
21632163
begin
@@ -2263,6 +2263,11 @@ function TValueSetChecker.checkConceptSet(path : String; cs: TCodeSystemProvider
22632263
begin
22642264
if vcc <> nil then
22652265
vcc.addCoding(cs.systemUri, cs.version, cs.code(FOpContext, loc), displays.preferredDisplay(FParams.workingLanguages));
2266+
sstatus := cc.getExtensionString('http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status');
2267+
if StringArrayExistsSensitive(['withdrawn', 'deprecated'], sstatus) then
2268+
op.addIssue(isWarning, itBusinessRule, addToPath(path, 'code'), 'CONCEPT_DEPRECATED_IN_VALUESET', FI18n.translate('CONCEPT_DEPRECATED_IN_VALUESET', FParams.HTTPLanguages, [cs.systemUri, code, sstatus, vs.vurl]), oicCodeComment)
2269+
else if cc.hasExtension('http://hl7.org/fhir/StructureDefinition/valueset-deprecated') then
2270+
op.addIssue(isWarning, itBusinessRule, addToPath(path, 'code'), 'CONCEPT_DEPRECATED_IN_VALUESET', FI18n.translate('CONCEPT_DEPRECATED_IN_VALUESET', FParams.HTTPLanguages, [cs.systemUri, code, 'deprecated', vs.vurl]), oicCodeComment);
22662271
result := true;
22672272
exit;
22682273
end;
@@ -3285,6 +3290,7 @@ function TFHIRValueSetExpander.includeCode(cs : TCodeSystemProvider; parent : TF
32853290
if (vsExtList <> nil) then
32863291
for ext in vsExtList do
32873292
if StringArrayExists([EXT_VSSUPPLEMENT, 'http://hl7.org/fhir/StructureDefinition/valueset-deprecated',
3293+
'http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status',
32883294
'http://hl7.org/fhir/StructureDefinition/valueset-concept-definition', 'http://hl7.org/fhir/StructureDefinition/coding-sctdescid',
32893295
'http://hl7.org/fhir/StructureDefinition/rendering-style', 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml'], ext.url) then
32903296
n.addExtensionV(ext.element.link);

release-notes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Change Notes for 3.8.8:
22

33
* Add support for testing snomed
4+
* Revise handling of inactive codes
45

56
## Conformance Notes:
67

7-
* tx.fhir.org passed 337 HL7 terminology service tests (mode 'tx.fhir.org', tests v1.7.7-SNAPSHOT, runner v6.6.0)
8+
* tx.fhir.org passed 344 HL7 terminology service tests (mode 'tx.fhir.org', tests v1.7.7-SNAPSHOT, runner v6.6.4)

0 commit comments

Comments
 (0)