Module: AllscriptsApi::Demographics::DemographicsMethods
- Included in:
- Client
- Defined in:
- lib/allscripts_api/demographics/demographics_methods.rb
Overview
A collection convenience methods for ordering that map to Allscripts magic actions related to demographics calls. These methods are included in Client and can be accessed from instances of that class.
Instance Method Summary collapse
-
#get_patient(patient_id, patient_number = nil) ⇒ String, AllscriptsApi::MagicError
gets patient’s demographic info, insurance, guarantor, and PCP info.
-
#get_patient_full(patient_id, mrn = nil, order_id = nil) ⇒ String, AllscriptsApi::MagicError
gets patient’s demographic info, insurance, guarantor, and PCP info Note that this method is litely to return blank data sets for invalid IDs rather than raising an error.
-
#search_patients(search_string) ⇒ Array<Hash>, ...
a wrapper around SearchPatients.
Instance Method Details
#get_patient(patient_id, patient_number = nil) ⇒ String, AllscriptsApi::MagicError
gets patient’s demographic info, insurance, guarantor, and PCP info
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/allscripts_api/demographics/demographics_methods.rb', line 31 def get_patient(patient_id, patient_number = nil) params = MagicParams.format( user_id: @allscripts_username, patient_id: patient_id, parameter1: patient_number ) results = magic("GetPatient", magic_params: params) results["getpatientinfo"] end |
#get_patient_full(patient_id, mrn = nil, order_id = nil) ⇒ String, AllscriptsApi::MagicError
gets patient’s demographic info, insurance, guarantor, and PCP info Note that this method is litely to return blank data sets for invalid IDs rather than raising an error
patient order
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/allscripts_api/demographics/demographics_methods.rb', line 51 def get_patient_full(patient_id, mrn = nil, order_id = nil) params = MagicParams.format( user_id: @allscripts_username, patient_id: patient_id, parameter1: mrn, parameter2: order_id ) results = magic("GetPatientFull", magic_params: params) results["getpatientfullinfo"] end |
#search_patients(search_string) ⇒ Array<Hash>, ...
a wrapper around SearchPatients
16 17 18 19 20 21 22 23 24 |
# File 'lib/allscripts_api/demographics/demographics_methods.rb', line 16 def search_patients(search_string) params = MagicParams.format( user_id: @allscripts_username, parameter1: search_string ) results = magic("SearchPatients", magic_params: params) results["searchpatientsinfo"] end |