FHIR Chat · Canonical(PlanDefinition) on CareplanResource · shorthand

Stream: shorthand

Topic: Canonical(PlanDefinition) on CareplanResource


view this post on Zulip Juan Manuel Caputo (Nov 23 2021 at 13:25):

Hello im working with the Careplan resource, and im triying to restrict the datatype of the property instantiates Canonical. Im doing what is explained in the SHORTHAND documentation.

  • instantiatesCanonical 0..1
  • instantiatesCanonical only Canonical(PlanDefinition)

But im getting this error:


error mismatched input 'Canonical(PlanDefinition)' expecting {OR_REFERENCE, PIPE_REFERENCE, SEQUENCE}
File: C:\Git-Repos\Master\Immunization\Documentation\FHIR-Shorthand\fish-files\input\fsh\OHCCarePlan.fsh
Line: 24
info Preprocessed 94 documents with 20 aliases.
error Error in parsing: Cannot read property 'getText' of null
File: C:\Git-Repos\Master\Immunization\Documentation\FHIR-Shorthand\fish-files\input\fsh\OHCCarePlan.fsh
Line: 2 - 76


Does anyone know what im doing wrong?.
Thanks in advance.

view this post on Zulip Chris Moesel (Nov 23 2021 at 14:17):

Hi @Juan Manuel Caputo. What version of SUSHI are you using? You can find out by typing sushi -v. Please ensure you are using the latest version, which is currently SUSHI 2.2.0.

view this post on Zulip Chris Moesel (Nov 23 2021 at 19:05):

This seems to be working fine in FSH Online (which uses SUSHI 2.1.1): https://fshschool.org/FSHOnline/#/share/3cJCi6Shttps://fshschool.org/FSHOnline/#/share/3cJCi6S

view this post on Zulip Juan Manuel Caputo (Nov 24 2021 at 08:54):

@Chris Moesel you are rigth I had the version SUSHI v1.0.1.
After updating the version apparead two errors recurrently that in the previous version I didn't have:

  1. In every codesystem that I have :
    error The first rule of a definition must be left-aligned. The rule will be processed as if it is not indented.
    File: C:\Git-Repos\Master\Immunization\Documentation\FHIR-Shorthand\fish-files\input\fsh\VaccVacunasXHISSystem.fsh
    Line: 81

  2. For the slicing :
    MedicationRequest.note ^slicing.rules: Missing required value
    File: C:\Git-Repos\Master\Immunization\Documentation\FHIR-Shorthand\fish-files\input\fsh\DC4HMedicationRequest.fsh
    Line: 2 - 99
    error MedicationRequest.note ^slicing.discriminator[0].path: Missing required value
    File: C:\Git-Repos\Master\Immunization\Documentation\FHIR-Shorthand\fish-files\input\fsh\DC4HMedicationRequest.fsh
    Line: 2 - 99

What I have to change to correct this errors???.

Thank you very much.

view this post on Zulip Juan Manuel Caputo (Nov 24 2021 at 11:30):

@Chris Moesel Finally I manage to solve all the problems, the solutions were :

  1. In the codesystes there were blank spaces before every line. for example, I mark blank space with the char "-" so it can be visualized here :

-CodeSystem: DosisStateCodeSystem
-Id: dosis-state-code-system
-Title: "Dosis-State-Code-System"
-Description: "Codes for identifying The Sate of an dosis of a vaccine in the xHIS System"
-* #0 "Pending"
-* #1 "Administrated"

After removing the blank spaces, the problem solved.

  1. In the version 1.1.0 it was not necesary to put int .sh the rules and path of the discriminator, after doing this the problem solved.
  2. Finally with the update of sushi I could restrict the datatype of the property instantiatesCanonical to PlanDefinition.

Thank you very much.

Regards.

Juanello.


Last updated: Apr 12 2022 at 19:14 UTC