Difference between revisions of "IHE FHIR Profile Publication/Creating new Profiles"

From IHE Wiki
Jump to: navigation, search
(Creating a new ImplementationGuide)
Line 25: Line 25:
 
Original:
 
Original:
  
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;<br />
+
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;<br />
+
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;
    &lt;id value=&quot;base&quot; /&gt;<br />
+
    &lt;id value=&quot;base&quot; /&gt;
    &lt;url value=&quot;http://ihe.net/fhir/base&quot; /&gt;<br />
+
    &lt;url value=&quot;http://ihe.net/fhir/base&quot; /&gt;
    &lt;name value=&quot;ImplementationGuide5&quot; /&gt;<br />
+
    &lt;name value=&quot;ImplementationGuide5&quot; /&gt;
 
    &lt;status value=&quot;draft&quot; /&gt;
 
    &lt;status value=&quot;draft&quot; /&gt;
  
Line 36: Line 36:
 
Updated:
 
Updated:
  
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;<br />
+
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;<br />
+
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;
    &lt;id value=&quot;'''mmm'''&quot; /&gt;<br />
+
    &lt;id value=&quot;'''mmm'''&quot; /&gt;
    &lt;url value=&quot;http://ihe.net/fhir/'''mmm'''&quot; /&gt;<br />
+
    &lt;url value=&quot;http://ihe.net/fhir/'''mmm'''&quot; /&gt;
    &lt;name value=&quot;'''Mobile Medication Management'''&quot; /&gt;<br />
+
    &lt;name value=&quot;'''Mobile Medication Management'''&quot; /&gt;
 
    &lt;status value=&quot;draft&quot; /&gt;
 
    &lt;status value=&quot;draft&quot; /&gt;
  
Line 59: Line 59:
 
=== Add an entry in the implementationGuide (mmm.xml) to point to the file you added. ===
 
=== Add an entry in the implementationGuide (mmm.xml) to point to the file you added. ===
  
 &lt;page&gt;<br />
+
 &lt;page&gt;
     &lt;nameUrl value=&quot;toc.html&quot; /&gt;<br />
+
     &lt;nameUrl value=&quot;toc.html&quot; /&gt;
     &lt;title value=&quot;Table of Contents&quot; /&gt;<br />
+
     &lt;title value=&quot;Table of Contents&quot; /&gt;
     &lt;generation value=&quot;html&quot; /&gt;<br />
+
     &lt;generation value=&quot;html&quot; /&gt;
     &lt;page&gt;<br />
+
     &lt;page&gt;
         &lt;nameUrl value=&quot;index.html&quot; /&gt;<br />
+
         &lt;nameUrl value=&quot;index.html&quot; /&gt;
         &lt;title value=&quot;Main Page&quot; /&gt;<br />
+
         &lt;title value=&quot;Main Page&quot; /&gt;
         &lt;generation value=&quot;html&quot; /&gt;<br />
+
         &lt;generation value=&quot;html&quot; /&gt;
     &lt;/page&gt;<br />
+
     &lt;/page&gt;
     &lt;page&gt;<br />
+
     &lt;page&gt;
         &lt;nameUrl value=&quot;welcome.html&quot; /&gt;<br />
+
         &lt;nameUrl value=&quot;welcome.html&quot; /&gt;
         &lt;title value=&quot;Welcome Page&quot; /&gt;<br />
+
         &lt;title value=&quot;Welcome Page&quot; /&gt;
         &lt;generation value=&quot;html&quot; /&gt;<br />
+
         &lt;generation value=&quot;html&quot; /&gt;
     &lt;/page&gt;<br />
+
     &lt;/page&gt;
     &lt;page&gt;<br />
+
     &lt;page&gt;
         &lt;nameUrl value=&quot;artifacts.html&quot; /&gt;<br />
+
         &lt;nameUrl value=&quot;artifacts.html&quot; /&gt;
         &lt;title value=&quot;Artifacts&quot; /&gt;<br />
+
         &lt;title value=&quot;Artifacts&quot; /&gt;
         &lt;generation value=&quot;html&quot; /&gt;<br />
