The key areas to be visited as part of the Refactoring are:
1. Introduce business objects for the SMART datatypes
2. Encapsulate the translation from OpenMRS business objects for the SMART datatypes to RDF in a separate layer
3. Make sure we understand how Record are composed of DataTypes
4. Make sure we understand how we solve the terminology problem
Some more context from Darius:
"The biggest thing we'd like to do is introduce java classes to
represent each SMART Record Type, and have the conversion to RDF
happen based on those.
So the code would looks more like:
List<SmartProblem> problemList = getAllForPatient(patient, SmartProblem.class);
RDF resource = convertToRdf(problemList);
Two reasons for this:
1. explicitly show how we're mapping our domain objects to SMART
model, decoupled from the details of RDF.
2. allows future work so an installation that doesn't use the problem
list table, but rather uses "problem added" and "problem removed"
observations (e.g. most implementations that started using OpenMRS
pre-1.7) can override the logic that fetches all problems.