...
Sample custom narratives property file atient
Code Block | ||
---|---|---|
| ||
Patient.class=ca.uhn.fhir.model.dstu2.resource.Patient |
...
patient.narrative=file:/home/harsha/development/applications/Patient.html |
Sample Patient narrative generator file defined using Thymeleaf HTML based syntax
...
Code Block | ||
---|---|---|
| ||
<!--/* This top section is not exported as a part of the Narrative, it is only present so that this template can be viewed in a browser. --> <html> <head> <link rel="stylesheet" type="text/css" href="narrative.css"/> </head> <body> <!--*/--> <div> <div class="hapiHeaderText" th:if="${not resource.nameFirstRep.empty}" th:narrative="${resource.nameFirstRep}"/> <table class="hapiPropertyTable"> <tbody> <tr th:if="${not resource.identifierFirstRep.empty}"> <td>Identifier</td> <td th:narrative="${resource.identifierFirstRep}"></td> </tr> <tr th:if="${not resource.addressFirstRep.empty}"> <td>Address</td> <td th:narrative="${resource.addressFirstRep}"></td> </tr> <tr th:if="${not resource.birthDateElement.empty}"> <td>Date of birth</td> <td><span th:text="${#dates.format(resource.birthDateElement.value,'dd MMMM yyyy')}"></span></td> </tr> <tr>GODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa</tr> </tbody> </table> </div> < <!--/*--> </body> </html> <!--*/--> |
(1) - http://jamesagnew.github.io/hapi-fhir/doc_narrative.html