+
         &lt;generation value=&quot;html&quot; /&gt;
     &lt;/page&gt;<br />
+
     &lt;/page&gt;
 
 &lt;/page&gt;
 
 &lt;/page&gt;
  
Line 94: Line 94:
 
Just add a section like this. Make sure you point to a package that exists in the mmm.xml file.
 
Just add a section like this. Make sure you point to a package that exists in the mmm.xml file.
  
         &lt;resource&gt;<br />
+
         &lt;resource&gt;
            &lt;reference&gt;<br />
+
            &lt;reference&gt;
                &lt;reference value=&quot;CapabilityStatement/ihe-mmm-requestplacer&quot; /&gt;<br />
+
                &lt;reference value=&quot;CapabilityStatement/ihe-mmm-requestplacer&quot; /&gt;
            &lt;/reference&gt;<br />
+
            &lt;/reference&gt;
            &lt;name value=&quot;IHE MMM Request placer&quot; /&gt;<br />
+
            &lt;name value=&quot;IHE MMM Request placer&quot; /&gt;
            &lt;description value=&quot;Request Placer Specifications&quot; /&gt;<br />
+
            &lt;description value=&quot;Request Placer Specifications&quot; /&gt;
            &lt;package value=&quot;Package1&quot; /&gt;<br />
+
            &lt;package value=&quot;Package1&quot; /&gt;
 
        &lt;/resource&gt;
 
        &lt;/resource&gt;
  
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;<br />
+
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;<br />
+
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;
    &lt;id value=&quot;base&quot; /&gt;<br />
+
    &lt;id value=&quot;base&quot; /&gt;
    &lt;url value=&quot;http://ihe.net/fhir/base&quot; /&gt;<br />
+
    &lt;url value=&quot;http://ihe.net/fhir/base&quot; /&gt;
    &lt;name value=&quot;Base Profile&quot; /&gt;<br />
+
    &lt;name value=&quot;Base Profile&quot; /&gt;
    &lt;version value=&quot;0.2.1&quot; /&gt;<br />
+
    &lt;version value=&quot;0.2.1&quot; /&gt;
    &lt;status value=&quot;draft&quot; /&gt;<br />
+
    &lt;status value=&quot;draft&quot; /&gt;
    &lt;experimental value=&quot;false&quot; /&gt;<br />
+
    &lt;experimental value=&quot;false&quot; /&gt;
    &lt;date value=&quot;2018-01-01T00:00:00.000+02:00&quot; /&gt;<br />
+
    &lt;date value=&quot;2018-01-01T00:00:00.000+02:00&quot; /&gt;
    &lt;jurisdiction&gt;<br />
+
    &lt;jurisdiction&gt;
        &lt;coding&gt;<br />
+
        &lt;coding&gt;
            &lt;system value=&quot;urn:iso:std:iso:3166&quot; /&gt;<br />
+
            &lt;system value=&quot;urn:iso:std:iso:3166&quot; /&gt;
            &lt;code value=&quot;US&quot; /&gt;<br />
+
            &lt;code value=&quot;US&quot; /&gt;
        &lt;/coding&gt;<br />
+
        &lt;/coding&gt;
    &lt;/jurisdiction&gt;<br />
+
    &lt;/jurisdiction&gt;
    &lt;packageId value=&quot;ihe.fhir.base&quot; /&gt;<br />
+
    &lt;packageId value=&quot;ihe.fhir.base&quot; /&gt;
    &lt;license value=&quot;Apache-2.0&quot; /&gt;<br />
+
    &lt;license value=&quot;Apache-2.0&quot; /&gt;
    &lt;fhirVersion value=&quot;3.5.0&quot; /&gt;<br />
+
    &lt;fhirVersion value=&quot;3.5.0&quot; /&gt;
    &lt;definition&gt;<br />
+
    &lt;definition&gt;
        &lt;package&gt;<br />
+
        &lt;package&gt;
            &lt;name value=&quot;Package1&quot; /&gt;<br />
+
            &lt;name value=&quot;Package1&quot; /&gt;
            &lt;description value=&quot;Package&quot; /&gt;<br />
+
            &lt;description value=&quot;Package&quot; /&gt;
        &lt;/package&gt;<br />
