This case-sensitive code system http://terminology.hl7.org/CodeSystem/medication-statement-category defines the following codes:
Code
Display
Definition
inpatient
Inpatient
Includes orders for medications to be administered or consumed in an inpatient or acute care setting
outpatient
Outpatient
Includes orders for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)
community
Community
Includes orders for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.).
patientspecified
Patient Specified
Includes statements about medication use, including over the counter medication, provided by the patient, agent or another provider