FHIR / sushi

SUSHI (aka "SUSHI Unshortens Short Hand Inputs") is a reference implementation command-line interpreter/compiler for FHIR Shorthand (FSH).
Apache License 2.0
145 stars 44 forks source link

Log error for ValueSet self-reference #1487

Closed mint-thompson closed 1 month ago

mint-thompson commented 3 months ago

Transferred from internal JIRA issue originally created 2024-03-06.

A component rule on a ValueSet should not reference itself. If this happens, log an error and skip the rule.

Alias: SCT = http://snomed.info/sct

Profile: MyServiceReqeust
Parent: ServiceRequest
Title: "Radiotherapy Plan Prescription"
Description: "A Radiotherapy Plan Prescription is a request for radiotherapy treatment with a single treatment plan."
* category from MaxVS (extensible)

ValueSet: MaxVS
Title: "Category Code Max Value Set"
Description: "Category value set required to support backward compatibility by including an inactive SNOMED code"
* ^experimental = false
* include codes from valueset MaxVS
* SCT#108290001 "Radiation oncology AND/OR radiotherapy (procedure)" // this code is inactive  

In the above FSH, the rule * include codes from valueset MaxVS should cause an error and be skipped.