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

From IHE Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Creating a new ImplementationGuide =
+
== Getting Started – Using the default content ==
  
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.
-------------------------------------------
 
  
These are the steps to create another implementation guide from the base
+
# Copying / renaming implementation guide
profile. To provide an example, we describe how to change the profile “base” to
+
# Adding pages
a new profile called “mmm”. Of course you can use an name as long as the file
+
# Adding resources
names match the references.
 
  
1.  Copying / renaming implementation guide
+
The details:
  
2.  Adding pages
 
  
3.  Adding resources
+
== Copying / renaming implementation guide ==
  
The details:
+
=== Rename (or copy) the “base” folder to “mmm” ===
  
1. Copying / renaming implementation guide
+
=== Rename the file “base.xml” to “mmm.xml”. Compared to the “base” profile, we end up with this: ===
  
    1.  Rename (or copy) the “base” folder to “mmm”
 
  
    2. Rename the file “base.xml” to “mmm.xml”. Compared to the “base” profile,
+
[[File:media/image1.png|222x164px]]
        we end up with this:
 
  
![](media/a54694b56f5532419ed6630b4127c6af.png)
+
=== Edit the mmm.xml and change the id, url, and optionally name as appropriate: ===
 
 
### Edit the mmm.xml and change the id, url, and optionally name as appropriate:
 
  
 
Original:
 
Original:
  
\<?xml version="1.0" encoding="utf-16"?\>  
+
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
\<ImplementationGuide xmlns="http://hl7.org/fhir"\>  
+
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;
    \<id value="base" /\> 
+
    &lt;id value=&quot;base&quot; /&gt;
    \<url value="http://ihe.net/fhir/base" /\> 
+
   &lt;url value=&quot;http://ihe.net/fhir/base&quot; /&gt;
    \<name value="ImplementationGuide5" /\> 
+
    &lt;name value=&quot;ImplementationGuide5&quot; /&gt;
    \<status value="draft" /\>
+
    &lt;status value=&quot;draft&quot; /&gt;
  
 
...
 
...
Line 41: Line 34:
 
Updated:
 
Updated:
  
\<?xml version="1.0" encoding="utf-16"?\>  
+
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
\<ImplementationGuide xmlns="http://hl7.org/fhir"\>  
+
  &lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;
    \<id value="**mmm**" /\>  
+
    &lt;id value=&quot;'''mmm'''&quot; /&gt;
    \<url value="http://ihe.net/fhir/**mmm**" /\>  
+
    &lt;url value=&quot;http://ihe.net/fhir/mmm&quot; /&gt;
    \<name value="**Mobile Medication Management**" /\>  
+
    &lt;name value=&quot;'''Mobile Medication Management'''&quot; /&gt;
    \<status value="draft" /\>
+
    &lt;status value=&quot;draft&quot; /&gt;
  
 
...
 
...
Line 52: Line 45:
 
At this moment you can rebuild to make sure things still work ok.
 
At this moment you can rebuild to make sure things still work ok.
  
Adding pages
+
== Adding pages ==
------------
 
  
 
You can add pages under the top page, which is the Table of Contents.
 
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
+
It is recommended to keep page named “index” – you can change the existing index.xml page if you want.
index.xml page if you want.
+
 
 +
=== Add the x(ht)ml file in the content\pagecontent folder, for example a “welcome” page. ===
 +
 
 +
<blockquote>[[File:media/image2.png|237x181px]]
 +
</blockquote>
 +
=== Add an entry in the implementationGuide (mmm.xml) to point to the file you added. ===
  
