Stream: IG creation
Topic: Minimal IG
Brian Reinhold (Sep 10 2018 at 20:43):
For newbies this might be good to be able to. I am trying to create a minimal IG guide. It contains one page and one resource. The resource is a structure definition. That requires a page (markdown) in the page directory and a structure definition in the resources directory. It also requires an ImplementationGuide structure definition in the resources directory and an ig.json file.
here is my minimal ig.json (I am desperately trying to get the formatting to work - aarg!!!
{ "source": "PhdImplementationGuide.xml", "canonicalBase": "http://hl7.org/fhir/uv/phd", "fixed-business-version": "0.0.1", "npm-name": "hl7.fhir.uv.phd", "license": "CC0-1.0", "sct-edition": "http://snomed.info/sct/900000000000207008", "template": "https://github.com/FHIR/test-template", "paths": { "resources": [ "resources", "examples" ], "pages": "pages", "temp": "temp", "output": "output", "qa": "qa", "specification": "http://build.fhir.org/" }, "defaults": { }, "resources": { "StructureDefinition/PhdDevice": { "source": "PhdDeviceStructureDefinition.xml", "base": "PhdDeviceStructureDefinition.html" } } }
Here is my minimal ImplementationGuide resource
<?xml version="1.0" encoding="utf-8"?> <ImplementationGuide xmlns="http://hl7.org/fhir"> <id value="PHD"/> <url value="http://hl7.org/fhir/uv/phd/ImplementationGuide/PHD"/> <version value="0.2.0"/> <!-- <name value="PHDImplementationGuide"/> --> <name value="Personal Health Device Implementation Guide"/> <title value="Personal Health Device Implementation Guide"/> <status value="draft"/> <date value="2018-08-18"/> <publisher value="Health Level Seven International (Health Care Devices Work Group)"/> <description value="ImplementationGuide for Personal Health Devices (PHD), used in remote patient monitoring (e.g., weight scales, blood pressure cuffs, glucose monitors, pulse-oximeters, etc.)."/> <packageId value="hl7.fhir.uv.phd"/> <fhirVersion value="3.6.0"/> <definition> <resource> <reference> <reference value="StructureDefinition/PhdDevice"/> </reference> <name value="PhdDevice"/> <exampleBoolean value="false"/> </resource> <page> <nameUrl value="index.html"/> <title value="Home"/> <generation value="markdown"/> </page> </definition> </ImplementationGuide>
Here is my page: (in the pages directory as a markdown file)
{{index:root}}
{% include StructureDefinition-{PhdDevice}-{??}.xhtml%}
Does this make sense to do?
The publisher does not like my markdown file to be in the pages directory. It seems to be looking for an include?? directory?
Grahame Grieve (Sep 10 2018 at 21:03):
we are working towards this - we want to get to a point where you choose a template, provide your resources, create additional markdown pages, and bingo....
Grahame Grieve (Sep 10 2018 at 21:03):
but we are not there yet
Brian Reinhold (Sep 10 2018 at 21:07):
but we are not there yet
Okay ... That sounds cool. I guess I should go ahead and finish the work on the structure definitions. There is a lot to do. At least I can use the IG publisher to 'validate' them. I will take it they are good if the 'simple' publish works even if I cannot view the structs.
Its just that hand editing those xml files is very error prone so I need to check often...especially for my aging eyes.
By the way, do you ever sleep?
Grahame Grieve (Sep 10 2018 at 21:08):
4 hours last night. Monday night is my short sleep
Brian Reinhold (Sep 10 2018 at 21:39):
another zulip messup.
Brian Reinhold (Sep 10 2018 at 21:41):
we are working towards this - we want to get to a point where you choose a template, provide your resources, create additional markdown pages, and bingo....
My minimal IG generates the PhdDeviceStructureDefinition.html file but the differential is missing a lot of definitions and comments. Is that a sign I made an error?
Grahame Grieve (Sep 10 2018 at 22:02):
can you send me your structure definition so I can sort out the rendering issues?
Last updated: Apr 12 2022 at 19:14 UTC