We are working on an application that will be used by hospitals to bill their patients. The hospital will register every treatment for a patient in our application.
The government has released a set of numbers that identify the treatments that can be provided. For instance, number 111111 could mean treating a broken leg, while 222222 could be hearth surgery. As you can imagine, there are a lot of these numbers. The government has organized these numbers in a tree structure with chapters, sections, paragraphs, ... The leaves are the actual numbers.
We have stored this tree structure in our database so we can show it to our users and they can search a number in the same way as they would in the documentation provided by the government. Every time the hospital uses one of these numbers, we have a document which contains this number identifying the treatment, when it was done and extra information to correctly bill it.
Since there are a lot of these numbers, hospitals want to categorize these numbers so they can easily search all numbers related to each other. These categories can be different for each hospital. We want to allow hospitals to add a category to a tree node. This will allow them for example to categorize all numbers under chapter 1, section 4, paragraph 3, ... as blood related.
This is easily done, but as long as these categories are not present in the documents representing an actual treatment, users will not be able to search them. We are looking for a way to avoid this though, since these categories are subject to change. A hospital may decide to remove categories, add new ones or replace existing ones. We want to avoid to have to synchronize all documents when that happens.
Do you have any suggestions/ideas how we could store this in Raven without saving the category in the treatment document?