aehrc / pathling

Tools that make it easier to use FHIR® and clinical terminology within data analytics, built on Apache Spark.
https://pathling.csiro.au
Apache License 2.0
91 stars 12 forks source link

Collections are not supported for custom encoders #375

Open piotrszul opened 3 years ago

piotrszul commented 3 years ago

Currently custom encoded types (i.e. decimal and IdType) are not supported for fields with cardinality greater than one. Attempts to encode/decode such type produce an exception "Collections are not supported for custom encoders".

Some of these include:

  "Parameters",
  // Collections are not supported for custom encoders for: condition-> RuntimeIdDatatypeDefinition[id, IdType]
  "Task",
  // Collections are not supported for custom encoders for: condition-> RuntimeIdDatatypeDefinition[id, IdType]
  "StructureDefinition",
  // Collections are not supported for custom encoders for: condition-> RuntimeIdDatatypeDefinition[id, IdType]
  "MolecularSequence",
  // Collections are not supported for custom encoders for: precision-> RuntimePrimitiveDatatypeDefinition[decimal, DecimalType]
  "StructureMap",
  // Collections are not supported for custom encoders for: condition-> RuntimeIdDatatypeDefinition[id, IdType]
  "PlanDefinition"
  // Collections are not supported for custom encoders for: goalId-> RuntimeIdDatatypeDefinition[id, IdType]
johngrimes commented 2 years ago

I think that the fact that we properly report an error in this case means that we can change this to a new feature.