Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

In Document Author section the assigned person and representedOrganization is not handled #172

Open
waqaslatif88 opened this issue Mar 2, 2017 · 0 comments

Comments

@waqaslatif88
Copy link

waqaslatif88 commented Mar 2, 2017

In Document Author section the assigned person and representedOrganization is not handled properly my code is getting crash in case where i have below data in author.

<author typeCode="AUT" contextControlCode="OP"> <time value="20170301045443.991-0500"/> <assignedAuthor classCode="ASSIGNED"> <id nullFlavor="NI"/> <addr nullFlavor="UNK"/> <telecom nullFlavor="UNK"/> <assignedPerson> <name>Auto Generated</name> </assignedPerson> <representedOrganization> <name>ABCD</name> <telecom nullFlavor="UNK"/> <addr nullFlavor="UNK"/> </representedOrganization> </assignedAuthor> </author>

the code for handling this :

` var name_dict = parseName(el);

// Sometimes C32s include names that are just like String
// and we still want to get something out in that case
if (!name_dict.prefix && !name_dict.given && !name_dict.given.length && !name_dict.family) {
name_dict.family = el.val();
}`
It is breaking at if condition

kindly suggest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant