Stream: IG creation
Topic: creating example custom StructureDefinition fails due to url
David Pyke (Sep 14 2021 at 16:28):
I'm working on the pCREDS ig and we're using structureDefinition for sending the mappings we want. when I create an example instance, the url should point to where the published map will be, not an ig. However, when I point to a URL that isn't the IG (or put in a UUID, etc.) the publisher fails with:
David Pyke (Sep 14 2021 at 16:28):
java.lang.Exception: Error generating snapshot for Cath-PCI Submission StructureDefinition(CathPCI): Cannot find or generate snapshot for base definition (null from http://hl7.org/fhir/cda/StructureDefinition/cathpci-map)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:4632)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3919)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:897)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:752)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8664)
Caused by: java.lang.Exception: Cannot find or generate snapshot for base definition (null from http://hl7.org/fhir/cda/StructureDefinition/cathpci-map)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:4649)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:4630)
David Pyke (Sep 14 2021 at 16:29):
(the URL doesn't matter, that example was playing around with things. I was hoping to point to a different server)
David Pyke (Sep 14 2021 at 16:32):
Do I need to point to the StructureDefinition profile it's based on?
David Pyke (Sep 14 2021 at 16:41):
@Grahame Grieve ?
Grahame Grieve (Sep 14 2021 at 16:51):
you're trying to point to a structure definition that doesn't exist?
David Pyke (Sep 14 2021 at 16:52):
It does exist, it's the one that's being created as an instance of the profile on StructureDefinition
David Pyke (Sep 14 2021 at 16:52):
It hasn't been published anywhere, though
Grahame Grieve (Sep 14 2021 at 16:56):
well, how would the IG publisher find it?
David Pyke (Sep 14 2021 at 16:56):
No idea. Can I tell it not to look? IT doesnt' need to validate the example's url
David Pyke (Sep 14 2021 at 16:59):
The definition of StructureDefinition.url says "is published (or will be published)" so it shouldn't matter
Grahame Grieve (Sep 14 2021 at 17:03):
it doesn't matter whether it's published or not. Only that the IG publisher knows about it
David Pyke (Sep 14 2021 at 17:03):
It should, it's an instance of an existing profile
Grahame Grieve (Sep 14 2021 at 17:04):
well, I don't really know what you're doing. The URL you quote doesn't exist, and isn't valid. And won't be. But it looks like you don't have a base definition?
David Pyke (Sep 14 2021 at 17:08):
I don't understand
David Pyke (Sep 14 2021 at 17:10):
And it doesnt' matter what I put in, even a UUID, I get the same error
Grahame Grieve (Sep 14 2021 at 17:31):
put in what? can we start this again... you have two structure definitions, with canonical urls of ?
David Pyke (Sep 14 2021 at 17:35):
I have a profile of StructureDef with the URL of http://hl7.org/fhir/us/fhir-registry-protocols-ig/StructureDefinition/CREDSStructureDefinition. I have an example instance of that profile which fails, no matter what I put in the .url
John Moehrke (Sep 14 2021 at 17:39):
github repo so we can see the source?
Grahame Grieve (Sep 14 2021 at 17:39):
so you've profiled StructureDefinition itself?
Grahame Grieve (Sep 14 2021 at 17:39):
what did you put in the example instance?
David Pyke (Sep 14 2021 at 18:02):
https://github.com/HL7/fhir-registry-protocols-ig
Grahame Grieve (Sep 14 2021 at 18:44):
I have no idea what the CathPci definition is trying to do, but it's not something that the tools support.
David Pyke (Sep 14 2021 at 18:45):
Okay, so, I'll have to manually create the examples.
Grahame Grieve (Sep 14 2021 at 18:45):
I don't know about manually or not, but it's not a valid structure definition as far as the tools are concerned
David Pyke (Sep 14 2021 at 18:46):
Okay, then I'll have to see what I need to do to make them valid
Grahame Grieve (Sep 14 2021 at 18:46):
it claims to be an abstract definition of a new base type, but the tools only have one specially known base type, Base. But then it presents a snap shot that just jumps straight into a deep path inside a structure, a path that can't exist
Grahame Grieve (Sep 14 2021 at 18:47):
I can't even tell what you're actually trying to do here
David Pyke (Sep 14 2021 at 18:47):
I'm trying to set a mapping path between data needed for a registry and where that data could be found in FHIR/CDA/V2, etc.
David Pyke (Sep 14 2021 at 18:48):
So, for last name, I put the mapping to be the places in FHIR Patient, CDA and an ADT message
David Pyke (Sep 14 2021 at 18:49):
So, you would send this SD to a remote system would would pull the data based on the mappings in the SD
David Pyke (Sep 14 2021 at 18:49):
YOu would then put the data into the Profile specified in the targetProfile element for inclusion in the submission Bundle
David Pyke (Sep 14 2021 at 18:51):
THe CathPCI instance is a (small) example of the mappings they have for their data submissions to the ACC Cath-PCI registry
Grahame Grieve (Sep 14 2021 at 18:52):
but you can only do that with a structure definition if you have a structure that's actually defined. This profile doesn't do anything like that, so the tools go bang.
Grahame Grieve (Sep 14 2021 at 18:52):
what's cathPci.snapshot.episodeUniqueKey? Where's it defined?
David Pyke (Sep 14 2021 at 18:52):
Oh, now I get it.
David Pyke (Sep 14 2021 at 18:53):
Okay, it's not defined outside that SD. So it makes sense that the tools go bang
Grahame Grieve (Sep 14 2021 at 18:53):
right. you need to define it, in order to do this, and then provide it as a definition, and then change to doing a derived profile on the base definition, and doing it in a differential, or just do it as a logical model and define the structure properly
David Pyke (Sep 14 2021 at 18:54):
Okay, that I can fix
David Pyke (Sep 14 2021 at 18:54):
Thank you
Last updated: Apr 12 2022 at 19:14 UTC