Class: Mirah::Data::Appointment
- Inherits:
-
BaseObject
- Object
- BaseObject
- Mirah::Data::Appointment
- Defined in:
- lib/mirah/data/appointment.rb
Overview
Appointments represent a planned or past meeting between a patient and a practitioner. This is based on www.hl7.org/fhir/appointment.html As part of the integration flow, Mirah will work out whether this appointments needs an accompanying measurement encounter and automatically create one as appropriate. Mirah’s ETL will generally make a best effort to estimate where and what context the measurement should be taken. The more information (Episode of Care, Organization, etc) that you supply, the more likely it is to be correct. Note that as part of this processing, Mirah may immediately choose to create assessments and trigger communications with the patient or other participants, for example by text message or email. In order to keep adherence statistics up to date, Mirah also requires that updates on past appointments are sent, so that we can calculate whether e.g. the appointment was a no-show.
Instance Attribute Summary collapse
-
#encounter_id ⇒ string
readonly
The internal mirah id of the patient.
-
#end_date ⇒ Date
readonly
The appointment end date.
-
#external_id ⇒ string
readonly
The identifier provided by your system.
-
#external_organization_id ⇒ string
readonly
Your system identifier for the organization this appointment is with.
-
#external_patient_id ⇒ string
readonly
Your system identifier for the patient.
-
#external_practitioner_id ⇒ string
readonly
Your system identifier for the practitioner this appointment is with.
-
#id ⇒ string
readonly
The internal Mirah identifier.
-
#invitations ⇒ Array<Invitation>
readonly
An array of invitations for measurements associated with this appointment.
-
#minutes_duration ⇒ Integer
readonly
The legnth of this appointment in minutes.
-
#organization_id ⇒ string
readonly
The internal mirah id of the organization this appointment is with.
-
#patient_id ⇒ string
readonly
The internal mirah id of the patient.
-
#practitioner_id ⇒ string
readonly
The internal mirah id of the practitioner this appointment is with.
-
#start_date ⇒ Date
readonly
The appointment start date.
-
#status ⇒ string
readonly
The appointment status.
Instance Method Summary collapse
-
#measured? ⇒ Boolean
Whether this appointment has a Mirah measurement encounter associated with it.
Methods inherited from BaseObject
from_graphql_hash, #initialize, #to_graphql_hash
Constructor Details
This class inherits a constructor from Mirah::BaseObject
Instance Attribute Details
#encounter_id ⇒ string (readonly)
Returns The internal mirah id of the patient.
66 |
# File 'lib/mirah/data/appointment.rb', line 66 attribute :encounter_id, path: %w[measurementEncounter], target: 'id' |
#end_date ⇒ Date (readonly)
Returns The appointment end date.
30 |
# File 'lib/mirah/data/appointment.rb', line 30 attribute :end_date, serializer: Serializers::DateTimeSerializer.new |
#external_id ⇒ string (readonly)
Returns The identifier provided by your system.
22 |
# File 'lib/mirah/data/appointment.rb', line 22 attribute :external_id |
#external_organization_id ⇒ string (readonly)
Returns Your system identifier for the organization this appointment is with.
62 |
# File 'lib/mirah/data/appointment.rb', line 62 attribute :external_organization_id, path: %w[organization], target: 'externalId' |
#external_patient_id ⇒ string (readonly)
Returns Your system identifier for the patient.
46 |
# File 'lib/mirah/data/appointment.rb', line 46 attribute :external_patient_id, path: %w[patient], target: 'externalId' |
#external_practitioner_id ⇒ string (readonly)
Returns Your system identifier for the practitioner this appointment is with.
54 |
# File 'lib/mirah/data/appointment.rb', line 54 attribute :external_practitioner_id, path: %w[practitioner], target: 'externalId' |
#id ⇒ string (readonly)
Returns The internal Mirah identifier.
18 |
# File 'lib/mirah/data/appointment.rb', line 18 attribute :id |
#invitations ⇒ Array<Invitation> (readonly)
Returns An array of invitations for measurements associated with this appointment.
70 71 |
# File 'lib/mirah/data/appointment.rb', line 70 attribute :invitations, path: %w[measurementEncounter], target: 'measurementInvitations', serializer: Serializers::NestedObjectSerializer.new(Invitation) |
#minutes_duration ⇒ Integer (readonly)
Returns The legnth of this appointment in minutes.
34 |
# File 'lib/mirah/data/appointment.rb', line 34 attribute :minutes_duration |
#organization_id ⇒ string (readonly)
Returns The internal mirah id of the organization this appointment is with.
58 |
# File 'lib/mirah/data/appointment.rb', line 58 attribute :organization_id, path: %w[organization], target: 'id' |
#patient_id ⇒ string (readonly)
Returns The internal mirah id of the patient.
42 |
# File 'lib/mirah/data/appointment.rb', line 42 attribute :patient_id, path: %w[patient], target: 'id' |
#practitioner_id ⇒ string (readonly)
Returns The internal mirah id of the practitioner this appointment is with.
50 |
# File 'lib/mirah/data/appointment.rb', line 50 attribute :practitioner_id, path: %w[practitioner], target: 'id' |
#start_date ⇒ Date (readonly)
Returns The appointment start date.
26 |
# File 'lib/mirah/data/appointment.rb', line 26 attribute :start_date, serializer: Serializers::DateTimeSerializer.new |
#status ⇒ string (readonly)
Returns The appointment status.
38 |
# File 'lib/mirah/data/appointment.rb', line 38 attribute :status |
Instance Method Details
#measured? ⇒ Boolean
Whether this appointment has a Mirah measurement encounter associated with it.
74 75 76 |
# File 'lib/mirah/data/appointment.rb', line 74 def measured? !!encounter_id end |