Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wth - (SPARC/Epic) Interface Change to Send RMID Over #168

Merged
merged 1 commit into from
Mar 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/epic_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def full_study_message(study)
emit_cofc(xml, study)
emit_visits(xml, study)
emit_procedures_and_encounters(xml, study)
emit_rmid(xml, study)
}
}

Expand All @@ -207,6 +208,7 @@ def study_creation_message(study)
emit_study_type(xml, study)
emit_ide_number(xml, study)
emit_cofc(xml, study)
emit_rmid(xml, study)

}
}
Expand Down Expand Up @@ -311,6 +313,19 @@ def emit_study_type(xml, study)
end
end

def emit_rmid(xml, study)
rmid = study.research_master_id

if rmid
xml.subjectOf(typeCode: 'SUBJ') {
xml.studyCharacteristic(classCode: 'OBS', moodCode: 'EVN') {
xml.code(code: 'RGFT3')
xml.value(value: rmid)
}
}
end
end

def emit_ide_number(xml, study)
inv_device_number = study.investigational_products_info.try(:inv_device_number)

Expand Down