Eforms it

From CaisisWiki

Revision as of 13:42, 8 November 2007 by A.fraietta (Talk | contribs)
Jump to: navigation, search

Eform Overview

Come configurare una Eform

1. Aggiungi il file Xml che contiene le definizioni dei componenti della tua eform nella cartella “Eforms” del corretto modulo di malattia.

Il seguente esempio crea una eform con una sezione, e due form all`interno di essa: medicazioni e test di laboratorio. L`interfaccia consentira` l`inserimento di tre record di medicazioni e di un record di test di laboratorio. Le notazioni in lettera (ad esempio (A) ) non fanno parte dell`eform, ma sono rimandi alle note per spiegare ogni sezione con maggiore dettaglio piu` avanti.

   <?xml version="1.0" encoding="utf-8" ?>		
   <eform name="GU Pros FU" displayName="GU Prostate Follow Up">(A)
       <eformSection name="Presenting Details">(B)
           <eformItem displayName="Meds" controlName="Medications"></eformItem>(C)
           <eformItem displayName="PSA Lab Test"controlName="LabTestPSA"></eformItem>
       <Medications RecordId='1'>(D)
           <Medication NotNull="True"></Medication>(E)
       <Medications RecordId='2'>
           <Medication NotNull="True"></Medication>
       <Medications RecordId='3'>
           <Medication NotNull="True"></Medication>
           <LabTest NotNull="True"></LabTest>

(A) L`attributo name=”” deve corrispondere al nome del file fisico, ma puo` contenere spazi. Per esempio, se il file fisico e` denominato GUProsFU.xml, il name puo` essere ”GU Pros FU”. Il valore dell`attributo displayName=”” corrispondera` al titolo visualizzato dall`interfaccia per questa eform..

(B) eformSection e` il gruppo di form che appariranno assieme nell`interfaccia. Il valore dell`attributo name=”” corrispondera` al titolo del gruppo che apparira` nella parte sinistra dell`eform.

(C) I nodi-figli della eformSection, eformItems sono i form che saranno contenuti in questa sezione. Il valore dell`attributo displayName=”” sara` visualizzato sotto alla sezione nella parte sinistra. Il valore dell`attributo controlName=”” e` importante. E` il nome del file fisico con estensione .ascx che deve apparire in questa sezione dell`eform. Deve corrispondere esattamente al nome del controllo .ascx contenuto in una qualsiasi cartella Modules/SomeDisease/Eforms. Per esempio, nell`esempio sopra riportato il controlName=”LabTestPSA” richiamera` il form LabTestPSA.ascx form in questa eform.

(D) These are the nodes that hold the data as the eform is submitted. The node structure must match the database tables exactly. It is not necessary to include all the columns of a table, but the parent node must match the table name and any child node used must match a column name. As in this example with Medication, if multiple records for a table are being stored, a RecordId=”” attribute must be used which matches an attribute in the respective .ascx control. In this case, if you open the Medications.ascx file found in the Modules/All/Eforms folder you will find a series of eform input controls with RecordId=”” properties.

(E) As mentioned in (D), although not all table columns need to be listed, if a child node is present it must match the name of the table column exactly. Allowable attributes for child nodes are: • Required=”True” : A Required attribute will prevent a user from going past the data entry step without providing a value. • NotNull=”True” : A NotNull attribute requires that a value is present only when other fields of this record have a value. Typically used with a field that is non nullable in your database.

In the example provided, the Medication has a NotNull attribute which will prevent users from going past the data entry step without providing a Medication value only when other values for this record are present.

The system was structured so that all eform data is stored in a temporary state prior to eform approval. This temporary state is an XML string which in is stored in the EFormXml field of the Eforms table. When the eform is approved, this XML string is parsed and the data is inserted into the respective Caisis tables.

You may also find times where you would like to collect information, but there is no table/field in Caisis for this data. For this scenario, we provided a <NoTable> node. Under the NoTable node you can create child nodes that have no matching Caisis database fields. On approval, this data will be inserted in the field of the table specified in the PutDataInTable="" PutDataInField="" attributes. At MSK, we typically put this data in the “Encounters” table, “Notes” field.

You may create your eform from existing components(.ascx files), or you may create your own components. Part II of this document will discuss creating your own eform components.

In version 4.0, to register your new eform add a reference to it in the App_Config/EformRegistry.xml file.

Creating the .xsl stylesheet for the paper form view of entered data: After the data entry step, in the second “Review Data” step, the data just entered is presented in a format similar to a paper form. Fields can be edited via a pop up window on click. This “paper like” view of the data is generated by creating an .xslt stylesheet to transform your xml data. This step is optional. By default the system will generate a bullet point list of the fields you entered that does not resemble paper. If you would like to use a stylesheet, we recommend reusing code from existing .xslt files to minimize the amount of development time.

Please note, in future releases we will provide the option to hide the “Review Data” step. The eform could then more easily be used as just a consolidated interface to simplify common data entry.

Personal tools