### Add the x(ht)ml file in the content\\pagecontent folder, for example a “welcome” page.
 
  
![](media/665d53296cdfbe4e81c74e9472170400.png)
+
&lt;page&gt;
 +
  &lt;nameUrl value=&quot;toc.html&quot; /&gt;
 +
    &lt;title value=&quot;Table of Contents&quot; /&gt;
 +
    &lt;generation value=&quot;html&quot; /&gt;
 +
  &lt;page&gt;
 +
    &lt;nameUrl value=&quot;index.html&quot; /&gt;
 +
    &lt;title value=&quot;Main Page&quot; /&gt;
 +
     &lt;generation value=&quot;html&quot; /&gt;
 +
   &lt;/page&gt;
 +
  &lt;page&gt;
 +
    &lt;nameUrl value=&quot;welcome.html&quot; /&gt;
 +
     &lt;title value=&quot;Welcome Page&quot; /&gt;
 +
   &lt;generation value=&quot;html&quot; /&gt;
 +
   &lt;/page&gt;
 +
  &lt;page&gt;
 +
    &lt;nameUrl value=&quot;artifacts.html&quot; /&gt;
 +
    &lt;title value=&quot;Artifacts&quot; /&gt;
 +
    &lt;generation value=&quot;html&quot; /&gt;
 +
  &lt;/page&gt;
 +
&lt;/page&gt;
  
### Add an entry in the implementationGuide (mmm.xml) to point to the file you added.
+
== Adding resources ==
  
 \<page\> 
+
place the resource as an XML file in the content\resources folder.  
     \<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
+
The file must be named according to the convention
  
    1. place the resource as an XML file in the content\\resources folder,
+
capabilitystatement-ihe-acr-xxxxxxxx.xml
  
![](media/b1ef17103e656a68210bccfee42bbb3f.png)
+
where acr is the profile acronym and xxxxxxxxx is the object - the transaction, the actor, etc.
  
### place a reference in the implementation guide file (mmm.xml).
+
<blockquote>[[File:media/image3.png|402x201px]]
 +
</blockquote>
  
Just add a section like this. Make sure you point to a package that exists in
+
=== place a reference in the implementation guide file (mmm.xml). ===
the mmm.xml file.
 
  
         \<resource\> 
+
Just add a section like this. Make sure you point to a package that exists in the mmm.xml file.
            \<reference\> 
 
                \<reference value="CapabilityStatement/ihe-mmm-requestplacer" /\> 
 
            \</reference\> 
 
            \<name value="IHE MMM Request placer" /\> 
 
            \<description value="Request Placer Specifications" /\> 
 
            \<package value="Package1" /\> 
 
        \</resource\>
 
  
 +
&lt;resource&gt;
 +
  &lt;reference&gt;
 +
  &lt;reference value=&quot;CapabilityStatement/ihe-mmm-requestplacer&quot; /&gt;
 +
  &lt;/reference&gt;
 +
  &lt;name value=&quot;IHE MMM Request placer&quot; /&gt;
 +
  &lt;description value=&quot;Request Placer Specifications&quot; /&gt;
 +
  &lt;package value=&quot;Package1&quot; /&gt;
 +
&lt;/resource&gt;
  
 +
The resulting file:
  
  <ImplementationGuide xmlns="http://hl7.org/fhir">
+
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
    <id value="base" />
+
&lt;ImplementationGuide xmlns=&quot;http://hl7.org/fhir&quot;&gt;
    <url value="http://ihe.net/fhir/base" />
+
    &lt;id value=&quot;base&quot; /&gt;
    <name value="Base Profile" />
+
     &lt;url value=&quot;http://ihe.net/fhir/base&quot; /&gt;
    <version value="0.2.1" />
+
     &lt;name value=&quot;Base Profile&quot; /&gt;
    <status value="draft" />
+
    &lt;version value=&quot;0.2.1&quot; /&gt;
    <experimental value="false" />
+
    &lt;status value=&quot;draft&quot; /&gt;
    <date value="2018-01-01T00:00:00.000+02:00" />
+
    &lt;experimental value=&quot;false&quot; /&gt;
     <jurisdiction>
+
    &lt;date value=&quot;2018-01-01T00:00:00.000+02:00&quot; /&gt;
         <coding>
+
      &lt;jurisdiction&gt;
            <system value="urn:iso:std:iso:3166" />
+
         &lt;coding&gt;
            <code value="US" />
+
          &lt;system value=&quot;urn:iso:std:iso:3166&quot; /&gt;
         </coding>
+
          &lt;code value=&quot;US&quot; /&gt;
     </jurisdiction>
+
         &lt;/coding&gt;
     <packageId value="ihe.fhir.base" />
