Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2.1.1. Portuguese modified version

In the Portuguese portal modified version we adapted the workflow to be more aligned with the specs. It has the following behaviour:

...

Code Block
themeDJango
languagehtml/xml
linenumberstrue
collapsetrue
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
    </h:head>
    <body>
        <h:form>
            <p:panel header="#{translationBean.report_summary}">
                <table>
                    <tr>
                        <td><b><h:outputText
                                    value="#{translationBean.patient_data_givenname}" /></b></td>
                        <td>&nbsp;</td>
                        <td><h:outputText value="#{myBean.selectedPatient.name}" /></td>
                    </tr>
                    <tr>
                        <td><b><h:outputText
                                    value="#{translationBean.patient_data_surname}" /></b></td>
                        <td>&nbsp;</td>
                        <td><h:outputText value="#{myBean.selectedPatient.familyName}" /></td>
                    </tr>
                    <tr>
                        <td><b><h:outputText
                                    value="#{translationBean.patient_data_street_address}" /></b></td>
                        <td>&nbsp;</td>
                        <td><h:outputText value="#{myBean.selectedPatient.address}" /></td>
                    </tr>
                    <tr>
                        <td><b><h:outputText
                                    value="#{translationBean.patient_data_code}" /></b></td>
                        <td>&nbsp;</td>
                        <td><h:outputText value="#{myBean.selectedPatient.postalCode}" /></td>
                    </tr>
                    <tr>
                        <td><b><h:outputText
                                    value="#{translationBean.patient_data_city}" /></b></td>
                        <td>&nbsp;</td>
                        <td><h:outputText value="#{myBean.selectedPatient.city}" /></td>
                    </tr>
                    <tr>
                        <td><b><h:outputText
                                    value="#{translationBean.patient_data_country}" /></b></td>
                        <td>&nbsp;</td>
                        <td><h:outputText value="#{myBean.selectedPatient.country}" /></td>
                    </tr>
                </table>
            </p:panel>
            <p:panel
                header="Confirmar com o doente (acesso aos seus dados clínicos):" id="confirmationPanel">
                <p:outputPanel id="customPanel">
                    <td><b><h:outputText value="Atendimento:" /></b></td>
                    <p:selectOneRadio id="customRadio"
                                      value="#{confirmationBean.purposeOfUse}" layout="custom">
                        <f:selectItem itemLabel="&nbsp;&nbsp;EMERGENTE (não é possível obter o consentimento)"
                                      itemValue="EMERGENCY" />                                                                                       
                        <f:selectItem itemLabel="&nbsp;&nbsp;NÃO URGENTE"
                                      itemValue="TREATMENT" />
                        <p:ajax update="confirmationPanel"/>
                    </p:selectOneRadio>
                    <h:panelGrid columns="2">
                        <p:radioButton id="opt2" for="customRadio" itemIndex="0" />
                        <h:outputLabel for="opt2" value="&nbsp;&nbsp;EMERGENTE (não é possível obter o consentimento)" />
                        <p:radioButton id="opt1" for="customRadio" itemIndex="1" />
                        <h:outputLabel for="opt1" value="&nbsp;&nbsp;NÃO URGENTE" />
                    </h:panelGrid>
                </p:outputPanel>
                <p:outputPanel rendered="#{confirmationBean.purposeOfUse=='TREATMENT'}" id="customPanel2">      
                    <td><b><h:outputText
                                value="Deu consentimento prévio?" /></b></td>
                    <p:selectOneRadio id="customRadio2"
                                      value="#{confirmationBean.confirm}" layout="custom">
                        <f:selectItem itemLabel="Yes" itemValue="Yes" />
                        <f:selectItem itemLabel="No" itemValue="No" />
                    </p:selectOneRadio>
                    <h:panelGrid columns="2">
                        <p:radioButton id="opt11" for="customRadio2" itemIndex="0" />
                        <h:outputLabel for="opt11" value="&nbsp;&nbsp;Sim" />
                        <p:radioButton id="opt22" for="customRadio2" itemIndex="1" />
                        <h:outputLabel for="opt22" value="&nbsp;&nbsp;Não" />
                    </h:panelGrid>
                </p:outputPanel>
                <p:commandButton id="submitButton" 
                                 value="Confirmar" 
                                 ajax="false"
                                 action="/viewDocuments.xhtml?faces-redirect=true&amp;javax.portlet.faces.PortletMode=view&amp;javax.portlet.faces.WindowState=normal"
                                 disabled="#{confirmationBean.purposeOfUse==null}"
                                 onclick="customRadio.selectValue('')">
                    <p:resetInput target="confirmationPanel" />
                    <f:setPropertyActionListener value="#{confirmationBean.purposeOfUse}"
                                                 target="#{myBean.purposeOfUseForPS}" />
                    <f:setPropertyActionListener value="#{confirmationBean.confirm}"
                                                 target="#{myBean.previousConsent}" />
                    <f:setPropertyActionListener value="null"
                                                 target="#{confirmationBean.purposeOfUse}" />
                    <f:setPropertyActionListener value="null"
                                                 target="#{confirmationBean.confirm}" />
                </p:commandButton>
                <p:commandButton id="cancelButton" value="Cancelar" ajax="false"
                                 action="/view1.xhtml?javax.portlet.faces.PortletMode=view&amp;javax.portlet.faces.WindowState=normal" />
            </p:panel>
        </h:form>
    </body>
</html>

Please give importance to:

Code Block
themeDJango
languagehtml/xml
linenumberstrue
 <p:selectOneRadio id="customRadio"
                                      value="#{confirmationBean.purposeOfUse}" layout="custom">
                        <f:selectItem itemLabel="&nbsp;&nbsp;EMERGENTE (não é possível obter o consentimento)"
                                      itemValue="EMERGENCY" />                                                                                       
                        <f:selectItem itemLabel="&nbsp;&nbsp;NÃO URGENTE"
                                      itemValue="TREATMENT" />
                        <p:ajax update="confirmationPanel"/>
                    </p:selectOneRadio>

That will trigger the "hide and show" of the question that asks for the previous consent. Please notice also the following tag:

Code Block
themeDJango
languagehtml/xml
linenumberstrue
<p:outputPanel rendered="#{confirmationBean.purposeOfUse=='TREATMENT'}" id="customPanel2">
...
</p:outputPanel>

 

2.2. Assertion type

Loremipsum

...