amida-tech / cda-fhir

CDA to FHIR converter
Apache License 2.0
12 stars 5 forks source link

FamilyMemberHistory.gender, .bornDate should not depend on sdtc:id #25

Closed austundag closed 8 years ago

austundag commented 8 years ago

In CCDA spec administrativeGenderCode and birthTime does not depend on stdc:id and definitely not to example OID 2.16.840.1.113883.19.5.99999.2. Not sure we have the following code. Due to this code when stdc:id is not there gender and bornDate is not populated

this['sdtc:id'] = function (node) {
    if (node.attributes.root === '2.16.840.1.113883.19.5.99999.2') {
        this._self = {
            administrativeGenderCode: function (node) {
                familyMemberHistory.gender = recodeGender(node.attributes.code);
            },
            birthTime: function (node) {
                familyMemberHistory.bornDate = dateFix(node.attributes.value);
            }
        };
        this._self.prototype = proto;