Outils pour utilisateurs

Outils du site


advanced:specific_data

Table des matières

SPECIFIC DATA

Goal

Each center needs to handle specific data concerning its activity.

Model

Specific data is saved in database, in the field named 'specifData', in json format

  • equipment = Equipment
  • patient = Individual
  • patient followup = IndividualFollowUp
  • patient immunology = IndividualImmuno
  • patient serology = IndividualSero
  • product = Product
  • product delivery = ProductDelivery
  • product receipt = ProductReceipt
  • product sample = ProductSample
  • product type = productType
  • reagent type = ReagentType
  • spot = Spot
  • user = User

Example of a 'specifData' field content

  {
    "myField1": "value1", "myField2": "value2"
  }

View

QAP10 allows to personalize forms using an include mechanism of a sub file : a main page (directory [HOME_QAP10]/WebContent/appli/view/[group]/display) calls a sub page presents in [HOME_QAP10]/WebContent/local/view/[group]/display . For example for the equipment, QAP10 includes in the form page [HOME_QAP10]/WebContent/appli/Equipment/display/Equipment.jsp the sub file [HOME_QAP10]/WebContent/local/Equipment/display/Equipment.jsp

Syntax

In a sub file, add html code to personalize your page. If you need an input control, start its name with method specifData.get(), specifData.getBoolean(), specifData.getInteger()

  <!-- field 'toto' -->
  <tr>
    <td>my field 'toto'</td>
    <td><input type="text" name="qap10Specif_toto" value="%{specifData.get('toto')}"></td>
  </tr> 
  <!-- fields with struts tag -->
  <%@ taglib prefix="s" uri="/struts-tags"%>

  <!-- htmlt <select> -->
  <s:select
    name="qap10Specif_tata"
    value="%{specifData.get('tata')}"
    list="#{'':'?', 'bonjour':'bonjour', 'ciao':'ciao', 'hello':'hello'}"
  />
  
  <!--  example of a selection with values from the qap10's dictionary named for example **DICO_TEST** -->
  <s:select
    name="qap10Specif_titi"
    value="%{%{specifData.get('titi')}"
    list="%{mapBuilder.getMapDictionary('DICO_TEST')}" 
  />

for this last example, the saved value is the dictionary's raw value. Beware if you change this value in the dictionary, you will need to update the database manually

Notes

  • if input is empty the tag is not present in the local field. In another words, empty tag does not exist in this field
  • there is no input control for local fields (e.g. date format). The solution would be to use javascript …
  • if you create local fields “ex1” et “ex2”, then after a while you change to local fields “ex1” and “ex3” (field “ex2” is removed“). In the database, the old records are unchanged (i.e. “ex2” is kept and “ex3” is not set) until you update them through qap10
advanced/specific_data.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki