FHIR Chat · Example with line-breaks in element comments? · committers

Stream: committers

Topic: Example with line-breaks in element comments?


view this post on Zulip Sean McIlvenna (Mar 24 2022 at 17:25):

I have the following comment:

      <comment value="To reference (using relatesTo) a Bundle of type &quot;document&quot; or another Composition where you only have the identifier, use a resourceReference with an identifier.\nHere is an example of using relatesTo to reference another Bundle of type &quot;document&quot; or Composition where you only have the identifier:
` ` `
&lt;relatesTo&gt;
  &lt;type value=&quot;replaces&quot; /&gt;
  &lt;resourceReference&gt;
    &lt;identifier&gt;
      &lt;system value=&quot;...&quot; /&gt;
      &lt;value value=&quot;...&quot; /&gt;
    &lt;/identifier&gt;
  &lt;/resourceReference&gt;
&lt;/relatesTo&gt;
` ` `"/>

But it renders the example as a single line. How do I add line-breaks to the example that would show up in comments? I tried adding <br/>. Is this possible?

view this post on Zulip Lloyd McKenzie (Mar 24 2022 at 19:22):

This is a markdown question. @Eric Haas?

view this post on Zulip Eric Haas (Mar 24 2022 at 19:32):

wrap indented/formatted text with <pre> and </pre> instead and see if that works

view this post on Zulip John Moehrke (Mar 24 2022 at 19:34):

this is a markdown question? can we see the source?

view this post on Zulip Lloyd McKenzie (Mar 24 2022 at 20:12):

"comment" is an element with a type of 'markdown'.

view this post on Zulip John Moehrke (Mar 24 2022 at 20:37):

ah, now I understand the context.

view this post on Zulip John Moehrke (Mar 24 2022 at 20:38):

the html escaping inside a markdown blob threw me

view this post on Zulip John Moehrke (Mar 24 2022 at 20:46):

I have one in my BasicAudit IG --- in the context of an example, where the IG xml has the description holding markdown that has code block.

      <name value="Audit Example of ITI-78 at Consumer"/>
      <description value="Audit Event for PDQm Query Transaction by the Patient Identifier Cross-reference Consumer&#xA;&#xA;where the Query was executed with a GET as follows:&#xA;&#xA;```&#xA;GET https://server.example.com/fhir/Patient?family=MOHR&amp;given=ALICE&amp;active=true&amp;gender=female&#xA;Accept: application/fhir+json; fhirVersion=4.0&#xA;```"/>
      <exampleCanonical value="https://profiles.ihe.net/ITI/basicaudit/StructureDefinition/IHE.BasicAudit.Query"/>

view this post on Zulip John Moehrke (Mar 24 2022 at 20:46):

you can see this rendered on the Artifacts page (way at the bottom)
https://profiles.ihe.net/ITI/basicaudit/artifacts.html

view this post on Zulip John Moehrke (Mar 24 2022 at 20:47):

for me this was easy, as I get to craft this in Sushi.

view this post on Zulip John Moehrke (Mar 24 2022 at 20:50):

let me point at the fsh file

view this post on Zulip John Moehrke (Mar 24 2022 at 20:51):

https://github.com/IHE/ITI.BasicAudit/blob/main/input/fsh/ex-audit-78.fsh

view this post on Zulip Sean McIlvenna (Mar 24 2022 at 22:14):

Thanks all! I have line-breaks now...
Now just trying to figure out if   is needed for indenting each line.

view this post on Zulip Sean McIlvenna (Mar 24 2022 at 22:14):

Should have the rest figured out soon

view this post on Zulip Sean McIlvenna (Mar 24 2022 at 22:14):

Appreciate the help

view this post on Zulip Eric Haas (Mar 26 2022 at 16:12):

Also need to escape the html within pre tags. That tidbit also gets me

view this post on Zulip Eric Haas (Mar 26 2022 at 16:12):

The html <> to be orecise


Last updated: Apr 12 2022 at 19:14 UTC