Hello!The below doesn't work because it tries to use the answerConceptId too look up a concept rather than use the raw number as an answer.
I did try something simalar and from fiddling with it, and having taken a quick grep through the code, I don't *think* we support style=checkbox for numeric types at all. If you use checkbox, it switches back to the default single selection combo box.
There are 2 images attached. The one with CD4 combos is produced from:<obs conceptId="5497" labelText="CD4" answers="100" answerLabels="100" style="checkbox"/> <obs conceptId="5497" labelText="CD4" answers="500" answerLabels="500" style="checkbox"/> <obs conceptId="5497" labelText="CD4" answers="1400" answerLabels="1400" style="checkbox"/>
Also, one interesting thing I've found from trying to use a number of seperate <obs/> tags with type radio, is that it get's a bit confused when it renders the screen to go back and view or edit an existing encounter. The observations are being recorded correctly in the database from the original form submission, but on the rerender, it correctly populates the smallest number in the recorded obs, but adds a decimal to the others and creates extra widgets for them.
For example, given the following markup and submitting a form with 1, 3, and 4 selected:
<repeat> <template><obs conceptId="7481" labelText="" answers="{num}.0" answerLabels="{num}" style="radio" />
</template><render num="1" /><render num="2" /><render num="3" /><render num="4" /><render num="5" /><render num="6" />
</repeat>Results in the other attached image where the 1 radio is refilled, but new entries are created for 3.0 and 4.0 rather than just using 3 and 4.
-Steve On 05/15/2012 04:43 PM, Darius Jazayeri wrote:
Hi Steve, How about <obs conceptId="9876" answerConceptId="1" style="checkbox" /> <obs conceptId="9876" answerConceptId="2" style="checkbox" /> <obs conceptId="9876" answerConceptId="3" style="checkbox" /> -DariusOn Tue, May 15, 2012 at 1:04 PM, Steven Githens <sgith...@iupui.edu <mailto:sgith...@iupui.edu>> wrote:Hello OpenMRS Dev, I'm trying to implement part of a paper form that has a "circle all" type of area that binds to a numeric concept, and haven't found the right HTML Form Entry tag yet for that. Essentially, I want: <obs conceptId="9876" answers="1,2,3" answerLabels="1,2,3" style="checkbox" /> So that multiple observations can be recorded for it, but it doesn't look like we accept style="checkbox" yet for numeric obs? I played with: <obs conceptId="9876" answers="1" answerLabels="1" style="radio" /> <obs conceptId="9876" answers="2" answerLabels="2" style="radio" /> <obs conceptId="9876" answers="3" answerLabels="3" style="radio" /> Which sort of works, but they should really be checkboxes. Cheers, Steve _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to lists...@listserv.iupui.edu <mailto:lists...@listserv.iupui.edu> with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:lists...@listserv.iupui.edu <mailto:lists...@listserv.iupui.edu>?body=SIGNOFF%20openmrs-devel-l] ------------------------------------------------------------------------Click here to unsubscribe <mailto:lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list
_________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to lists...@listserv.iupui.edu with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l]
<<attachment: htmlformentry-radiobuttons.png>>
<<attachment: htmlformentry-radio-rounding.png>>