---
schema_version: "1"
id: 7a0ab0b8cc3c6224fefe135b75ab252a70413d648bab03c7cca4d3b109e361a5
title: MedicationAdministrationDtl
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/health_cloud_object_reference/hc_r4_objects_medicationadministrationdtl.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/hc_r4_objects_medicationadministrationdtl.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 92fc7c8fd85ed4fddd8bb555b832ba83b93bef348e21fc293be4e41110c303c2
description: Represents the details of an instance of medication administered to a patient. This object is available in API version 64.0 and later.
---
# MedicationAdministrationDtl

Represents the details of an instance of medication administered to a patient. This object is available in API version 64.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

## Fields

### DetailCodeId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: References a code set or code set bundle that adds information to a medication administration record. This field is a relationship field.
- **Relationship Name**: DetailCode
- **Refers To**: CodeSet

### DetailRecordId

- **Type**: reference
- **Properties**: Create, Filter, Group, Sort, Update
- **Description**: References a record that adds information to a medication administration record. This field is a polymorphic relationship field.
- **Relationship Name**: DetailRecord
- **Refers To**: Account, CareObservation, CarePlan, DiagnosticSummary, HealthCondition, HealthcareProvider, MedicationAdministration, MedicationDispense, MedicationRequest, MedicationStatement, PatientMedicalProcedure

### DetailType

- **Type**: picklist
- **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update
- **Description**: Specifies the relation between the medication administration and the medication administration detail record.
- **Possible values**:
    - BasedOn
    - PartOf
    - PerformerDetail
    - ReasonReference

### LastReferencedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The timestamp for when the current user last viewed a record related to this record.

### LastViewedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The timestamp for when the current user last viewed this record. If this value is null, it’s possible that this record was referenced (LastReferencedDate) and not viewed.

### MedicationAdministrationId

- **Type**: reference
- **Properties**: Create, Filter, Group, Sort
- **Description**: The medication administration associated with the medication administration detail. This field is a relationship field.
- **Relationship Name**: MedicationAdministration
- **Relationship Type**: Master-detail
- **Refers To**: MedicationAdministration (the master object)

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[MedicationAdministrationDtlChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/sforce_api_associated_objects_change_event.htm "A StandardObjectNameChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.")

Change events are available for the object.

[MedicationAdministrationDtlHistory](https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.