Stream: implementers
Topic: Error
Pranitha Sruthi (Jan 12 2018 at 11:51):
Hi all, when I validate a profile on command prompt, an error is getting displayed as in the below screenshot. When I tried to remove the duplicate element ids, the slices are getting disappeared on forge. How can I fix the error? Thank youfluidbalance10hour.PNG
Lloyd McKenzie (Jan 12 2018 at 15:40):
Are your slice names unique?
Pranitha Sruthi (Jan 17 2018 at 06:18):
Yes. I have removed the duplicate slice names and still getting the same error. How can I fix it?
Lloyd McKenzie (Jan 17 2018 at 06:20):
You'll have to open up the indicated file and look at the snapshot and figure out which ids are duplicate
Pranitha Sruthi (Jan 17 2018 at 06:23):
I have already removed the duplicate slice names. Shall I check the snapshot for duplicate ids?
Lloyd McKenzie (Jan 17 2018 at 06:24):
yes
Pranitha Sruthi (Jan 17 2018 at 13:24):
@Lloyd McKenzie I did not find any duplicate id in the snapshot.
Lloyd McKenzie (Jan 17 2018 at 15:33):
Can you post your model here?
Lloyd McKenzie (Jan 18 2018 at 05:43):
What's generating that snapshot? It's a lot bigger than it needs to be/ought to be... When you say you remeoved the duplicate element ids, what elements were you removing?
Pranitha Sruthi (Jan 18 2018 at 05:47):
I had created that profile on forge. I have removed some duplicate slice names. How can I fix the error? But, I did not find duplicate element ids.
Lloyd McKenzie (Jan 18 2018 at 07:33):
Can you pipe the build log into a file so I can actually open it in a text editor? It's hard to do much with the screen shot
Pranitha Sruthi (Jan 18 2018 at 10:56):
I did not understand. How can I do that?
Vadim Peretokin (Jan 18 2018 at 12:50):
Copy the text from the console and paste it here
Lloyd McKenzie (Jan 18 2018 at 17:38):
Or run the build process from the command line and at the end put " > log.txt", then monitor the log file to see when it's done and attach the log file here.
Pranitha Sruthi (Jan 19 2018 at 06:11):
(deleted)
Pranitha Sruthi (Jan 19 2018 at 06:17):
Pranitha Sruthi (Jan 19 2018 at 06:18):
@Lloyd McKenzie Kindly review the error message
Ewout Kramer (Jan 19 2018 at 13:32):
I see many duplicate ids here: Observation.related.type to name one.
Lloyd McKenzie (Jan 19 2018 at 15:57):
Yes, but that's appearing in the midst of other Observation.related elements that are properly qualified with the slice name. If the ids are being generated by Forge, could there be a bug with Forge that's causing the slice name to not make it into the id in some cases? @Michel Rutten ?
Mounika (Feb 23 2018 at 07:28):
Hi all, when I am validating a profile getting the error as shown in the below screenshot. How can I fix the error. Thank you.
Capture6.PNG
Lloyd McKenzie (Feb 23 2018 at 15:45):
Some of those are your fault, some not. The "modifierReason" ones are because we changed the rules for the resources but not all resources are up to date yet. Hopefully they will be by ballot time... The type codes are not unique means you've set the data type for a choice element to something like "code|integer|code" - i.e. where the same data type appears more than once in the list. Take a look at the snapshot elements indicated and see what's happening. For the "start/end with a whitespace" issues, you've got leading or trailing spaces for some of your short descriptions. For the bad fixed values, I don't know what the issue is. If you want to share one or two of the snapshot.element entries it's complaining about, we might be able to diagnose.
Mounika (Feb 27 2018 at 07:03):
@Lloyd McKenzie I am unable to resolve the error Types must be unique by code. Please find the snapshot error in the below file. Thank you.snapshotError.txt
Lloyd McKenzie (Feb 27 2018 at 15:07):
I believe it's saying that this:
<type>
<code value="Reference" />
<targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" />
</type>
<type>
<code value="Reference" />
<targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest" />
</type>
<type>
<code value="Reference" />
<targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" />
</type>
...
Should be this:
<type>
<code value="Reference" />
<targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" />
<targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest" />
<targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" />
...
</type>
Lloyd McKenzie (Feb 27 2018 at 15:08):
Note that this is a recent change, so it won't be done by R3-based tools.
Mounika (Feb 28 2018 at 11:56):
Okay @Lloyd McKenzie Thank you.
Mounika (May 11 2018 at 07:01):
Hi all,
when I am validating a profile got the error as shown in the screen shot. How can I fix it.
Capture10.PNG
Lloyd McKenzie (May 11 2018 at 12:53):
Are you using the current version of the validator from http://build.fhir.org/downloads.html?
Mounika (May 11 2018 at 12:53):
yes
Lloyd McKenzie (May 11 2018 at 13:01):
(i.e. not the one at hl7.org/fhir)
Mounika (May 11 2018 at 13:14):
@Lloyd McKenzie I have downloaded the jar file from hl7.org/fhir. Still getting an error as in the below screenshot.
Capture11.PNG
Lloyd McKenzie (May 11 2018 at 13:17):
I was trying to confirm that you didn't get the one from hl7.org/fhir. You don't want that one - you want the one from build.fhir.org
Mounika (May 11 2018 at 13:25):
I already used the jar file downloaded from build.fhir.org. But got the error. Capture10.PNG
Lloyd McKenzie (May 11 2018 at 13:29):
What version is your structuredefinition?
Mounika (May 11 2018 at 13:34):
STU3
Lloyd McKenzie (May 11 2018 at 13:41):
@Grahame Grieve ?
Grahame Grieve (May 12 2018 at 04:52):
what version are you trying to validate?
Lloyd McKenzie (May 12 2018 at 05:08):
Answered previously in the thread - STU3
Grahame Grieve (May 12 2018 at 06:39):
so the stack shows that it's trying to read the v3 definitions as v4 - not sure why?
Pranitha Sruthi (May 15 2018 at 09:33):
Hi all, how can I fix the error displayed in the below screenshot? error.PNG Thank you
Grahame Grieve (May 15 2018 at 10:44):
what is your command line
Pranitha Sruthi (May 15 2018 at 10:49):
java -jar org.hl7.fhir.validator.jar C:\Users\VM\Desktop\CN-PFT\resources\cn-PatientProfile.structuredefinition.xml
Grahame Grieve (May 15 2018 at 10:57):
try this:
Grahame Grieve (May 15 2018 at 10:58):
java -jar org.hl7.fhir.validator.jar C:\Users\VM\Desktop\CN-PFT\resources\cn-PatientProfile.structuredefinition.xml -defn http://build.fhir.org
Pranitha Sruthi (May 15 2018 at 11:36):
Pranitha Sruthi (May 15 2018 at 11:37):
What is a definition file?
Lloyd McKenzie (May 15 2018 at 14:45):
It defines the content for the version of the specification being used.
Lloyd McKenzie (May 15 2018 at 14:45):
Try http://build.fhir.org/igpack.zip
Lloyd McKenzie (May 15 2018 at 14:46):
(rather than just http://build.fhir.org)
Pranitha Sruthi (May 16 2018 at 12:26):
@Lloyd McKenzie Shall I unzip the ig pack file or mention it in the command line as java -jar org.hl7.fhir.validator.jar C:\Users\VM\Desktop\CN-PFT\resources\cn-PatientProfile.structuredefinition.xml http://build.fhir.org/igpack.zip?
Lloyd McKenzie (May 16 2018 at 14:43):
Mention it in the commandline
Vanitha (May 17 2018 at 11:33):
Hello All,
While validating profiles using r4 validator (http://build.fhir.org) , I am getting the following exception.How can I fix that . Thank you.
Ex.png
Lloyd McKenzie (May 17 2018 at 11:55):
@Grahame Grieve - this seems to be related to a missing package id
Mounika (May 30 2018 at 07:04):
Hi all,
I got the success validation using R4 validator. But whenever I tried to validate using STU3 validator (https://www.hl7.org/fhir/), I got the error as shown in the below screenshot. Which validator shall I consider?
Capture18.PNG
Grahame Grieve (May 30 2018 at 08:07):
you always use the R4 validator
Mounika (May 30 2018 at 08:50):
@Grahame Grieve But my profile was created using forge STU3.
Grahame Grieve (May 30 2018 at 08:51):
sure. just tell the validator to use the r3 definitions
Grahame Grieve (May 30 2018 at 08:51):
-ig hl7.fhir.org-3.0.1
Mounika (May 30 2018 at 09:02):
@Grahame Grieve I am confused. Can you explain in detail. Thank you.
Grahame Grieve (May 30 2018 at 09:08):
the r4 validator is the correct way to validate for versions 2,3, and current.
Grahame Grieve (May 30 2018 at 09:09):
you tell it that it's validating R3 not R4 by telling it to load the R3 core package, using the -ig parameter as above
Lloyd McKenzie (May 30 2018 at 13:24):
Don't think of the R4 validator as an "R4 validator". Think of it as "The current validator". The one posted with R3 is "the old validator" (that doesn't really work anymore)
Mounika (May 31 2018 at 09:28):
Hi @Lloyd McKenzie, My profile was created using Observation resource in Forge STU3 which has an element Observation.related. Obs.PNG
But I am using the current version for publishing our IG which which has Observation.hasmember Observaion.PNG .
May I know how it is validating? Thank you.
Lloyd McKenzie (May 31 2018 at 12:55):
You can't use Forge to author against current build. Forge can only create IGs against STU3.
Mounika (May 31 2018 at 13:07):
Ok. I want to use the current IG publisher. How can I do that?
Lloyd McKenzie (May 31 2018 at 13:15):
You can use the current IGPublisher, but you can't author an R4-based IG.
Grahame Grieve (May 31 2018 at 20:47):
what can't you do?
Mounika (Jun 01 2018 at 05:35):
@Lloyd McKenzie Shall I use R3 publisher for DSTU3 profile validation?
Eric Haas (Jun 01 2018 at 06:01):
FHIR version for the IG | Creating profiles in Forge? | IG Publisher version(and validator) |
---|---|---|
DSTU2 | Y | CURRENT BUILD |
STU3 | Y | CURRENT BUILD |
R4 | Not Yet (will need to hand edit) | CURRENT BUILD |
Grahame Grieve (Jun 01 2018 at 06:22):
@Eric Haas why "Not Yet (will need to hand edit)"? I think it should work
Mounika (Jun 01 2018 at 07:01):
-ig hl7.fhir.org-3.0.1
@Grahame Grieve I had tried this command using R4 publisher. But I got this error. How to fix it? Capture21.PNG
Mounika (Jun 01 2018 at 07:05):
FHIR version for the IG Creating profiles in Forge? IG Publisher version(and validator) DSTU2 Y CURRENT BUILD STU3 Y CURRENT BUILD R4 Not Yet (will need to hand edit) CURRENT BUILD
@Eric Haas We created lot of profiles using STU3. I want to use Current build IG publisher. How to upgrade these profiles to the current version?
Grahame Grieve (Jun 01 2018 at 07:09):
sorry.
Grahame Grieve (Jun 01 2018 at 07:09):
-ig hl7.fhir.core-3.0.1
Grahame Grieve (Jun 01 2018 at 07:11):
you don't need to upgrade the profiles to the current version. you just use them in the version they are in. Have you read the documentation carefully?
Grahame Grieve (Jun 01 2018 at 07:13):
specifically: http://wiki.hl7.org/index.php?title=IG_Publisher_Documentation#Loading_Resources
Last updated: Apr 12 2022 at 19:14 UTC