+
        &lt;/package&gt;
        &lt;resource&gt;<br />
+
        &lt;resource&gt;
            &lt;reference&gt;<br />
+
            &lt;reference&gt;
                &lt;reference value=&quot;CapabilityStatement/ihe-base-requestplacer&quot; /&gt;<br />
+
                &lt;reference value=&quot;CapabilityStatement/ihe-base-requestplacer&quot; /&gt;
            &lt;/reference&gt;<br />
+
            &lt;/reference&gt;
            &lt;name value=&quot;ihe-base-requestplacer&quot; /&gt;<br />
+
            &lt;name value=&quot;ihe-base-requestplacer&quot; /&gt;
            &lt;description value=&quot;Request Placer Specifications&quot; /&gt;<br />
+
            &lt;description value=&quot;Request Placer Specifications&quot; /&gt;
            &lt;package value=&quot;Package1&quot; /&gt;<br />
+
            &lt;package value=&quot;Package1&quot; /&gt;
        &lt;/resource&gt;<br />
+
        &lt;/resource&gt;
        &lt;resource&gt;<br />
+
        &lt;resource&gt;
            &lt;reference&gt;<br />
+
            &lt;reference&gt;
                &lt;reference value=&quot;StructureDefinition/medication-request&quot; /&gt;<br />
+
                &lt;reference value=&quot;StructureDefinition/medication-request&quot; /&gt;
            &lt;/reference&gt;<br />
+
            &lt;/reference&gt;
            &lt;name value=&quot;Medication Request&quot; /&gt;<br />
+
            &lt;name value=&quot;Medication Request&quot; /&gt;
            &lt;description value=&quot;Medication Request Specifications&quot; /&gt;<br />
+
            &lt;description value=&quot;Medication Request Specifications&quot; /&gt;
            &lt;exampleBoolean value=&quot;false&quot; /&gt;<br />
+
            &lt;exampleBoolean value=&quot;false&quot; /&gt;
            &lt;package value=&quot;Package1&quot; /&gt;<br />
+
            &lt;package value=&quot;Package1&quot; /&gt;
        &lt;/resource&gt;<br />
+
        &lt;/resource&gt;
        &lt;page&gt;<br />
+
        &lt;page&gt;
            &lt;nameUrl value=&quot;toc.html&quot; /&gt;<br />
+
            &lt;nameUrl value=&quot;toc.html&quot; /&gt;
            &lt;title value=&quot;Table of Contents&quot; /&gt;<br />
+
            &lt;title value=&quot;Table of Contents&quot; /&gt;
            &lt;generation value=&quot;html&quot; /&gt;<br />
+
            &lt;generation value=&quot;html&quot; /&gt;
            &lt;page&gt;<br />
+
            &lt;page&gt;
                &lt;nameUrl value=&quot;index.html&quot; /&gt;<br />
+
                &lt;nameUrl value=&quot;index.html&quot; /&gt;
                &lt;title value=&quot;Main Page&quot; /&gt;<br />
+
                &lt;title value=&quot;Main Page&quot; /&gt;
                &lt;generation value=&quot;html&quot; /&gt;<br />
+
                &lt;generation value=&quot;html&quot; /&gt;
            &lt;/page&gt;<br />
+
            &lt;/page&gt;
            &lt;page&gt;<br />
+
            &lt;page&gt;
                &lt;nameUrl value=&quot;artifacts.html&quot; /&gt;<br />
+
                &lt;nameUrl value=&quot;artifacts.html&quot; /&gt;
                &lt;title value=&quot;Artifacts&quot; /&gt;<br />
+
                &lt;title value=&quot;Artifacts&quot; /&gt;
                &lt;generation value=&quot;html&quot; /&gt;<br />
+
                &lt;generation value=&quot;html&quot; /&gt;
            &lt;/page&gt;<br />
+
            &lt;/page&gt;
        &lt;/page&gt;<br />
+
        &lt;/page&gt;
    &lt;/definition&gt;<br />
+
    &lt;/definition&gt;
 
  &lt;/ImplementationGuide&gt;
 
  &lt;/ImplementationGuide&gt;

