# Using "Visit Type" and "Visit Attribute Type" on visit note page

**URL:** <https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241>\
**Category:** Development\
**Created:** [June 22, 2015, 12:12pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241 "2015-06-22T12:12:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario](https://talk.openmrs.org/letter_avatar/mario/32/5_5575768a8748004e209b776fc1b2916d.png) [@mario](https://talk.openmrs.org/u/mario)\
**Post date:** [June 22, 2015, 12:12pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/1 "2015-06-22T12:12:15Z")

</div>

With OpenMRS 1.9.x we defined some custom Visit Types and Visit Attribute Types. Now using OpenMRS 2.x (with new UI) we would like to include those types somewhere. The most convenient way for us would be to just extend the “visit note” page to show our types.

Is that possible at all? And if yes, how? 🙂 If it’s not possible on the visit note page, I would also appreciate to hear of other ways…

---

<div class="post-metadata">

**Author:** ![benmwalimu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/benmwalimu/32/711_2.png) [@benmwalimu](https://talk.openmrs.org/u/benmwalimu)\
**Post date:** [July 7, 2015, 8:28am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/2 "2015-07-07T08:28:59Z")

</div>

I would also like to know the following concerning the Visit Types and Visit Attributes Types use on the visit note page.

- Is the use of Visit Types and Visit Attribute Type in the visit note page is supported now?
- If not, will it be added sometime in the future?
- What guidance can they give for how to do this?

---

<div class="post-metadata">

**Author:** ![wyclif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/wyclif/32/19607_2.png) [@wyclif](https://talk.openmrs.org/u/wyclif)\
**Post date:** [July 7, 2015, 8:50pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/3 "2015-07-07T20:50:08Z")

</div>

- From what i know, there is only one Visit Type that gets used currently in the reference application, so i doubt if visit types and their attributes are supported on that visit note page.
- Before anything is added, there should be a need or use case for it, if the need arises i believe it will be added.
- I would say you really need to describe your use case for it before anyone can give guidance or ideas how to go about it.

Note that my responses are in relation to the reference application and not OpenMRS core at wide. What are you trying to achieve?

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [July 7, 2015, 11:33pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/4 "2015-07-07T23:33:46Z")

</div>

The reference application is (currently) built around the idea of just a single VisitType, which is “Facility Visit - Patient visits the clinic/hospital (as opposed to a home visit, or telephone contact)”.

It should eventually also support (a) different types of facility visits, and (b) non-facility visits. You’re welcome to start implementing this support. 🙂

I would expect the visit type to be chosen at Check-In, not during Visit Note (which really just saves an Encounter).

As @wyclif says, the underlying platform supports more than this.

---

<div class="post-metadata">

**Author:** ![benmwalimu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/benmwalimu/32/711_2.png) [@benmwalimu](https://talk.openmrs.org/u/benmwalimu)\
**Post date:** [July 8, 2015, 8:39pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/5 "2015-07-08T20:39:51Z")

</div>

The reason for this is in the old UI (before upgrading to the 2.x UI) we could define Visit Attributes Type and it would appear in the visit note page when saving the encounter .

 ![](https://talk.openmrs.org/uploads/default/original/2X/a/ab703594b2c3c05e147973fe13028769bccd1d60.png)

The ones maked with red is an example of an attribute type i created. My main aim is to know whether the same is still supported in the current UI. Not sure if the screenshot explains it well but if you have any questions just ask them please. I would be glad to explain more 😄

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [July 8, 2015, 9:30pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/6 "2015-07-08T21:30:37Z")

</div>

I believe that Wyclif is asking for the real world use case you’re trying to achieve, to better understand the flow.

That said, the 2.x UI does not support visit attributes (yet).

Also, note that Visit Note in the 2.x UI is not the equivalent screen to the one you have shared. It is an HTML form for capturing the “consultation with clinician” part of the visit.

---

<div class="post-metadata">

**Author:** ![benmwalimu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/benmwalimu/32/711_2.png) [@benmwalimu](https://talk.openmrs.org/u/benmwalimu)\
**Post date:** [July 9, 2015, 7:53am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/7 "2015-07-09T07:53:41Z")

</div>

@wyclif The real world use case for this is to track patients and know whether its their first visit or a subsequent visit. this is because the Kenyan Government requires some diagnosis reports that show whether the patient was there for a first visit or a subsequent visit

@darius Would you know of any workaround that would be used achieve this functionality in the 2.x UI. if yes, how is it done.

---

<div class="post-metadata">

**Author:** ![wyclif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/wyclif/32/19607_2.png) [@wyclif](https://talk.openmrs.org/u/wyclif)\
**Post date:** [July 9, 2015, 4:20pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/8 "2015-07-09T16:20:15Z")

</div>

As @darius mentioned, you are assuming that the visit note in 2.x is the equivalent of the Visit form in the legacy UI which is not correct. I imagine that when you click start a visit in 2.x, that is when you should capture visit attribute information e.g if it is the first or not and i think that is where you should have your feature request to get added.

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [July 9, 2015, 5:32pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/9 "2015-07-09T17:32:12Z")

</div>

My suggestion would be to create a ticket (and then do the work!) to have the Start Visit screen ask you for visit attributes.

In the 2.x. UI we will want this to be configurable so that the admin can choose which attributes are shown (e.g. some visit attributes may be behind the scenes and not shown in the UI).

---

<div class="post-metadata">

**Author:** ![ibewes](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibewes/32/8063_2.png) [@ibewes](https://talk.openmrs.org/u/ibewes)\
**Post date:** [July 16, 2015, 9:19am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/10 "2015-07-16T09:19:43Z")

</div>

@darius Sure thing… I will create a ticket.

I’ve just been looking through the code a bit to try and get an idea how to do this and I have one quick question. Is there any place where you are displaying the newer-style Attribute Types in the new UI?

---

<div class="post-metadata">

**Author:** ![wyclif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/wyclif/32/19607_2.png) [@wyclif](https://talk.openmrs.org/u/wyclif)\
**Post date:** [July 17, 2015, 3:44pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/11 "2015-07-17T15:44:10Z")

</div>

Do you mean a page for adding/editing/deleting visit attribute types? If yes, not yet but we are having a sprint starting on the 27th to add pages for doing such admin tasks in the new UI. You are welcome to participate! 🙂

---

<div class="post-metadata">

**Author:** ![burke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/burke/32/17_2.png) [@burke](https://talk.openmrs.org/u/burke)\
**Post date:** [July 17, 2015, 4:21pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/12 "2015-07-17T16:21:38Z")

</div>

Note that visit attributes (like person, provider, and location attributes) exist specifically to allow implementations to extend the data model. While some visit attributes may be questions that could be asked when a visit is started, I wouldn’t expect all visit attributes to be questions that someone would/could answer when creating a visit.

Some examples of how visit attributes might be used:

- Attending doctor
- Hospital service
- Account number
- Bed status
- Billing details
- Patient condition
- Patient ambulatory status

Some may be known and settable by the person creating a visit; others may not be known/managed by the person creating the visit and others may be set & updated later in the visit or by external processes.

---

<div class="post-metadata">

**Author:** ![ibewes](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibewes/32/8063_2.png) [@ibewes](https://talk.openmrs.org/u/ibewes)\
**Post date:** [July 18, 2015, 5:30pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/13 "2015-07-18T17:30:11Z")

</div>

@wyclif I wasn’t referring to the admin pages to add and edit attribute types. Rather, I meant a page (or fragment) in the new UI that will render the defined attributes types.

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [July 20, 2015, 4:44pm UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/14 "2015-07-20T16:44:50Z")

</div>

@ibewes,

This is not done yet, AFAIK.

---

<div class="post-metadata">

**Author:** ![whiscard](https://talk.openmrs.org/user_avatar/talk.openmrs.org/whiscard/32/4715_2.png) [@whiscard](https://talk.openmrs.org/u/whiscard)\
**Post date:** [December 11, 2015, 9:17am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/15 "2015-12-11T09:17:08Z")

</div>

@darius @wyclif

Any updates on the above? I have a use-case where a Registration Clerk, when starting a visit in the new UI, would like to select a Visit Type (which in this case could be a drop down listing the clinics that hospital has e.g Eye Clinic, Dentist etc) where a patient is being attended to.

Any pointer on how to go about the above would be great.

---

<div class="post-metadata">

**Author:** ![wyclif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/wyclif/32/19607_2.png) [@wyclif](https://talk.openmrs.org/u/wyclif)\
**Post date:** [December 13, 2015, 9:36am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/16 "2015-12-13T09:36:05Z")

</div>

I don’t think this has been worked on, did you create a ticket?

---

<div class="post-metadata">

**Author:** ![whiscard](https://talk.openmrs.org/user_avatar/talk.openmrs.org/whiscard/32/4715_2.png) [@whiscard](https://talk.openmrs.org/u/whiscard)\
**Post date:** [December 14, 2015, 8:16am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/17 "2015-12-14T08:16:24Z")

</div>

@wyclif I have created a [ticket RA-977](https://issues.openmrs.org/browse/RA-977) with the description below:

I have a use-case where a Registration Clerk, when starting a Visit in the new UI, would like to select a Visit Type (which in this case could be a drop down listing the speciality clinics that the hospital has e.g Eye Clinic, Dentist etc) where a patient is being attended to.

---

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [January 5, 2016, 10:05am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/18 "2016-01-05T10:05:41Z")

</div>

Hi all,

We have had a use case too where our client needed to tag visits with specific visit types. See thread:

> [@How to use the Visit Type?](https://talk.openmrs.org/t/how-to-use-the-visit-type/3722):
>
> Hi all, I would like to implement different possible types of visit such as Outreach visit, Emergency visit… I think the Visit Type would do the job. This feature is not really in use in the Reference Application: Every new visit is assign to the default AtFacilityVisitType and I can’t find any place where it could be set differently. Is there any other project that uses Visit Type ?

So now, we’ve developed an app to bring a set of modifications to achieve this goal.

- override ‘Start Visit’ button to let user chose the Visit Type ![](https://talk.openmrs.org/uploads/default/original/2X/4/434b71b29d9b700d8d548e001ebd2d2e76ef5718.png)
- let the user change any visit’s Type ![](https://talk.openmrs.org/uploads/default/original/2X/a/a79268a011f497db121712c576fa7ba4f954d3d8.png)
- display the Visit Type in the ‘Recent Visits’ widget ![](https://talk.openmrs.org/uploads/default/original/2X/7/726dea879930d6ca9dd5bb9d6b5732b73edaf8ea.png)
- display the Visit Type in the ‘Patient Header’ visit status bar ![](https://talk.openmrs.org/uploads/default/original/2X/5/58452ed0035ac55d7c7a781458cc19c6713d7992.png)
- add the ablility to filter active visits by type, in the Active Visit page ![](https://talk.openmrs.org/uploads/default/original/2X/f/f92e1256e60edf92489f3332bd546d7ab6cc0f59.png)

You can find it here:

- [visit\_app.json](https://github.com/mekomsolutions/openmrs-module-lfhcforms/blob/master/omod/src/main/resources/apps/visit_app.json)
- [https://github.com/mekomsolutions/openmrs-module-lfhcforms/tree/master](https://github.com/mekomsolutions/openmrs-module-lfhcforms/tree/master)

**Note** that it runs with Reference Application 2.2 and our own fork of Coreapps (for now) (that adds an extension point in the patient header) available on github too: [Coreapps-1.6.0.1 (fork)](https://github.com/mekomsolutions/openmrs-module-coreapps/tree/master)

Hope that helps ! Thanks

---

<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:** [January 5, 2016, 10:14am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/19 "2016-01-05T10:14:25Z")

</div>

@mksrom thanks for sharing! 😄Do you have a pull request for adding the patient header extension point in coreapps?

---

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [January 5, 2016, 10:32am UTC](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241/20 "2016-01-05T10:32:35Z")

</div>

@dkayiwa. Unfortunatly, it is not quite ready for pull request yet. Let me check that again and I let you know when it’s done.

[Next page](https://talk.openmrs.org/t/using-visit-type-and-visit-attribute-type-on-visit-note-page/2241.md?page=2)
