Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree
Skip to end of metadata
Go to start of metadata


The type information observations record is specified by the Concept used by the Observation. So first, look through the list of available complex data types to

see if your system has a data type which meets your needs. Or alternatively, if you have been told to use a specific concept which already exists, then do so.


Currently, complex handlers available by default are, 

  • ImageHandler
  • TextHandler
  • PatientHandler
  • LocationHandler 


Note that the use of the term ‘PatientHandler’ and ‘LocationHandler’ do not specifically mean that your system makes use of the basic PaientHandler, and not PatientFieldGenObshandler.

The FieldGenObsHandlers are included in the trunk by default, and are normally assigned a higher priority than the base layer handlers.


In this case, the term PatientHandler and LocationHandler means that your system will allow you to record patient and location types at least in the most basic level. This means that at worst,

when creating a complex Obs using a patient concept, you will be asked to input the patient ID number as the value.


However do note that the newly created obs is not tied to the handler class used to create it. For example, an Obs created using the basic PatientHandler can be viewed and edited using PatientFiedGenObsHandler,

and vice versa.

Consider if any of these handlers, or other basic data types such as numerics, text or concepts etc. will meet your requirements. If not, do consider creating and registering a handler class of your own. 

Once you have decided on a handler, you must either create a new concept, or as earlier, use one which has already been created.


Creating a Complex Concept is a very straightforward process.

  1. Go to the ‘Add new Concept’ page  (/openmrs/dictionary/concept.form)
  2. Select ‘Complex’ from the data type drop down list
  3. Select a suitable handler from the drop down list
  4. Input all required data
  5. Click ‘save’ 


             Below : An Image of the ConceptForm page, displaying a list of currently available handlers


After you have done so, you may use this Concept to create a Complex Obs.

  1. Go to the ‘Add Observation’ page (/admin/observations/obs.form)
  2. Select your concept
  3. Input all required data
  4. Click ‘Save’ 


   Below : An Image of the ObsForm page with a complex concept selected. The Handler extends FieldGenObsHandler,

   hence the user is displayed an auto complete box where he can start typing patient names.



Below : Screenshot of an Complex Obs created using a concept of type 'Patient'.

Note the inclusion of a link which leads to the Patient Dashboard, letting the user to view the Patient instance easily.



Below : Screenshot of an Complex Obs created using a concept of type 'Location'.



Below : Creating a Complex domain Obs sans the fieldGen handler. Note the simple text box provided to input the Location id




Below : Obs Validation at work



Below : Complex Obs validation gets tricky if you're using basic handlers




Please note that both complex concepts and complex obs can be voided, edited and un voided.



  • No labels