Stream: shorthand
Topic: short description - new line
Osaid Nabulsi (Aug 12 2021 at 10:38):
Hi guys, I am trying to put a description for elements using "^short", is there any way to put a new line in the description ?
As I used "\n" for generating new line but when generating the WEB IG it does not appear as a new line !
Nick Freiter (Aug 12 2021 at 13:41):
You can put newlines in the description using the \n
character. For example, the following should work:
Profile: MyPatient
Parent: Patient
* name ^short = "short with \n\n newlines"
But my testing shows that the IG Publisher (in generating the web IG) doesn't render those newlines in the short description, which is not too surprising, since the short is meant to be a short, concise description. If you find yourself writing enough that you need newlines, maybe the definition element would be a better place for that description? Newlines in that element _will_ be rendered by the IG Publisher.
John Moehrke (Aug 12 2021 at 14:27):
you don't need to use \n
. You can just span your "" on multiple lines. And there is are two nice methods for this.
http://hl7.org/fhir/uv/shorthand/2020May/reference.html#multi-line-strings
Last updated: Apr 12 2022 at 19:14 UTC