The CodedConcept __init() assigns the value to a LongCodeValue tag if it is >16 characters, and the value() method also supports retrieving the value from either CodeValue, LongCodeValue, or URNCodeValue. But the from_dataset() classmethod raises an attribute error if the passed in dataset does not have the CodeValue tag. coding.py line 129
Is there a way to handle LongCodeNames in this method? The exception doesn't occur when we create the actual CodedConcept, but it does when the concept is embedded in the dataset passed into hd.sr.EnhancedSR() which calls the from_dataset() method.
Hi @wryan-itk thanks for reporting this. It's just a simple oversight, we should allow code values in any one of these attributes. I'll do a fix in the next few days
The CodedConcept
__init()
assigns the value to a LongCodeValue tag if it is >16 characters, and thevalue()
method also supports retrieving the value from either CodeValue, LongCodeValue, or URNCodeValue. But thefrom_dataset()
classmethod raises an attribute error if the passed in dataset does not have the CodeValue tag.coding.py line 129
Is there a way to handle LongCodeNames in this method? The exception doesn't occur when we create the actual CodedConcept, but it does when the concept is embedded in the dataset passed into hd.sr.EnhancedSR() which calls the
from_dataset()
method.