# Upload patient's photo at registration

**URL:** <https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164>\
**Category:** Reference App\
**Tags:** id-picture, registration\
**Created:** [March 4, 2020, 9:27am UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164 "2020-03-04T09:27:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [March 4, 2020, 9:27am UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/1 "2020-03-04T09:27:51Z")

</div>

Hello devs, what would be the best approach in form of steps to enable uploading of patient’s photo at registration to enhance identification. @dkayiwa @darius @mogoodrich @ssmusoke

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [March 4, 2020, 11:01am UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/2 "2020-03-04T11:01:47Z")

</div>

Have you had a look at [https://wiki.openmrs.org/display/docs/Patient+Image+Module](https://wiki.openmrs.org/display/docs/Patient+Image+Module) ??

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [March 4, 2020, 7:05pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/3 "2020-03-04T19:05:54Z")

</div>

Unfortunately , the above module doesnt support ui-framework, and i would think thats some thing we would want to implement , it only supports the Legacy UI

---

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [March 4, 2020, 7:09pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/4 "2020-03-04T19:09:36Z")

</div>

Am trying it out but seems it has some glitches…

---

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [March 4, 2020, 7:11pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/5 "2020-03-04T19:11:15Z")

</div>

What would be your suggestion as an approach to archieve that? It also seems the developer had this in mind. I wonder if he started work on it @sunbiz

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [March 4, 2020, 7:14pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/6 "2020-03-04T19:14:15Z")

</div>

> [@reagan](#):
>
> What would be your suggestion as an approach to archieve that

well , we could probably create doable simpler tickets to achieve that ,and either make them community priority or intro tickets , either way , we need to break down the entire tasks into simpler manageable tickets ,

---

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [March 5, 2020, 2:13pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/7 "2020-03-05T14:13:57Z")

</div>

Is your suggestion to

1. build it with-in coreapps?
2. Improve the current patient’s photo module
3. A different module altogether?

---

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [March 5, 2020, 2:25pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/8 "2020-03-05T14:25:38Z")

</div>

Also when i tried playing around with the patient image module in the legacy ui; When i try to either upload or just take a picture, a get a pop up to log in again( and indeed the session gets ended)

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [March 5, 2020, 3:45pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/9 "2020-03-05T15:45:16Z")

</div>

> [@reagan](#):
>
> When i try to either upload or just take a picture, a get a pop up to log in again( and indeed the session gets ended)

Not sure about that behavior , but probably you could investigate further.

I wouldnt support extending that functionality in core apps , better if we just improve the existing module.

---

<div class="post-metadata">

**Author:** ![mksd](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksd/32/11729_2.png) [@mksd](https://talk.openmrs.org/u/mksd)\
**Post date:** [May 27, 2020, 10:55am UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/10 "2020-05-27T10:55:24Z")

</div>

@reagan I have left a comment on the ticket [here](https://issues.openmrs.org/browse/RA-121?focusedCommentId=264323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-264323).

Let’s be smart at this point when adding brand new features to the Ref App because we risk to run into duplicated efforts with what the MF Squad is building for OpenMRS 3.0.

My suggestion is to first ensure that there is a FHIR way to save/fetch what you need. In this case an ID picture. Then, carefully analyse where those FHIR endpoint(s) will be used in the Ref App.

---

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [May 27, 2020, 12:09pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/11 "2020-05-27T12:09:11Z")

</div>

Thanks @mksd for looking at this…The client was satisfied using the attachment module for saving patients images…I was attempting the said ticket to see if we could have such a feature for the Ref App. I have pushed one final commit which has everything in place if we ever need it…The only features lacking on it are.

- Making it an opt-in feature

- Ability to display the image in the summary( currently it shows the uploaded file name or a default name if taken by webcam

- Improving on the styling of the webcam. Otherwise thanks for the efforts in MF… Will be waiting.

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [May 27, 2020, 1:30pm UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/12 "2020-05-27T13:30:16Z")

</div>

> [@mksd](#):
>
> My suggestion is to first ensure that there is a FHIR way to save/fetch what you need.

In FHIR, there’s a [`photo` element](https://www.hl7.org/fhir/patient-definitions.html#Patient.photo) for the `Patient` resource, which is how you’d represent a patient identification photo. This element could either directly encode the picture data or pass along a URL to the correct data (to minimize the size of resources, I think we would generally only want to send a thumbnail with the patient resource and have a URL pointing to a larger resolution image in general).

I would [agree with @dkayiwa’s comment here](https://issues.openmrs.org/browse/RA-121?focusedCommentId=264133&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-264133) that patient images are best implemented as person attributes first because I don’t see the value in maintaining a history of patient identification images (and there may be privacy considerations) and second because it gives us a framework for adding, e.g., provider images, if that becomes a requirement (this is a pretty typical feature of EHRs in the US and UK).

Re: [Dmitri’s comment](https://issues.openmrs.org/browse/RA-121?focusedCommentId=264323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-264323) on that ticket:

> What happens to the old one when an ID picture is updated? Is there a FHIR recommendation around this?

FHIR generally avoids making these kinds of business logic recommendations. It would be perfectly legitimate in FHIR to return several different `Patient.photo` elements with a single resource or to have the `Patient.photo` elements store history using the FHIR versions API or only to have the latest patient photo available.

---

<div class="post-metadata">

**Author:** ![vasharma05](https://talk.openmrs.org/user_avatar/talk.openmrs.org/vasharma05/32/14182_2.png) [@vasharma05](https://talk.openmrs.org/u/vasharma05)\
**Post date:** [January 15, 2024, 11:59am UTC](https://talk.openmrs.org/t/upload-patients-photo-at-registration/27164/13 "2024-01-15T11:59:50Z")

</div>

Link to the ticket: [[O3-2744] - OpenMRS Issues](https://openmrs.atlassian.net/browse/O3-2744)

CC: @mksd
