Stream: shorthand
Topic: boolean value in example of ~Observation
Peter Robinson (Jun 07 2021 at 19:46):
Hi everybody,
I am trying to create an example to show how to use PhenotypicFeature, from our incipient Phenopacket IG.
This is the definition
Profile: PhenotypicFeature
Parent: Observation
Id: PhenotypicFeature
Title: "Phenotypic Feature"
Description: "This profile defines the GA4GH PhenotypicFeature element in terms of the FHIR Condition"
- ^version = "0.1.0"
- ^status = #active
- ^date = "2021-06-03T09:49:00-04:00"
- ^publisher = "GA4GH Phenopacket Working Group"
- ^contact.name = "Peter Robinson"
- code 1..1 MS
- value[x] 1..1 MS
- value[x] only valueBoolean
- value[x] ^short = "true: observed; false: excluded"
- specimen ..0
- device ..0
- referenceRange ..0
- hasMember ..0
- component ..0
I am trying to assign a value of true to the Observation.value element. The following leads to the
error "Cannot assign boolean value on this element since this element does not have a single type"
Instance: arachnodactyly
InstanceOf: PhenotypicFeature
Description: "PhenotypicFeature Example for arachnodactyly"
- id = "id.1"
- status = #active "active"
- subject = Reference(example-patient)
- code = $hpo#HP:0001166 "Arachnodactyly"
- value[x] = true
I have been trying to figure this one out for some time but must be missing something. Any ideas?
thanks! Peter
Nick Freiter (Jun 07 2021 at 19:51):
On the Instance
, you should assign the true
value to an element called valueBoolean
. So the last line of the Instance
should be:
* valueBoolean = true
And then additionally this line:
* value[x] only valueBoolean
should be just:
* value[x] only boolean
Peter Robinson (Jun 07 2021 at 20:59):
Thanks -- got it. However, the boolean value does not actually appear in the generated example, e.g., I am expecting to see a value of true (or false) for this HPO code. Am I trying to do something that does not make sense?
<Observation xmlns="http://hl7.org/fhir">
<id value="id.1"/>
<meta>
<profile
value="https://github.com/phenopackets/core-ig/StructureDefinition/PhenotypicFeature"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative</b></p><p><b>status</b>: active</p><p><b>code</b>: <span title="Codes: {http://github.com/phenopackets/core-ig/CodeSystem/hpo HP:0001166}">Arachnodactyly</span></p><p><b>subject</b>: <a href="Patient-example-patient.html">Generated Summary: Medical Record Number: m123 (USUAL); Anyname A. Anyperson ; gender: male; birthDate: 2001-01-20</a></p></div>
</text>
<status value="active"/>
<code>
<coding>
<system value="http://github.com/phenopackets/core-ig/CodeSystem/hpo"/>
<code value="HP:0001166"/>
<display value="Arachnodactyly"/>
</coding>
</code>
<subject>
<reference value="Patient/example-patient"/>
</subject>
</Observation>
Chris Moesel (Jun 07 2021 at 23:57):
@Peter Robinson - when I run this on FSHOnline, it looks like SUSHI creates the boolean value correctly. Go to: https://fshschool.org/FSHOnline/#/share/3uVS31r then click "Convert to JSON" and choose your instance "id.1" on the right-hand side to see it.
Chris Moesel (Jun 07 2021 at 23:58):
What you pasted here is XML, so that must be after it is run through the publisher. You might look at what is in /fsh-generated
to see if SUSHI is exporting it correctly but it is (for some reason) being dropped by the IG Publisher.
Peter Robinson (Jun 08 2021 at 11:49):
Indeed, SUSHI exports this correctly. For some reason the publisher is dropping this. The only warnings/errors I see in the publisher build are
[get] Error opening connection java.io.FileNotFoundException: https://github.com/HL7/JIRA-Spec-Artifacts/raw/master/xml/FHIR-us-ga4gh.phenopacket.xml
[get] Error opening connection java.io.FileNotFoundException: https://github.com/HL7/JIRA-Spec-Artifacts/raw/master/xml/FHIR-us-ga4gh.phenopacket.xml
[get] Error opening connection java.io.FileNotFoundException: https://github.com/HL7/JIRA-Spec-Artifacts/raw/master/xml/FHIR-us-ga4gh.phenopacket.xml
[get] Can't get https://github.com/HL7/JIRA-Spec-Artifacts/raw/master/xml/FHIR-us-ga4gh.phenopacket.xml to /home/peter/GIT/core-ig/input-cache/jiraspec.xml
Outcome of trying to fetch existing package-list.json: https://github.com/phenopackets/core-ig/package-list.json?nocache=1623152409633
Finished. Times: loading: 00:00.0259, generate: 00:32.0194, narrative generation: 00:11.0558, realm-rules: 00:02.0265, previous-version: 00:00.0000, jekyll: 00:04.0710, validation: 00:00.0651 (#36), template: 00:01.0385 (#3) (01:13.0488)
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
context [anonymous] 2:13 attribute path isn't defined
Validation output in /home/peter/GIT/core-ig/output/qa.html
Errors: 28, Warnings: 30, Info: 23, Broken Links = 26 (01:13.0740)
Is there some way of getting more specific error messages?
Nick Freiter (Jun 08 2021 at 14:39):
I'm not sure if there is a way to get more specific error messages. I tried this in the publisher with one single FSH file containing the FSH here: https://fshschool.org/FSHOnline/#/share/3cnmffi (note that I set the $hpo
alias to just some url because I wasn't sure what it should be). It seemed to work fine for me in the publisher. Is there any way you could give us to replicate this?
Nick Freiter (Jun 08 2021 at 16:19):
I see now that https://github.com/phenopackets/core-ig/ looks like the place I was looking for, but it appears that repo is still using the original FSH you posted.
Peter Robinson (Jun 08 2021 at 16:25):
I just updated and merged the changes to master, https://github.com/phenopackets/core-ig,
Nick Freiter (Jun 08 2021 at 17:10):
In the master
branch I'm still seeeing this line, which is
* value[x] = true
which should change to:
* valueBoolean = true
Peter Robinson (Jun 08 2021 at 18:28):
Sorry -- I see now that I fixed the profile but not the example. Now it works. Thanks!
Last updated: Apr 12 2022 at 19:14 UTC