Open JohnWMay opened 8 years ago
Hi @JohnWMay,
You shouldn't have to change anything to get the module to work--we've been using the source file in question for the past 10 months without issue. A few questions:
@JohnWMay , is this still an issue?
Hi.
I can’t follow up with this issue, to give you a definite answer, as I was re-assigned to other work back then.
John W. May 571-247-5669
From: Michael R. Bernstein [mailto:notifications@github.com] Sent: Sunday, July 03, 2016 2:38 AM To: amida-tech/blue-button-generate Cc: May, John (CACI); Mention Subject: [EXTERNAL] Re: [amida-tech/blue-button-generate] headerLevel.js module throws TypeError exceptions (#26)
@JohnWMayhttps://github.com/JohnWMay , is this still an issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/amida-tech/blue-button-generate/issues/26#issuecomment-230138397, or mute the threadhttps://github.com/notifications/unsubscribe/AFdGwC-bbeDdf0BSiGgbm012Gr4uZXGWks5qR1jlgaJpZM4H4Pfz.
Hmm. No commits to this repo since February. Is it still being maintained?
@webmaven we still maintain the repo, we just haven't done active development on it in a while.
When parsing a document the gender and marital status are code array consisting of code and display name where headerLevel.js:24 (and other's) look for a string. So while using supplied json will work because gender object is not complete but only a string(display name), normal ccd parsed json will not. From document parse { name: 'Female', code: 'F', code_system_name: 'HL7 AdministrativeGender' } Now, when only the gender json string (Female) is supplied the generator will format the xml correctly into required format. Probably best solution is to test the input to determine type.
@sjpadgett I'm not quite sure what you're saying. Are you saying that when code
is missing the parser will not work? I haven't worked on this repo in a while, but I believe that is expected behavior--the parser should value the code
as the source of truth, not the name
field.
What i'm saying is that when a xml document is parsed the resolved json gender is an array of { name: 'Female', code: 'F', code_system_name: 'HL7 AdministrativeGender' } as it should be however, if you take that same json from the parsed document and tried to generate a new document then the template routine at line 24 is looking for a string value not an object/array. Your json samples only supply a string for gender/marital status therefore it works no problem. So if you parse a document then edited json and tried to render that same document, it will fail.
Also, I have dumped the item value at that location and indeed it is an array of name,code,code_system
If anyone who is monitoring this repo has any tools that help populate the bb model for generating document such as empty json arrays or routines for doing so, I may be able to give something back to ya as I progress.
Thanks jsachs, I've seen them and have a pretty good working knowledge of all the tools but I'm at the point of populating patient data to create documents and was wondering how others handle this. Kudos on a very well done project and thanks for sharing.
There are some sample documents at http://developers.amida-tech.com/document_model.html. Is this what you're looking for?
The headerLevel.js module throws: .../node_modules/blue-button-generate/lib/headerLevel.js:24 return input.substring(0, 1); ^ TypeError: undefined is not a function
as well as on line 36.
I was able to generate the XML version by changing "input" to "input.code" on each of these lines: 24, and 36. Is this accurate? It worked.