Module: AllscriptsApi::Documents::DocumentMethods
- Included in:
- Client
- Defined in:
- lib/allscripts_api/documents/document_methods.rb
Overview
A collection of named convenience methods that map to Allscripts magic actions related to documents. These methods are included in Client and can be accessed from instances of that class.
Instance Method Summary collapse
-
#get_ccda(patient_id, encounter_id, org_id = nil, app_group = nil, referral_text = nil, site_id = nil, document_type = "CCDACCD") ⇒ String, AllscriptsApi::MagicError
gets the CCDA documents for the specified patient and encounter.
-
#save_document_image(patient_id, document_params, document_buffer = nil, base_64_data = nil) ⇒ Hash, MagicError
rubocop:disable LineLength a wrapper around SaveDocumentImage, which saves pdfs to Allscripts.
Instance Method Details
#get_ccda(patient_id, encounter_id, org_id = nil, app_group = nil, referral_text = nil, site_id = nil, document_type = "CCDACCD") ⇒ String, AllscriptsApi::MagicError
gets the CCDA documents for the specified patient and encounter
uses the organization for the specified user CCDACCD (Default) - Returns the Continuity of Care Document. This is the default behavior if nothing is passed in. CCDASOC - Returns the Summary of Care Document CCDACS - Returns the Clinical Summary Document (Visit Summary).
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/allscripts_api/documents/document_methods.rb', line 48 def get_ccda(patient_id, encounter_id, org_id = nil, app_group = nil, referral_text = nil, site_id = nil, document_type = "CCDACCD") params = MagicParams.format( user_id: @allscripts_username, patient_id: patient_id, parameter1: encounter_id, parameter2: org_id, parameter3: app_group, parameter4: referral_text, parameter5: site_id, parameter6: document_type ) results = magic("GetCCDA", magic_params: params) results["getccdainfo"][0]["ccdaxml"] end |
#save_document_image(patient_id, document_params, document_buffer = nil, base_64_data = nil) ⇒ Hash, MagicError
rubocop:disable LineLength a wrapper around SaveDocumentImage, which saves pdfs to Allscripts
rubocop:Enable LineLength
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/allscripts_api/documents/document_methods.rb', line 19 def save_document_image(patient_id, document_params, document_buffer = nil, base_64_data = nil) params = MagicParams.format( user_id: @allscripts_username, patient_id: patient_id, parameter1: document_params, parameter6: base_64_data, data: document_buffer ) results = magic("SaveDocumentImage", magic_params: params) results["savedocumentimageinfo"] end |