+
     &lt;/jurisdiction&gt;
     <license value="Apache-2.0" />
+
     &lt;packageId value=&quot;ihe.fhir.base&quot; /&gt;
     <fhirVersion value="3.6.0" />
+
     &lt;license value=&quot;Apache-2.0&quot; /&gt;
        <definition>
+
     &lt;fhirVersion value=&quot;3.5.0&quot; /&gt;
          <package>
+
    &lt;definition&gt;
<name value="IHE Base Conformance statements"/>
+
        &lt;package&gt;
<description value="Package"/>
+
          &lt;name value=&quot;Package1&quot; /&gt;
</package>
+
          &lt;description value=&quot;Package&quot; /&gt;
<resource>
+
        &lt;/package&gt;
<reference>
+
        &lt;resource&gt;
<reference value="CapabilityStatement/ihe-base-requestplacer"/>
+
          &lt;reference&gt;
</reference>
+
              &lt;reference value=&quot;CapabilityStatement/ihe-base-requestplacer&quot; /&gt;
<name value="ihe-base-requestplacer"/>
+
          &lt;/reference&gt;
<description value="Request Placer Specifications"/>
+
          &lt;name value=&quot;ihe-base-requestplacer&quot; /&gt;
<package value="Package1"/>
+
          &lt;description value=&quot;Request Placer Specifications&quot; /&gt;
</resource>
+
          &lt;package value=&quot;Package1&quot; /&gt;
<resource>
+
        &lt;/resource&gt;
<reference>
+
        &lt;resource&gt;
<reference value="StructureDefinition/medication-request"/>
+
          &lt;reference&gt;
</reference>
+
              &lt;reference value=&quot;StructureDefinition/medication-request&quot; /&gt;
<name value="Medication Request"/>
+
          &lt;/reference&gt;
<description value="Medication Request Specifications"/>
+
          &lt;name value=&quot;Medication Request&quot; /&gt;
<exampleBoolean value="false"/>
+
          &lt;description value=&quot;Medication Request Specifications&quot; /&gt;
<package value="Package1"/>
+
          &lt;exampleBoolean value=&quot;false&quot; /&gt;
</resource>
+
          &lt;package value=&quot;Package1&quot; /&gt;
<page>
+
        &lt;/resource&gt;
<nameUrl value="toc.html"/>
+
        &lt;page&gt;
<title value="Table of Contents"/>
+
          &lt;nameUrl value=&quot;toc.html&quot; /&gt;
<generation value="html"/>
+
          &lt;title value=&quot;Table of Contents&quot; /&gt;
<page>
+
          &lt;generation value=&quot;html&quot; /&gt;
<nameUrl value="index.html"/>
+
          &lt;page&gt;
<title value="Main Page"/>
+
              &lt;nameUrl value=&quot;index.html&quot; /&gt;
<generation value="html"/>
+
              &lt;title value=&quot;Main Page&quot; /&gt;
</page>
+
              &lt;generation value=&quot;html&quot; /&gt;
<page>
+
          &lt;/page&gt;
<nameUrl value="artifacts.html"/>
+
          &lt;page&gt;
<title value="Arifacts"/>
+
              &lt;nameUrl value=&quot;artifacts.html&quot; /&gt;
<generation value="html"/>
+
              &lt;title value=&quot;Artifacts&quot; /&gt;
</page>
+
              &lt;generation value=&quot;html&quot; /&gt;
</page>
+
          &lt;/page&gt;
</definition>
+
        &lt;/page&gt;
  </ImplementationGuide>
+
    &lt;/definition&gt;
 +
  &lt;/ImplementationGuide&gt;

Latest revision as of 13:26, 12 December 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:


Copying / renaming implementation guide

Rename (or copy) the “base” folder to “mmm”

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%22 />
  <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>

Adding resources

place the resource as an XML file in the content\resources folder.

The file must be named according to the convention

capabilitystatement-ihe-acr-xxxxxxxx.xml

where acr is the profile acronym and xxxxxxxxx is the object - the transaction, the actor, etc.

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>

The resulting file:

<?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>