#70 Allow CustomModelClassFactories to extend the eventmap

closed
None
5
2012-09-21
2012-09-21
No

CustomModelClassFactories may need to add to or overwrite (parts of) the original eventmap (ca/uhn/hl7v2/parser/eventmap/<version>.properties).

Example: IHE PDQ introduces the event QBP^ZV1 using the QBP_Q21 structure of HL7 v2.5, so this mapping needs to be added to a custom event map. The map file name must be ca/uhn/hl7v2/parser/eventmap/2.5.properties because this is hardcoded in Parser#loadMessageStructures. So, there may be several eventmaps with the same name in the classpath and the probably the wrong one is used.

Proposal: Make Parser#getMessageStructures non-static and get the eventmap resource name from the instances ModelClassFactory (defaults to ca/uhn/hl7v2/parser/eventmap/<version>.properties if the structure can't be found).

Discussion

  • Christian Ohr

    Christian Ohr - 2012-09-21
    • status: open --> closed
     
  • Christian Ohr

    Christian Ohr - 2012-09-21

    implemented as proposed.
    Slight backwards incompatibility (Parser.getMessageStructure not static anymore)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks