Mohamed,

The key is this tag:
<repeat>
    <template>...</template>
    <render/>
</repeat>

The idea is that the html within the <template></template> tag is repeated
one time for each <render/> tag. So if you want it to repeat 5 times, you'd
put 5 <render/> tags.

See the example here:
https://wiki.openmrs.org/x/kg8z#HTMLFormEntryModuleHTMLReference-%3Crepeat%3E

(Also, I noticed that you have extra code between your two <render/> tags,
which is wrong, and should be removed.)

-Darius


On Fri, Dec 2, 2011 at 9:04 AM, mohamed Duali <[email protected]> wrote:

> Hi Darius :
>
> I follow your example about how to design a table in HTML form entry.
> Everything is fine: I have created conceptID (which is a set) and also all
> the other information. But I have got 2 rows only
>
> The result will need to be in 5 rows. I have attached two files: a
> Screenshot and the  html code form
>
> Could you please check where the error is it ?
>
> Regards
>
> mohamed
>
>
>
>
> Le 23 novembre 2011 17:48, Darius Jazayeri <[email protected]> a
> écrit :
>
> You need to have one Concept (which is a Set) that will represent the
>> entire row. Call it "Diagnosis or Symptom Construct".
>>
>> The Diagnosis or Symptom Construct set should contain one concept
>> representing each column:
>>
>>    - Diagnosis or Symptom (datatype=Coded)
>>    - Diagnosis or Symptom Start Date (datatype=Date)
>>    - Diagnosis or Symptom Outcome (datatype=Coded)
>>    - ...
>>
>> Then in the html form you do something like:
>>
>> <table>
>> <repeat>
>>     <template>
>>         <obsgroup groupingConceptId="id of Diagnosis or Symptom
>> Construct">
>>             <tr>
>>                 <td>{i}</td>
>>                 <td><obs conceptId="id of Diagnosis or Symptom"
>> answerClasses="Diagnosis" style="autocomplete"></td>
>>                 ...
>>             </tr>
>>         </obsgroup>
>>     </template>
>>     <render i="1"/>
>>     ...
>>     <render i="5"/>
>> </repeat>
>> <table>
>>
>> -Darius
>>
>> On Tue, Nov 22, 2011 at 11:44 PM, Dave Thomas <[email protected]> wrote:
>>
>>> Hi.  This is a case in which you want to use the obsGroup tag.  This
>>> explicitly groups each row in the obs table.
>>>
>>> d
>>>
>>>
>>> On Wed, Nov 23, 2011 at 9:39 AM, mohamed Duali <[email protected]>wrote:
>>>
>>>> Dear All:
>>>>
>>>> I am designing a HTML form in which the clinician has the possiblity
>>>> to enter information on several diagnosis present at the encounter
>>>> timepoint. On the paper form, this has been designed as a table with
>>>> five rows, each row representing one diagnosis. Information on start
>>>> date, end date, etc of the disease in question is then entered in
>>>> columns of the corresponding row. Information on a maximum of 5
>>>> diseases can then be entered. A screenshot of this table is attached.
>>>> How does one best design such a table in HTML forms ? Do I create 5
>>>> concepts for each column ("Diagnosis 1, Diagnosis 2, Diagnosis 3, …;
>>>> Start Date 1, Start Date 2,…; End Date 1,…) or is there a better way ?
>>>>
>>>> Best regards,
>>>>
>>>> Mohamed
>>>>
>>>> _________________________________________
>>>>
>>>> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail
>>>> to [email protected] with "SIGNOFF openmrs-implement-l" in
>>>> the  body (not the subject) of your e-mail.
>>>>
>>>> [mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]
>>>>
>>>
>>> ------------------------------
>>> Click here to 
>>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-implement-l>from
>>>  OpenMRS Implementers' mailing list
>>
>>
>> ------------------------------
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-implement-l>from
>>  OpenMRS Implementers' mailing list
>>
>
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-implement-l>from
>  OpenMRS Implementers' mailing list
>

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-implement-l" in the  body 
(not the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

Reply via email to