FHIR Chat · Custom local template · IG creation

Stream: IG creation

Topic: Custom local template


view this post on Zulip Noemi Deppenwiese (Jan 17 2020 at 14:19):

I'm struggling to get the IG Publisher working with a custom local template. I have a folder "mytemplate" with a package subfolder containing a package.json

{
  "name":"mytemplate",
  "version": "0.0.1",
  "type": "fhir.template",
   "dependencies":{
      "fhir.base.template":"0.0.1"
   }
}

In ig.ini, template points to the mytemplate folder (absolute path). When i run the publisher i get a java.io.FileNotFoundException: C:\Users\[...]\my-ig\template\config.json .
Do i need to provide a custom config.json as well? I'm only trying to change the color of the base template and maybe add a logo...
Does anyone have a working example using a custom local template?

view this post on Zulip Jose Costa Teixeira (Jan 17 2020 at 14:41):

@Noemi Deppenwiese what content do you have in your mytemplate folder?

view this post on Zulip Noemi Deppenwiese (Jan 17 2020 at 14:41):

Currently nothing except the package subfolder.

view this post on Zulip Jose Costa Teixeira (Jan 17 2020 at 14:42):

ah I think you need a base in your package json

view this post on Zulip Jose Costa Teixeira (Jan 17 2020 at 14:42):

otherwise it cannot get the content at all

view this post on Zulip Jose Costa Teixeira (Jan 17 2020 at 14:43):

{
  "name":"mytemplate",
  "version": "0.0.1",
  "type": "fhir.template",
  "base":  "hl7.fhir.template",
  "dependencies": {
    "hl7.fhir.template": "0.0.1"
  }
}

view this post on Zulip Noemi Deppenwiese (Jan 17 2020 at 14:43):

Of course... Thanks!

view this post on Zulip Jose Costa Teixeira (Jan 17 2020 at 14:53):

it works?

view this post on Zulip Noemi Deppenwiese (Jan 17 2020 at 14:55):

Yes, i added the base attribute and that fixed the error.

view this post on Zulip Jose Costa Teixeira (Jan 17 2020 at 14:57):

ok. I didn't do it at the time, but perhaps it's a good thing to document the "common issues" so that others can learn from my mistakes (of which there's a bunch)

view this post on Zulip Noemi Deppenwiese (Jan 17 2020 at 15:02):

Agreed. I didn't find any documentation on the HL7 wiki on "How to create your custom template".

view this post on Zulip Lloyd McKenzie (Jan 17 2020 at 15:51):

That's because it hasn't been written yet. Some of the capabilities that custom templates will need aren't yet enabled, so seemed premature to write documentation.


Last updated: Apr 12 2022 at 19:14 UTC