crs4 / hl7apy

Python library to parse, create and handle HL7 v2 messages.
http://crs4.github.io/hl7apy/
MIT License
231 stars 92 forks source link

Cannot assign a BaseDatatype instance to a Field or a Component #12

Closed svituz closed 9 years ago

svituz commented 10 years ago

How to reproduce

Create a message and try to assign a BaseDatatype object to a Field or a Component using traversal. For example use this code:

m = Message('RSP_K21')
m.msh.msh_7.ts_1 = DTM(datetime.now())

What happens

A ChildNotValid exception is raised

What should happen

It should assign the object correctly