Initial Design of Active Lists

A working active lists implementation is complete. Problem and allergy lists are implemented.

An allergy consists of allergen, reaction and severity properties. The problem consist of a basic concept. Both contain start and stop dates. They are used in case we need to define items with a date other than today when entering, and also to retrieve historical items with a past date range. Allergy, problem items are plain objects. Each type of object uses a helper class to interact with the system.

The user can create an allergy object with the three basic properties.

Allergy allergy = new Allergy();
allergy.setAllergen(allergen);
allergy.setReaction(reaction);
allergy.setSeverity(severity);
Context.getPatientService().addAllergy(allergy, patient);

Removing an allergy is as follows.

Allergy allergy = new Allergy();
allergy.setAllergen(allergen);
Context.getPatientService().removeAllergy(allergy, patient);

The active list entries are assumed to be coming from two paths. One is directly creating and removing objects as above. The other way is users creating the observations indirectly in the system which would modify the active list accordingly.

Explore posts in the same categories: OIP, OpenMRS

Comment: