FHIR Chat · generating profile snapshots · implementers

Stream: implementers

Topic: generating profile snapshots


view this post on Zulip Ben Spencer (Apr 28 2017 at 10:33):

is there a tool (ideally cli) to generate a snapshot from a differential StructureDefinition?

view this post on Zulip Lloyd McKenzie (Apr 28 2017 at 13:55):

Both the .NET and Java implementations can do this. I know the Java one isn't set up for command-line invocation and I don't think the Java one is either. If you wanted to add that capability, we'd be happy to add that into the official code. My recommendation would be to have it work similar to the validator where you can request multiple instances be processed with a single invocation as there's a large overhead (many seconds) to perform the initial load of the spec and any related implementation guides.

view this post on Zulip Ben Schrijver (Apr 28 2017 at 14:20):

I think snapshot generation was added to the validator.jar about a week ago. Unfortunately, the validator on http://build.fhir.org/downloads.html doesn't seem to be working atm (Error "Could not find or load main class org.hl7.fhir.r4.validation.Validator").

view this post on Zulip Michel Rutten (Apr 28 2017 at 15:31):

Hi @Ben Spencer, Forge can generate an (offline) profile snapshot, using the open source FHIR .NET API (https://github.com/ewoutkramer/fhir-net-api). The API does not include a command line utility out-of-the box, but it provides all the necessary building blocks to create one fairly easily.

view this post on Zulip Grahame Grieve (May 01 2017 at 05:20):

@Ben Schrijver how are you invoking it? Is it still a problem today?

view this post on Zulip Ben Schrijver (May 01 2017 at 06:39):

@Grahame Grieve I just tried downloading http://build.fhir.org/validator.zip, unpacked it and ran java -jar org.hl7.fhir.validator.jar help and java -jar org.hl7.fhir.validator.jar practitioner.xml and each time I get "Error: Could not find or load main class org.hl7.fhir.r4.validation.Validator".

view this post on Zulip Grahame Grieve (May 01 2017 at 07:37):

it would probably help if I actually created the class that it was referring to. Wait for revision 11971 to be available (~30min) and try again

view this post on Zulip Ben Schrijver (May 01 2017 at 09:50):

Seems to be working now, thanks!

view this post on Zulip Grahame Grieve (May 01 2017 at 21:03):

great

view this post on Zulip Michael van der Zel (May 20 2017 at 11:43):

Is there an operation defined on StructureDefinition to generate a snapshot version of a profile?

view this post on Zulip Grahame Grieve (May 20 2017 at 12:15):

$generate -implemented on my server. But I see it's not formally defined

view this post on Zulip Stephen Royce (Jul 10 2017 at 02:42):

Should I expect a snapshot to expand (unconstrained) complex data types? Forge (STU3) seems to be doing this, but I would expect that a snapshot only include the contents of any data type when I have modified it in some way. :(

view this post on Zulip Michael van der Zel (Jul 10 2017 at 07:04):

$generate -implemented on my server. But I see it's not formally defined

Will this become formally defined? Very useful!

view this post on Zulip Grahame Grieve (Jul 10 2017 at 07:36):

it should. want to make a task for us to do that?

view this post on Zulip Michael van der Zel (Sep 06 2017 at 17:22):

it should. want to make a task for us to do that?

Forgot to create a task, done now: #13795

view this post on Zulip Ewout Kramer (Sep 14 2017 at 23:48):

@Christiaan Knaap do we implement this?

view this post on Zulip Christiaan Knaap (Sep 14 2017 at 23:54):

Yes. From the CapabilityStatement:

            "operation": [
                {
                    "name": "validate",
                    "definition": {
                        "reference": "http://hl7.org/fhir/OperationDefinition/Resource-validate"
                    }
                },
                {
                    "name": "snapshot",
                    "definition": {
                        "reference": "http://vonk.furore.com/OperationDefinition/Snapshot-expand"
                    }
                }
            ]

POST the StructureDefinition with or without snapshot to /StructureDefinition/$snapshot and you get it back with a freshly generated snapshot.


Last updated: Apr 12 2022 at 19:14 UTC