Function to assist coding of medical issues
Here is a function that I have written following a request from Dr Arnab Naha who wanted a feature that makes it easy to reuse the codes associated with active medical issues by adding a list box to the "New Issue" window (add_edit_issue.php).
In this function, codes are gathered from active medical issues specific to the mode OpenEMR is currently operating in.
Only code types that are appropriate for a particular issue are displayed in that issue.
The filter for each issue type is constructed with elements from the appropriate code type sets in...
Admin > Lists > Code Types
i.e.
Medical Problem (medical_problem)
Diagnosis (diagnosis)
Drug (drug)
The relationship between Code sets and issue type are as follows (mirrors "Code Finder" window)...
Medical Problem - medical_problem
Allergies - diagnosis, drug
Medication - drug, diagnosis
Surgeries - diagnosis
Dental - diagnosis
All others - diagnosis
Codes are displayed in the "New Issue" window in a list box immediately above "Coding"