Edit registration card print out to add other patient information from openmrs dictionnary concepts

Hello Everyone I’m facing a problem with the printout of supplementary papers in the registration module in Bahmni. In fact, i’m trying to modify it a little bit and add other informations of the patient from other concepts of the openmrs dictionnary (for example, add reason for death if the patient is deceased), but i don’t know how to call them in the html page. Can you help me with that ?

Thanks!

Find attached the html file i’m trying to edit. it’s path is :

/opt/bahmni-web/etc/bahmni_config/openmrs/apps/registration/supplementalPaperLayout

<link rel="stylesheet" 
href="/bahmni_config/openmrs/apps/registration/supplementalPaperLayout/css/print.css"/>
<div>
<style>
</style>
<div class="row">
    <div class="left">
        <span class="label">ओपीडी क्र.:</span>
        <span></span>
    </div>
    <div class="right">
        <span class="label">Date:</span>
        <span>{{today | date:'dd/MM/yyyy'}}</span>
    </div>
</div>
<div class="row">
    <div class="left">
        <span class="label">Code Patient:</span>
        <span>{{patient.primaryIdentifier.identifier}}</span>
    </div>
    <div class="right">
        <span class="label">Quartier:</span>
        <span>{{patient.address.address2}}</span>
    </div>
</div>
<div class="row">
    <div class="left">
        <span class="label">Noms:</span>
        <span>{{patient.fullNameLocal() || patient.name}}</span>
    </div>
    <div class="right">
        <span class="label">District:</span>
        <span>{{patient.address.countyDistrict}}</span>
    </div>
</div>
<div class="row">
    <div class="left">
        <span class="label">Responsable:</span>
        <span>{{patient.primaryRelative}}</span>
    </div>  
    <div class="right">
        <span class="label">Age:</span>
        <span>{{patient.age.years || "0"}}</span>
        <span ng-show="patient.gender">/ {{patient.gender}}</span>
    </div>
</div>
<div class="row">
    <div class="left">
        <span class="label">Poids:</span>
        <span>{{obs.WEIGHT}}</span>
    </div>
</div>

<div class="row">
    <div class="right">
        <span class="label">is dead:</span>
        <span>{{??}}</span>
    </div>
</div>

<div class="row">
    <div class="left">
        <span class="label">Reason for death:</span>
        <span>{{?? ("i thought it can be reasonfordeath.value")}}</span>
    </div>
</div>

Hi @soopafly

{{patient.dead}}

{{patient.causeOfDeath.display}}

When you click on Registration (1st page) Save button, in the network tab you can see a POST call. Whatever patient data that we send as part of the POST call can be configured in the html.

Thank you very much for your help @binduak. Here is a screenshot of what you suggest. is this what you are talking about ?

here are some modifications i made

<div class="row">
<div class="right">
    <span class="label">is dead:</span>
    <span>{{patient.dead}}</span>
</div>
</div>

<div class="row">
<div class="left">
    <span class="label">Reason for death:</span>
    <span>{{patient.causeOfDeath.display}}</span>
</div>
</div>

And it’s working.

But now i’ve tried with another concept, and it’s not working (check the field morturary concept) (mortuary_concept is a concept set and its members are : Death place, Registration date of patient, Release date of patient, Duration of stay, burial place, burial date)

As you can see, “is dead” and “reason for death” are OK. but for the mortuary_concept i’ve created in the openMRS dictionnary, it’s not working. edit html - printresult.

Here is the code for mortuary_concept in the html file

<div class="row">
<div class="left">
    <span class="label">Mortuary concept:</span>
    <span>{{patient.mortuary_concept.Duration+of+stay}}</span>
</div>
</div>

Thanks!

after few researches, i’m able to show mortuary concept on the printout. But it shows all the values of the members of the concept set. as you can see below:

edit html - printresult1

Code

<link rel="stylesheet" 
href="/bahmni_config/openmrs/apps/registration/supplementalPaperLayout/css/print.css"/>
<div>
<style>
</style>
<div class="row">
<div class="left">
    <span class="label">????? ???.:</span>
    <span></span>
</div>
<div class="right">
    <span class="label">Date:</span>
    <span>{{today | date:'dd/MM/yyyy'}}</span>
</div>
</div>
<div class="row">
<div class="left">
    <span class="label">Code Patient:</span>
    <span>{{patient.primaryIdentifier.identifier}}</span>
</div>
<div class="right">
    <span class="label">Quartier:</span>
    <span>{{patient.address.address2}}</span>
</div>
</div>
<div class="row">
<div class="left">
    <span class="label">Noms:</span>
    <span>{{patient.fullNameLocal() || patient.name}}</span>
</div>
<div class="right">
    <span class="label">District:</span>
    <span>{{patient.address.countyDistrict}}</span>
</div>
</div>
<div class="row">
<div class="left">
    <span class="label">Responsable:</span>
    <span>{{patient.primaryRelative}}</span>
</div>  
<div class="right">
    <span class="label">Age:</span>
    <span>{{patient.age.years || "0"}}</span>
    <span ng-show="patient.gender">/ {{patient.gender}}</span>
</div>
</div>
<div class="row">
<div class="left">
    <span class="label">Poids:</span>
    <span>{{obs.WEIGHT}}</span>
</div>
</div>

<div class="row">
<div class="right">
    <span class="label">is dead:</span>
    <span>{{patient.dead}}</span>
 </div>
</div>

<div class="row">
<div class="left">
    <span class="label">Registration Date:</span>
    <span>{{patient.registrationDate | date:'dd/MM/yyyy' }}</span>
 </div>
</div>

<div class="row">
<div class="left">
    <span class="label">Date of death:</span>
    <span>{{patient.deathDate | date:'dd/MM/yyyy' }}</span>
</div>
</div>
<div class="row">
<div class="left">
    <span class="label">Reason for death:</span>
    <span>{{patient.causeOfDeath.display}}</span>
 </div>
</div>

<div class="row">
<div class="left">
    <span class="label">Mortuary concept:</span>
    <span>{{obs.mortuary_concept}}</span>
</div>
</div>

But now i want to select each member of the concept to show in a field. How is that possible ? I’ve tried with the name of a member, but it’s not working.

<div class="row">
<div class="left">
    <span class="label">Mortuary concept:</span>
    <span>{{obs.mortuary_concept.Death+place}}</span>
</div>
</div>

Your help will be appreciated.