How can I implement a document categories hierarchy on code level or via any api?

1.How can I implement a document categories hierarchy on code level or via any api and not via the portal?
For example I want to make folder and sub folders dynamically under the categories folder or patient information folder ,How can I implement that at code level?.
2.How can I assign billing codes to an encounter at code level or via any api and not via the portal?

Hi @Dikshita_Mahajan

  1. OpenEMR’s terminology can be confusing. In some cases documents are called Documents, in others Templates are called documents.

I’m not a dev so I don’t know about making categories by API or ‘on code level’. However, if you are referring to the document templates that patients read or fill out in the portal, those ‘documents’ are used in the portal, but not created/ configured there. They are created in ‘Miscellaneous/ Portal Dashboard/ Templates’:

The construction of Template ‘documents’, and specifically the Categories of a template are described in this detailed wiki doc:
https://www.open-emr.org/wiki/index.php/Patient_Portal_Templates

Note that this describes the templating interface and tools built into OpenEMR by the developer rather than a lower level code approach to the feature. But that wiki page does have notes at the end of the post linking to forum posts by the developer so you may be able to get some coding insights.

  1. Assigning billing codes: OpenEMR has a billing module that handles all the intricacies of relating billing codes to everything else they must be related to in order to create a valid claim file. In any case, billing codes are not assigned to encounters in the portal.

Put differently, assigning billing codes to an encounter ‘at code level’ would duplicate what the Billing Manager already does and would also leave necessary activities un-done.

You can read more about assigning billing codes to enacounters here:
https://www.open-emr.org/wiki/index.php/HOWTO:_Create_A_Claim-_Ready_Encounter

These are some other relevant pages:
https://www.open-emr.org/wiki/index.php/List_of_OpenEMR_Data_Fields_Required_For_Insurance_Claims
https://www.open-emr.org/wiki/index.php/New_Encounters_%26_Coding_4.1

Hope that helps!
Best- Harley