Design Your Own Business Level Services on Top of HDR
HDR supports a wide variety of applications, from message processing to patient admissions GUIs. It is therefore necessarily generic. For applications that are more specific, we recommend that you develop your own interfaces that encapsulate the business logic of your application. In doing so, you should consider the following:
- HL7's RIM Objects (and by extension HDR's objects) are very generic and may provide fields and cardinalities that are of no relevance to your application. In such cases, defining your own simplified versions of RIM Objects may significantly reduce the complexity and increase the usability of your API.
- Be careful of API granularity. If it is too fine-grained, it may require your code to make an excessive number of calls, eroding performance; if it is too coarse, it may be difficult to build on.
- Use stateless rather than stateful designs. Stateless designs (where all necessary information is supplied to a service) are typically more scalable than stateful designs.