A method for subcategorizing Issue items

medfetch wrote on Thursday, March 10, 2016:

Please take a look at this code that adds the option to subtype an Issue:

This is actually three commits from based off of Brady’s master file. I am slowly conquering Git…

A method for subcategorizing Issue items:

Allowing subcategorization does not affect any current feature, but extends the display options for future uses. It does not affect reporting functions, as items with subtypes are still categorized using their parent/original attribute. New Issues can still be created, and they too could be extended with subtypes.

Use Case Examples:
A provider might like to subcategorize medicines they prescribed for their particular specialty. For an oncologist this medications_issue_list may have a subtype of “onc”. For Ophthalmologists, eye diseases, usually listed as a medical problem, can be displayed as a new category by adding “eye” as a subcategory to a medical_problem_issue_list item. In the browser, if a user looks at the Administration->Lists->Medical Problem Issue List (medical_problem_issue_list), a new column “subtype” appears.

The Eye Form uses this feature to create a new separate element “Past Ocular History” for display purposes, but items in this category are actually medical problems, subtype eye, to the back end. For my purposes this is accomplished by adding the subtype to the table alone, but I found if a user made changes to the “list” in the Browser, without this new feature, they would wipe out the stored “subtype” values.

Please review the code and test it. I don’t think it breaks anything else ;).

sunsetsystems wrote on Friday, March 11, 2016:

Looks like you linked to just the last of your 3 commits, where you added and then deleted a bunch of stuff. Would be much easier to review if you combine them into 1 commit.

Rod
http://www.sunsetsystems.com/

medfetch wrote on Friday, March 18, 2016:

With Brady holding my hand I was able to roll these changes into one commit:

Look forward to having this reviewed and tested.
Ray

bradymiller wrote on Wednesday, March 23, 2016:

Hi Ray,
I placed some comments on github. I think that allowing subtype for both list_options and lists(Issues) makes a lot of sense(allows further differentiation of issues when needed(showing optho meds separately, for example), while supporting general reporting(showing all meds when print a patient ccda) ).
-brady
OpenEMR

medfetch wrote on Friday, March 25, 2016:

Hi Brady,
I reviewed the comments on github and updated the files to include the subtype list and pull-down select option when viewing an issue_list.

The openEMR Issues remain the same, untouched, by this commit.

The subtype select option defaults to null.

It is now in a new rebased single commit for review:

Ray

bradymiller wrote on Sunday, March 27, 2016:

Hi Ray,

I placed some comments on github.
(sorry, I didn’t place them in the commit above; let me know if you didn’t get them)

-brady
OpenEMR

medfetch wrote on Tuesday, March 29, 2016:

All changes are complete. It is rebased to one commit:

bradymiller wrote on Tuesday, March 29, 2016:

Hi Ray,

Placed a review on github.

-brady
OpenEMR

bradymiller wrote on Sunday, April 03, 2016:

Hi,

I recently committed Ray’s revision of the feature to the codebase:

Thanks for the contribution!
-brady