Revision as of 05:09, 30 September 2018

Getting Started – Using the default content

These are the steps to create another implementation guide from the base profile. To provide an example, we describe how to change the profile “base” to a new profile called “mmm”. Of course you can use an name as long as the file names match the references.

  1. Copying / renaming implementation guide
  2. Adding pages
  3. Adding resources

The details:

  1. == Copying / renaming implementation guide ==
    1. === Rename (or copy) the “base” folder to “mmm” ===
    2. === Rename the file “base.xml” to “mmm.xml”. Compared to the “base” profile, we end up with this: ===

222x164px

Edit the mmm.xml and change the id, url, and optionally name as appropriate:

Original:

<?xml version="1.0" encoding="utf-16"?>
<ImplementationGuide xmlns="http://hl7.org/fhir%22>

    <id value="base" />     <url value="http://ihe.net/fhir/base%22 />     <name value="ImplementationGuide5" />     <status value="draft" />

...

Updated:

<?xml version="1.0" encoding="utf-16"?>
<ImplementationGuide xmlns="http://hl7.org/fhir%22>

    <id value="mmm" />     <url value="http://ihe.net/fhir/mmm" />     <name value="Mobile Medication Management" />     <status value="draft" />

...

At this moment you can rebuild to make sure things still work ok.

Adding pages

You can add pages under the top page, which is the Table of Contents.

It is recommended to keep page named “index” – you can change the existing index.xml page if you want.

Add the x(ht)ml file in the content\pagecontent folder, for example a “welcome” page.

237x181px

Add an entry in the implementationGuide (mmm.xml) to point to the file you added.

 <page>      <nameUrl value="toc.html" />      <title value="Table of Contents" />      <generation value="html" />      <page>          <nameUrl value="index.html" />          <title value="Main Page" />          <generation value="html" />      </page>      <page>          <nameUrl value="welcome.html" />          <title value="Welcome Page" />          <generation value="html" />      </page>      <page>          <nameUrl value="artifacts.html" />          <title value="Artifacts" />          <generation value="html" />      </page>  </page>

  1. == Adding resources ==
    1. === place the resource as an XML file in the content\resources folder, ===
402x201px

place a reference in the implementation guide file (mmm.xml).

Just add a section like this. Make sure you point to a package that exists in the mmm.xml file.

         <resource>             <reference>                 <reference value="CapabilityStatement/ihe-mmm-requestplacer" />             </reference>             <name value="IHE MMM Request placer" />             <description value="Request Placer Specifications" />             <package value="Package1" />         </resource>

<?xml version="1.0" encoding="utf-16"?>
<ImplementationGuide xmlns="http://hl7.org/fhir%22>

    <id value="base" />     <url value="http://ihe.net/fhir/base%22 />     <name value="Base Profile" />     <version value="0.2.1" />     <status value="draft" />     <experimental value="false" />     <date value="2018-01-01T00:00:00.000+02:00" />     <jurisdiction>         <coding>             <system value="urn:iso:std:iso:3166%22 />             <code value="US" />         </coding>     </jurisdiction>     <packageId value="ihe.fhir.base" />     <license value="Apache-2.0" />     <fhirVersion value="3.5.0" />     <definition>         <package>             <name value="Package1" />             <description value="Package" />         </package>         <resource>             <reference>                 <reference value="CapabilityStatement/ihe-base-requestplacer" />             </reference>             <name value="ihe-base-requestplacer" />             <description value="Request Placer Specifications" />             <package value="Package1" />         </resource>         <resource>             <reference>                 <reference value="StructureDefinition/medication-request" />             </reference>             <name value="Medication Request" />             <description value="Medication Request Specifications" />             <exampleBoolean value="false" />             <package value="Package1" />         </resource>         <page>             <nameUrl value="toc.html" />             <title value="Table of Contents" />             <generation value="html" />             <page>                 <nameUrl value="index.html" />                 <title value="Main Page" />                 <generation value="html" />             </page>             <page>                 <nameUrl value="artifacts.html" />                 <title value="Artifacts" />                 <generation value="html" />             </page>         </page>     </definition>

</ImplementationGuide>