fastrivertech / tiger

Crouching Tiger
https://github.com/fastrivertech/tiger
0 stars 1 forks source link

Redesign and Reimplement ResourceMapper #4

Open orchardhillsdragon opened 5 years ago

orchardhillsdragon commented 5 years ago

Redesign ResourceMapper, PatientResouceMapper and BaseMapper 1) from hapiPatient to frtPatient 2) from frtPatient to hapiPatient 3) BaseMapper shall only include generic function

orchardhillsdragon commented 5 years ago

HAPI FHIR parser cannot parser or encode elements alone, it has to be included a resource. Three options 1) Write our own FHIR parser 2) Check out HAPI FHIR parser to extend it 3) Build a wrapper on the HAPI FHIR parser by adding resource type header before parsing it and removing resource type header after encoding it.

The 3rd option is most cost-effective: 1) easier logic 2) less codes 3) easier to be extended or replaced by alternative later. 4) easier to maintain

Refer com.frt.fhir.parser.ResourceParser.java

Define mapping descriptor, refer to fhir-mapping.xml. The mapping descriptor 1) reduce mapping complexity 2) easier to implement and extend 3) easier to maintain