-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mhv 63375 ccd generate and download (#19059)
* MHV-42363 Initial cut at radiology imaging * MHV-42363 More work on imaging * MHV-42363 Imaging work mostly complete * MHV-42363 Capture headers for DICOM * MHV-42363 Refactored controller * MHV-42363 Added spec tests for new client functions * MHV-42363 BBInternal now expects ICN * MHV-42363 Fixed header pass-through * MHV-42363 Fixed data for broken spec test * MHV-42363 Removed "new_episodes" * MHV-63375: generate and download ccd work done * MHV-63375: Shortened comment * MHV-63375: Added new routes and moved controller --------- Co-authored-by: Mike Moyer <michael.moyer@va.gov> Co-authored-by: Mike Moyer <87040148+mmoyer-va@users.noreply.github.com> Co-authored-by: Matthew Wright <matwright2010@gmail.com>
- Loading branch information
1 parent
048a7a3
commit f401602
Showing
6 changed files
with
527 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
modules/my_health/app/controllers/my_health/v1/medical_records/ccd_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module MyHealth | ||
module V1 | ||
module MedicalRecords | ||
class CcdController < MrController | ||
# Generates a CCD | ||
# @return [Array] of objects with CCDs generated date and status (COMPLETE or not) | ||
def generate | ||
resource = bb_client.get_generate_ccd(@current_user.icn, @current_user.last_name) | ||
render json: resource.to_json | ||
end | ||
|
||
# Downloads the CCD once it has been generated | ||
# @param generated_datetime [String] date receieved from get_generate_ccd call property dateGenerated | ||
# @return [XML] Continuity of Care Document | ||
def download | ||
resource = bb_client.get_download_ccd(generated_datetime) | ||
send_data resource, type: 'application/xml' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.