Making narrative_generation.md reference an html snippet (#4531)
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
This commit is contained in:
parent
b4778f4b24
commit
3d9a318e33
|
@ -54,8 +54,8 @@ Note that these templates expect a few specific CSS definitions to be present in
|
|||
|
||||
To use your own templates for narrative generation, simply create one or more templates, using the Thymeleaf HTML based syntax.
|
||||
|
||||
```java
|
||||
{{snippet:classpath:/ca/uhn/fhir/narrative/OperationOutcome.html}}
|
||||
```html
|
||||
{{snippet:classpath:/ca/uhn/hapi/fhir/docs/snippet/OperationOutcome.html}}
|
||||
```
|
||||
|
||||
Then create a properties file which describes your templates. In this properties file, each resource to be defined has a pair or properties.
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="narrative.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<!--*/-->
|
||||
<div>
|
||||
<h1>Operation Outcome</h1>
|
||||
<table border="0">
|
||||
<tr th:each="issue : ${resource.issue}">
|
||||
<td th:text="${issue.severityElement.value}" style="font-weight: bold;"></td>
|
||||
<td th:text="${issue.location}"></td>
|
||||
<td th:narrative="${issue.diagnostics}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--*/-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Loading…
Reference in New Issue