pathling icon indicating copy to clipboard operation
pathling copied to clipboard

Move the implementation of custom encoders for Codings and Quantities to the encoders module.

Open piotrszul opened this issue 2 years ago • 0 comments

We have currently classes such as CodingEncoder and QuantityEncoder that implement encoding of certain Fhir types (such as Codings or Quantities) to and from Row instances. These encoders have are independent from the SQL encoders but have to hardcode all the additional fields that are produced by the SQL encoders, which complicates code maintenance. Also these encoders are not part of the encoders module, which further complicates code maintenance.

As part of this change these encoders should be placed closer to the encoders module. Minimally the FhirEncoders should provide an interface that encapsulates encode/decode/datatype operations (possibly with the current implementation) for these types. Ideally we should be able to use the builders/converters in encoders to provide the implementation. This could be considered jointly with #842 as the plug-able extensions may provide a way to add synthetic fields for these encoders.

piotrszul avatar Sep 13 '22 17:09 piotrszul