How to mark PHI fields in query forms?

To mark any field as PHI in the query, one needs to update the default query forms in the OpenSpecimen. All these are available in tomcat at ${TOMCAT_HOME}/webapps/openspecimen/WEB-INF/classes/query-forms/

Note: After making the below changes, the tomcat needs to be restarted.

Below is an example  to mark visit collection date as PHI:

Open the scg.xml, search forthecollectionDate. It will look like below:

Before PHI
<row>
  <datePicker>
    <name>collectionDate</name>
    <udn>collectionDate</udn>
    <caption>#getMessage("visit_date")</caption>
    <column>COLLECTION_TIMESTAMP</column>
  </datePicker>
</row>

Add '<phi>true</phi>'inthecollectionDate row. After updating, it will look like below:

After PHI
<row>
  <datePicker>
    <name>collectionDate</name>
    <udn>collectionDate</udn>
    <caption>#getMessage("visit_date")</caption>
    <column>COLLECTION_TIMESTAMP</column>
    <phi>true</phi>
  </datePicker>
</row>


By following the above steps, any field can be marked as PHI in the query.

Below is the list of the forms and object mapping. All these files should be located in tomcat at ${TOMCAT_HOME}/webapps/openspecimen/WEB-INF/classes/query-forms/

Collection Protocol: cp.xml

Participant: cpr.xml

Visit: scg.xml

Specimen: specimen.xml

Order: order.xml

Shipment: shipment.xml