FhirResource
@ExperimentalPersonalHealthRecordApi
class FhirResource
A class to capture the FHIR resource data. This is the class used for all supported FHIR resource types, which is a subset of the resource list on the official FHIR website and might expand in the future.
FHIR stands for the Fast Healthcare Interoperability Resources.
This feature is dependent on the version of HealthConnect installed on the device. To check if it's available call HealthConnectFeatures.getFeatureStatus
and pass HealthConnectFeatures.FEATURE_PERSONAL_HEALTH_RECORD
as an argument. An UnsupportedOperationException
would be thrown if the feature is not available.
Summary
Constants |
|
---|---|
const Int |
FHIR resource type for AllergyIntolerance. |
const Int |
FHIR resource type for a FHIR Condition. |
const Int |
FHIR resource type for a FHIR Encounter. |
const Int |
FHIR resource type for Immunization. |
const Int |
FHIR resource type for a FHIR Location. |
const Int |
FHIR resource type for a FHIR Medication. |
const Int |
FHIR resource type for a FHIR MedicationRequest. |
const Int |
FHIR resource type for a FHIR MedicationStatement. |
const Int |
FHIR resource type for a FHIR Observation. |
const Int |
FHIR resource type for a FHIR Organization. |
const Int |
FHIR resource type for a FHIR Patient. |
const Int |
FHIR resource type for a FHIR Practitioner. |
const Int |
FHIR resource type for a FHIR PractitionerRole. |
const Int |
FHIR resource type for a FHIR Procedure. |
Public constructors |
---|
FhirResource(type: Int, id: String, data: String) |
Public properties |
|
---|---|
String |
The FHIR resource data in JSON representation. |
String |
The FHIR resource ID. |
Int |
The type of this FHIR resource. |
Constants
FHIR_RESOURCE_TYPE_ALLERGY_INTOLERANCE
const val FHIR_RESOURCE_TYPE_ALLERGY_INTOLERANCE = 2: Int
FHIR resource type for AllergyIntolerance.
FHIR_RESOURCE_TYPE_CONDITION
const val FHIR_RESOURCE_TYPE_CONDITION = 4: Int
FHIR resource type for a FHIR Condition.
FHIR_RESOURCE_TYPE_ENCOUNTER
const val FHIR_RESOURCE_TYPE_ENCOUNTER = 12: Int
FHIR resource type for a FHIR Encounter.
FHIR_RESOURCE_TYPE_IMMUNIZATION
const val FHIR_RESOURCE_TYPE_IMMUNIZATION = 1: Int
FHIR resource type for Immunization.
FHIR_RESOURCE_TYPE_LOCATION
const val FHIR_RESOURCE_TYPE_LOCATION = 13: Int
FHIR resource type for a FHIR Location.
FHIR_RESOURCE_TYPE_MEDICATION
const val FHIR_RESOURCE_TYPE_MEDICATION = 6: Int
FHIR resource type for a FHIR Medication.
FHIR_RESOURCE_TYPE_MEDICATION_REQUEST
const val FHIR_RESOURCE_TYPE_MEDICATION_REQUEST = 7: Int
FHIR resource type for a FHIR MedicationRequest.
FHIR_RESOURCE_TYPE_MEDICATION_STATEMENT
const val FHIR_RESOURCE_TYPE_MEDICATION_STATEMENT = 8: Int
FHIR resource type for a FHIR MedicationStatement.
FHIR_RESOURCE_TYPE_OBSERVATION
const val FHIR_RESOURCE_TYPE_OBSERVATION = 3: Int
FHIR resource type for a FHIR Observation.
FHIR_RESOURCE_TYPE_ORGANIZATION
const val FHIR_RESOURCE_TYPE_ORGANIZATION = 14: Int
FHIR resource type for a FHIR Organization.
FHIR_RESOURCE_TYPE_PATIENT
const val FHIR_RESOURCE_TYPE_PATIENT = 9: Int
FHIR resource type for a FHIR Patient.
FHIR_RESOURCE_TYPE_PRACTITIONER
const val FHIR_RESOURCE_TYPE_PRACTITIONER = 10: Int
FHIR resource type for a FHIR Practitioner.
FHIR_RESOURCE_TYPE_PRACTITIONER_ROLE
const val FHIR_RESOURCE_TYPE_PRACTITIONER_ROLE = 11: Int
FHIR resource type for a FHIR PractitionerRole.
FHIR_RESOURCE_TYPE_PROCEDURE
const val FHIR_RESOURCE_TYPE_PROCEDURE = 5: Int
FHIR resource type for a FHIR Procedure.
Public constructors
Public functions
Public properties
id
val id: String
The FHIR resource ID. This is extracted from the id
field in data
. More about FHIR resource ID in https://www.hl7.org/fhir/resource.html#id.
type
val type: Int
The type of this FHIR resource. This is extracted from the resourceType
field in data
. The list of supported types is a subset of the resource list on the official FHIR website and might expand in the future.