Stream: IG creation
Topic: IG using Frameworks
Brian Reinhold (Oct 08 2018 at 11:12):
For those of you struggling to write an implementation guide using the 'Frameworks' Lloyd has set up this may help. I have a relatively simple guide containing only xml resources and markdown pages containing only text. Here are some instructions
<!-- How to use Lloyd's Framework IG The Frameworks directory is not touched (except for a single hardcoded error that may be fixed in the future). You may want to rename the *.bat files appropriate for your IG, this example has 'Phd' all over the place. The source-generated directory is built by the _PhdUpdatePublisher.bat file. It must be generated before being used in the continuous integration build One can safely delete the source-generated directory and run _PhdUpdatePublisher.bat to rebuild it. You will need to modify the ig.json file to point to your ImplementationGuide.xml file which is in the src directory In this example the name of the ImplementationGuide is 'PhdImplementationGuide.xml'. So in the end all your work is in the src directory. The resources are placed in the src/resources directory The Value Sets can be placed in src/vocabulary directory (have not tried this) but putting them in the resources directory is also okay The pages are placed in the src/pagecontent directory The menu items that occur across the header in the published guide is in the src/includes directory in the menu.xml file. These directory names are fixed. (There might be a special directory name for Code Systems but I do not know.) You need a 'jurisdiction' element or it will not build. Not sure how it is used or why it is required. It is not required by FHIR. Resources: The names of the files must follow a certain structure. There are certain options. Here is one that works 1. For structure definitions *.structuredefinition.xml where '*' is your choice (no spaces). Make sure the 'id' and 'name' values are the same as '*' For example I have PhdNumericObservation.structuredefinition.xml with <id value="PhdNumericObservation" /> and <name value="PhdNumericObservation" /> 2. For value sets *.valueset.xml where '*' is your choice (no spaces). Make sure the 'id' and 'name' values are the same as '*' 3. For code systems *.codesystem.xml where '*' is your choice (no spaces). Make sure the 'id' and 'name' values are the same as '*' 4. These resources will not be listed by the Artifacts page unless one specifies a 'package' under the 'definition' element and then references it in each resource. For md (markdown) pages (the only pages I know how to do) 1. No spaces in the name 2. No YAML headers to cause the publisher to convert them to html 3. No Jekyll liquid syntax to link to other pages. 4. All references to your pages are 'pageName.html' even though they are written in md. 5. Don't put a title in your md file as it is taken from the 'title' tag in the <page> entry of this file, for example <title value="Technical Implementation Guidance"/>. If you do you will have two titles. In your structure definition the first page SHALL be toc.html. This page is auto generated, you do not need to create it Under this page every page you want included in the table of contents will appear as a sub page. The next primary page is 'artifacts.html'. This is auto-generated. You need no sub-pages. This topic will cause a list of all your resources to appear when you click on the 'Artifacts Index' header in the published guide. Be sure to include that name in the 'menu.xml' file in the includes directory along with the 'Table of Contents' entry. The other entries are up to you BUT there is a catch. When putting in your pages in the ImplementationGuide the <nameUrl value="pageName.html"/> even though the file names are 'pageName.md'. But the <generation value="markdown" />. Found more requirements Need to have a src/examples directory (empty or not) Need to have a src/images directory (empty or not) !! If you get the warning that the tools.jar can't be found in said location copy the tools.jar file to the said location. It is located in the JDK_8.0_181\lib directory !! I don't understand this error. Same set up on two Windows 10 computers and one wants the tools.jar in the jre1_* directory. In this example there are only xml structure definitions, value sets, code systems, and markdown pages that are all text. -->
As soon as I get a home for this guide on the HL7 github I will upload the example. I still have one unresolved error when building (still builds a viewable guide) and that has to do with certain elements not making a snapshot. Working on it.
Last updated: Apr 12 2022 at 19:14 UTC