How do I create a JSP Form to use during Patient Registration?

Application Name: OpenMRS Platform 2.2 Version Number: 2015-04-20 21:42 Version: 1.11.2 Build 3854fe

Good day All, How do I create a JSP form that I can use when registering patient details like in HTML form Entry? I have successfully captured the form on using HTML Form Entry, and now I need to capture the very same form using JSP. I have noticed that there are tags that are used in HTML e.g. <openmrs_tag:personField formFieldName=“patientId”/> but I can not find the other tags that I can use for the Dictionary in JSP. I have noted that there is reference tag that is used in HTML, and now the big question is how to I use tags in JSP ?

Find attached example in HTML that I want to convert in JSP:

Your HTML will not render correctly here. Please use gist.github.com or pastebin.com and paste the full page for review. Thanks!

@michael, I have attached the HTML code that I need to convert into JSP

No, you haven’t yet successfully done so. You can not just paste the code in to your post. You need to provide it at one of those sites listed above, and then link to the published version. We can not display your full HTML due to limitations of the post rendering software. Thanks!

@michael Below is the link to the code that I need to convert to JSP.

1 Like

In short I need to convert these fields into JSP

<td>**Location**:</td>
<td><**encounterLocation** /></td>
<td>**Provider**:</td>
<td><**encounterProvider** /></td>
<td><**obs conceptId="CIEL:138405**" style="radio"
answerConceptIds="1065,1066,1067" answerLabels="Yes, No, Unknown" /></td>

[quote=“chetenm, post:5, topic:4879”] @michael

I have not got feedback on how to convert this HTML form into JSP

Cheten

@chetenm have you looked at the htmlformentry patient tag at: https://wiki.openmrs.org/display/docs/HTML+Form+Entry+Module+HTML+Reference

Or have you looked at this? https://wiki.openmrs.org/display/docs/XForms+Module+Patient+Registration

@dkayiwa, I did looked into that , and could not successfully convert sections like this code from HTML into JSP page.

			<table>
				<tr>
					<td><b>Recent Contraceptive Use:</b> <br /> <obs
							conceptId="CIEL:48" answerConceptId="460" answerLabel="None"
							style="checkbox" /> <br /> <obs conceptId="CIEL:460"
							answerConceptId="460" answerLabel="Oral Contraception"
							style="checkbox" /> <br /> <obs conceptId="CIEL:460"
							answerConceptId="460" answerLabel="Condoms" style="checkbox" />
						<br /> <obs conceptId="CIEL:460" answerConceptId="460"
							answerLabel="Natural Planning / Rhythm" style="checkbox" /> <br />
						<obs conceptId="CIEL:460" answerConceptId="460"
							answerLabel="Diaphragm" style="checkbox" /> <br /> <obs
							conceptId="CIEL:460" answerConceptId="460"
							answerLabel="Depo-Provera" style="checkbox" /> <br /> <obs
							conceptId="CIEL:460" answerConceptId="460"
							answerLabel="Norplant" style="checkbox" /> <br /> <obs
							conceptId="CIEL:460" answerConceptId="460" answerLabel="Surgery"
							style="checkbox" /> <br /> <obs conceptId="CIEL:460"
							answerConceptId="460" answerLabel="Other" style="checkbox" /> <br />
					</td>
				</tr>
			</table>

@chetenm the reason i posted those two links is because they do not require learning JSP to have a custom patient registration screen. Otherwise, you would need to first google for some JSP beginner tutorials.

Good day ALL,

I have not go a clue on how to convert this HTML form into JSP. I have been reading the documentation on the wiki and google, but still I am failing to covert this code into a JSP page. Below is the link of the code that intend to convert.

Cheten

Are you just trying to override the default patient registration form? If yes, i think you may find it easier to try this out https://wiki.openmrs.org/display/docs/XForms+Module+Patient+Registration

Hi Daniel, I have had a look at the link that you sent me.

NO, I am not trying to overwrite the Patient Default Patient Registration Form.

What I want to achieve is the AMANI CLINIC example, BUT using JSP and Not HTML. The AMANI CLINIC example is on pages 49-53 of the OpenMRS Guide 2.0.pdf