Table des matières
Process model
Introduction
In QAP10 process are divided into steps which are technically HTML forms as QAP10 is a web application. Before users fill process forms, administrator must define models which are set in 'Models' section of QAP10 (menu Process/Models), through a wysiwyg editor.
To design a nice model, all HTML tags are allowed including input ones : regular HTML like text, radio, select, …, and special tags for specific operations in QAP10 (choose an equipment, printing, …). In models, these input tags are coded into IMG tag with special attributes and translated into fully compatible HTML for daily activity.
For example HTML tag <textarea name=“helloworld” rows=“5”> is coded in model in <img name=“helloworld” src=“appli/js/tinymce/qap10/img/textarea.png” data-rows=“5”>
Tag syntax
Common mandatory attributes
Thereafter all mandatory attributes are bold text
- name : has to be unique in the process step except for radio button. Names must begin with a letter, then a mix of letters, digits and characters '_' (i.e. underscore). The maximum length is not set in HTML 5 and seems to depend on browser, so it is theoretically unlimited …
- src : logo displayed in editor
HTML tags
This section gather tags equivalent or very similar with classical HTML tags.
checkbox (data-type="checkbox")
cf HTML tag <input type=“checkbox”> tag
- data-value : value returned if checkbox is checked (cf HTML attribute value). Default value is '1' if not set.
drop-down list (data-type="select")
cf HTML tag <select>
- data-value : JSON string with encoded quote character. For example list blue/b,white/w,/red/r is saved like {"b":"blue","w":"white","r":"red"}
You must use HTML character entity '"' for “ because quote character is removed from pairs name/value inside JSON string
radio button (data-type="radio")
cf HTML tag <input type=“radio”
- data-value : value returned when radio button is checked
radio buttons can share the same name to make a group.
textarea (data-type="textarea")
cf HTML tag <textarea>
- data-rows : cf HTML attribute rows
Textarea attribute cols is useless because qap10 set the width of all textareas to '90%' in the CSS style
QAP10 tags
This section gather special QAP10 tags.
equipment (data-type="equipment")
Select an equipment during the process, according to its family
- data-family : code of an equipment family
reagent (data-type="reagent")
Select a reagent during the process
- data-family : code of a reagent family
- data-type1 : reagent code
- data-type2 : alternative reagent code
- data-quantity : previewed quantity which can be 0
One of the attributes data-family, data-type1, data-type2 should be mandatory
spot (data-type="spot")
Select a spot during the process, according to its family
- data-family : code of a spot family
text (data-type="text")
Close to HTML tag <input type=“text”> with special options
- data-inputType
- text : regular input
- formula : calculated input (user cannot change it)
- process : import data from process
- table : import data from tables other than process
- data-format : string, integer, decimal, date, time
- data-size : in the same time input length and maximum number of characters (in the same time attribute 'size' and 'maxlength' of HTML tag <input type=“text”>)
For inputType=table
- data-table : table name
- Donor
- DonorFollowup : donor, last follow-up
- DonorImmuno : donor, last immunology
- DonorSero : donor, last serology
- Recipient
- RecipientFollowup : recipient, last follow-up
- RecipientImmuno : recipient, last immunology
- RecipientSero : recipient, last serology
- Product
- ProductReceipt : product receipt
- ProductDelivery : product delivery
- data-field : imported field name
For inputType=process
- data-process : key of the process model
- data-step : key of the process model step
- data-field : imported field name
- data-noNeedValidation : if this parameter exists, the value can be imported even if the process is not validated yet.
printing (data-type="printing")
Select the print out
- data-io : in, out . Apply to the items entering (input) or exiting (output) in the process
- data-doc : delivery, stock (cf product packaging) or a numeric data which matches to a key from Doc table
stock (data-type="stock")
Open a dialog to stock a product.
- data-io : in, out . Apply to the products entering (input) or exiting (output) in the process
product (data-type="product")
Open a dialog to create output products
- data-producttype : how the type of the new product is set
- first : taken from the first input product (default if the option is not set)
- prod : the user choose during production
- data-packaging : a numeric data which matches to a key from the database table ProductPackaging. If the option is not set, the packaging is taken from the first input product
- data-status : product state, cf dictionary entry PRODUCT_STATE. If the option is not set, the packaging is taken from the first input product
