Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when adding a caret rule to a versioned code in a ValueSet #1492

Closed
sebg-mio42 opened this issue Jul 16, 2024 · 1 comment · Fixed by #1493
Closed

Error when adding a caret rule to a versioned code in a ValueSet #1492

sebg-mio42 opened this issue Jul 16, 2024 · 1 comment · Fixed by #1493

Comments

@sebg-mio42
Copy link
Contributor

Adding a caret rule like a designation to a versioned code in a ValueSet currently causes an error.

For example this FSH ValueSet with a designation for a specific version of SNOMED:

ValueSet: Test
Id: test
Title: "Test"
Description: "test"
* http://snomed.info/sct#182869005 "Drug not taken - patient lost tablets (situation)"
  * ^designation[0].language = #de
  * ^designation[0].value = "Medikament nicht eingenommen wegen Verlust des Arzneimittels"
* http://snomed.info/sct|http://snomed.info/sct/11000274103/version/20240515#182879007 "Medication decreased (finding)"
  * ^designation[0].language = #de
  * ^designation[0].value = "Dosisreduktion" 

This causes the following errors:

error Could not find concept http://snomed.info/sct|http://snomed.info/sct/11000274103/version/20240515#182879007, skipping rule.
  File: ...\input\fsh\vs_test.fsh
  Line: 9
error Could not find concept http://snomed.info/sct|http://snomed.info/sct/11000274103/version/20240515#182879007, skipping rule.
  File: ...\input\fsh\vs_test.fsh
  Line: 10

and the output JSON does not include the designation:

{
  "resourceType": "ValueSet",
  "status": "draft",
  "name": "Test",
  "id": "test",
  "title": "Test",
  "description": "test",
  "url": "http://example.org/ValueSet/test",
  "compose": {
    "include": [
      {
        "system": "http://snomed.info/sct",
        "concept": [
          {
            "code": "182869005",
            "display": "Drug not taken - patient lost tablets (situation)",
            "designation": [
              {
                "language": "de",
                "value": "Medikament nicht eingenommen wegen Verlust des Arzneimittels"
              }
            ]
          }
        ]
      },
      {
        "system": "http://snomed.info/sct",
        "version": "http://snomed.info/sct/11000274103/version/20240515",
        "concept": [
          {
            "code": "182879007",
            "display": "Medication decreased (finding)"
          }
        ]
      }
    ]
  }
}

Expected output would be no errors and the following JSON:

{
  "resourceType": "ValueSet",
  "status": "draft",
  "name": "Test",
  "id": "test",
  "title": "Test",
  "description": "test",
  "url": "http://example.org/ValueSet/test",
  "compose": {
    "include": [
      {
        "system": "http://snomed.info/sct",
        "concept": [
          {
            "code": "182869005",
            "display": "Drug not taken - patient lost tablets (situation)",
            "designation": [
              {
                "language": "de",
                "value": "Medikament nicht eingenommen wegen Verlust des Arzneimittels"
              }
            ]
          }
        ]
      },
      {
        "system": "http://snomed.info/sct",
        "version": "http://snomed.info/sct/11000274103/version/20240515",
        "concept": [
          {
            "code": "182879007",
            "display": "Medication decreased (finding)",
            "designation": [
              {
                "language": "de",
                "value": "Dosisreduktion"
              }
            ]
          }
        ]
      }
    ]
  }
}
@cmoesel
Copy link
Member

cmoesel commented Jul 16, 2024

Thanks for finding and reporting this issue, @sebg-mio42. I've created a FSH Online link that also reproduces it: https://fshschool.org/FSHOnline/#/share/3WomCxu

And I see you've submitted a PR to fix it. That's great! I'll go take a look...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants