# How to auto-generate patient IDs with HTML forms?

**URL:** <https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451>\
**Category:** Ask OpenMRS\
**Tags:** html-form-entry\
**Created:** [October 28, 2015, 11:04am UTC](https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451 "2015-10-28T11:04:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![barnaby85](https://talk.openmrs.org/letter_avatar/barnaby85/32/5_5575768a8748004e209b776fc1b2916d.png) [@barnaby85](https://talk.openmrs.org/u/barnaby85)\
**Post date:** [October 28, 2015, 11:04am UTC](https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451/1 "2015-10-28T11:04:57Z")

</div>

Please how can i auto generate a patient ID using an HTML form to create patient in OpenMRS

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [October 28, 2015, 11:27am UTC](https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451/2 "2015-10-28T11:27:50Z")

</div>

Which version of openmrs are you using? Did you have a look at? [https://wiki.openmrs.org/display/docs/Idgen+Module](https://wiki.openmrs.org/display/docs/Idgen+Module)

---

<div class="post-metadata">

**Author:** ![barnaby85](https://talk.openmrs.org/letter_avatar/barnaby85/32/5_5575768a8748004e209b776fc1b2916d.png) [@barnaby85](https://talk.openmrs.org/u/barnaby85)\
**Post date:** [October 28, 2015, 3:58pm UTC](https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451/3 "2015-10-28T15:58:09Z")

</div>

Am using OpenMRS Version: 1.9.7 and the idgen only applies to the default openmrs create patient. Meanwhile i have designed a create patient form with HTML form entry and i can’t get the idgen to work on the HTML form. I have also gone through the documentation but nothing for HTML forms

---

<div class="post-metadata">

**Author:** ![xajil](https://talk.openmrs.org/letter_avatar/xajil/32/5_5575768a8748004e209b776fc1b2916d.png) [@xajil](https://talk.openmrs.org/u/xajil)\
**Post date:** [June 14, 2022, 4:34pm UTC](https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451/4 "2022-06-14T16:34:58Z")

</div>

Hi, @barnaby85 did you solve this issue? I’m with the same challenge now and I’m using the Version 1.9.9 Build a595f9. Maybe @dkayiwa can you help me?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [June 15, 2022, 9:56am UTC](https://talk.openmrs.org/t/how-to-auto-generate-patient-ids-with-html-forms/3451/5 "2022-06-15T09:56:17Z")

</div>

Can you make a REST call to the server to get a new ID?
