Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.0.1",
"info": {
"title": "Medication prescriptions",
"description": "<h4>Intended use</h4>The intended use of this API is to retrieve all prescriptions for the given patient. The result can be filtered by using a time interval. <br></br>The intended use for reading data with this API is in first hand that the API is applied for direct access and should not be used to transfer data between caregivers. If it should be used for \"data copying\" between care providers, patient consent must be handled outside the API.\n<h4>Specific Rules and Limitations</h4>The consumer of the API is responsible for making sure data retrieved is filtered in compliance with laws and regulations prior to presenting it to any end-users.<br></br>The parameters AccessZones represent the PDL Care Unit (Vårdenhet) and CareProvider represents PDL Care provider (Vårdgivare) and can be used to evaluate PDL.\n <h4>Versions</h4>\n<table style=\"width:100%\">\n <tr>\n <th>COS version</th>\n <th>API version</th>\n <th>Required Cosmic version</th>\n <th>Date</th>\n <th>Description</th>\n </tr>\n <tr>\n <td>3.0.0</td>\n <td>2.0.0</td>\n <td>R8.3.05</td>\n <td>Mar 2022</td>\n <td>Updated major version due to performance impovements</td>\n </tr>\n</table>\n<h4>Message description</h4>The query result is a list of prescriptions.</br> PrescriptionEHRExtract.accessZoneUnit should be used as the PDL care unit and PrescriptionEHRExtract.headCareProviderUnit should be used as the PDL care provider.",
"version": "v2"
},
"servers": [
{
"url": "https://api.openservices.cambio.se/api/open/medications"
}
],
"paths": {
"/": {
"get": {
"operationId": "getPrescriptionInfo-v2",
"summary": "Get all prescriptions",
"description": "Get all prescriptions for the given patient. The result can be filtered by using a time interval. \n<p>\nOAuth <code>scope</code> for access : <code>user/Medication.read</code> or <code>patient/Medication.read</code>",
"responses": {
"200": {
"description": "Request succeeded for the given patient.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PrescriptionEHRExtractsArray"
}
}
}
}
},
"parameters": [
{
"name": "fromDateTime",
"in": "query",
"description": "Time interval start, using date format: 1970-01-01T01:00:00",
"schema": {
"type": "string"
}
},
{
"name": "toDateTime",
"in": "query",
"description": "Time interval end, using date format: 1970-01-01T01:00:00",
"schema": {
"type": "string"
}
},
{
"name": "patient",
"in": "header",
"description": "Patient's identifier/Personnumber",
"schema": {
"type": "string"
},
"required": true
}
]
}
}
},
"components": {
"securitySchemes": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "subscription-key",
"in": "query"
}
},
"schemas": {
"PrescriptionEHRExtracts": {
"title": "PrescriptionEHRExtracts",
"description": "List of PrescriptionEHRExtracts",
"type": "object",
"properties": {
"prescriptionEHRExtract": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PrescriptionEHRExtract"
}
}
}
},
"PrescriptionEHRExtract": {
"title": "PrescriptionEHRExtract",
"description": "Object that holds a prescription and related/referencing other data models",
"type": "object",
"properties": {
"ehrId": {
"$ref": "#/components/schemas/II"
},
"ehrSystem": {
"$ref": "#/components/schemas/II"
},
"timeCreated": {
"$ref": "#/components/schemas/TS"
},
"prescription": {
"$ref": "#/components/schemas/Prescription"
},
"patient": {
"$ref": "#/components/schemas/Patient"
},
"units": {
"$ref": "#/components/schemas/Units"
},
"creationUnit": {
"$ref": "#/components/schemas/Unit"
},
"responsibleUnit": {
"$ref": "#/components/schemas/Unit"
},
"accessZoneUnit": {
"allOf": [
{
"$ref": "#/components/schemas/Unit"
}
],
"description": "PDL care unit"
},
"headCareProviderUnit": {
"allOf": [
{
"$ref": "#/components/schemas/Unit"
}
],
"description": "PDL care provider"
},
"careProviders": {
"$ref": "#/components/schemas/PICareProviders"
},
"hCMContact": {
"$ref": "#/components/schemas/Contact"
}
}
},
"Prescription": {
"title": "Prescription",
"description": "The data model which represents a prescription of a patient",
"type": "object",
"properties": {
"rcId": {
"allOf": [
{
"$ref": "#/components/schemas/II"
}
],
"description": "Business identifier of the Prescription"
},
"accordingToSchedule": {
"type": "boolean",
"description": "If the prescription has more than two doses, or unstructured doses"
},
"actualTerminateDate": {
"allOf": [
{
"$ref": "#/components/schemas/TS"
}
],
"description": "Prescription end date"
},
"replacedByLatest": {
"type": "boolean",
"description": "When editing a prescription and when there can be overlapping prescriptions then this flag is used to mention that"
},
"prescriptionVersionDateTime": {
"allOf": [
{
"$ref": "#/components/schemas/TS"
}
],
"description": "The prescription last updated time"
},
"prescriptionPatientInstruction": {
"type": "string",
"description": "If any instructions for the patient"
},
"prescriptionCaregiverInstruction": {
"type": "string",
"description": "If any instructions for the care giver"
},
"extendedMedicationMiningData": {
"type": "array",
"items": {
"type": "string"
}
},
"prescriptionReason": {
"type": "string",
"description": "The reason 'code' for prescribing the prescription(which comes from the SIL)"
},
"prescriptionReasonText": {
"type": "string",
"description": "The reason 'description' for prescribing the prescription(which comes from the SIL)"
},
"treatmentGoal": {
"type": "string",
"description": "The goal of the prescription. What is expected by prescribing the drug"
},
"treatmentIntent": {
"type": "string",
"description": "Intent of the treatment"
},
"prescriptionType": {
"type": "string",
"description": "Types of medication",
"example": "pills and misc/ injection/ infusion/ inhalation/ transfusion/ enteral nutrition"
},
"medicationType": {
"type": "string",
"description": "Types of medication- pills and misc/ injection/ infusion/ inhalation/ transfusion/ enteral nutrition."
},
"routeDetail": {
"allOf": [
{
"$ref": "#/components/schemas/RouteDetail"
}
],
"description": "How the medication is administered",
"example": "Oral,Inhale"
},
"medicationTreatmentId": {
"allOf": [
{
"$ref": "#/components/schemas/II"
}
],
"description": "COSMIC internal medication treatment id"
},
"medicationTreatmentStatusDetail": {
"$ref": "#/components/schemas/MedicationTreatmentStatusDetail"
},
"mainProductTreatment": {
"$ref": "#/components/schemas/ProductInformation"
},
"medicationActive": {
"type": "boolean",
"description": "Whether the medication is active or not"
},
"followUpDateTime": {
"allOf": [
{
"$ref": "#/components/schemas/TS"
}
],
"description": "A follow-up appointment required on this date"
},
"prescriptionCancelComment": {
"type": "string",
"description": "The comment when cancelling the prescription(If the prescription is cancelled)"
},
"prescriptionStartDateTime": {
"allOf": [
{
"$ref": "#/components/schemas/TS"
}
],
"description": "The prescription start date time"
},
"prescriptionEndDateTime": {
"allOf": [
{
"$ref": "#/components/schemas/TS"
}
],
"description": "The prescription end date time"
},
"prescriptionDosages": {
"$ref": "#/components/schemas/PrescriptionDosage"
},
"medicationChoice": {
"$ref": "#/components/schemas/CD"
},
"prescriptionDetails": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PrescriptionDetail"
}
},
"prescriptionDrugExtemporeDescription": {
"type": "string"
},
"medicationPurpose": {
"type": "string",
"description": "The purpose 'code' of the prescription"
},
"medicationPurposeText": {
"type": "string",
"description": "The purpose 'description' of the prescription"
},
"medicationIndication": {
"type": "string",
"description": "The reason 'code' for the Choosing the Medication"
},
"medicationIndicationText": {
"type": "string",
"description": "The reason 'description' for the Choosing the Medication"
},
"medicationTarget": {
"type": "string",
"description": "From where are referring this"
},
"medicationTargetText": {
"type": "string"
},
"medicationAdministrationMethod": {
"type": "string",
"description": "The way the medication should be administered",
"example": "Oral"
},
"mixingInstruction": {
"type": "string",
"description": "Instructions for mixing the medication(when applicable)"
},
"mixtures": {
"$ref": "#/components/schemas/MixturesType"
}
}
},
"RouteDetail": {
"title": "RouteDetail",
"description": "Data model for keeping the information related to the way medication should be administered",
"type": "object",
"properties": {
"byWith": {
"type": "string",
"description": "The instrument/device by which the drug is administered"
},
"location": {
"type": "string",
"description": "The location at which the drug is administered"
},
"routeCode": {
"type": "string",
"description": "The code for representing the route"
},
"name": {
"type": "string",
"description": "The description/name of the route"
},
"abbreviation": {
"type": "string"
},
"routeLicensed": {
"type": "boolean",
"description": "The routes that a given drug is approved to be used by"
}
}
},
"MedicationTreatmentStatusDetail": {
"title": "MedicationTreatmentStatusDetail",
"description": "The information model for representing medication treatment status",
"type": "object",
"properties": {
"treatmentStatus": {
"type": "string",
"enum": [
"ACTIVE",
"PAUSED",
"ENDED",
"DISCONTINUED",
"UNPLANNED",
"DELETED",
"PLANNED",
"INVALIDATED",
"FUTURE_PAUSED",
"FUTURE_PLANNED",
"FUTURE_DISCONTINUED",
"FUTURE_REACTIVATED",
"UNPLANED_FUTURE_DISCONTINUED"
]
},
"effectiveDateTime": {
"allOf": [
{
"$ref": "#/components/schemas/TS"
}
],
"description": "The timestamp which the status is effective from"
}
}
},
"ProductInformation": {
"title": "ProductInformation",
"description": "The data model for representing the product/drug which is prescribed as a part of the prescription",
"type": "object",
"properties": {
"prescriptionProductTradeName": {
"type": "string",
"description": "Trade name of the drug/product"
},
"prescriptionProductDrugFormTextSv": {
"type": "string",
"description": "The full text description of the drug/product form",
"example": "tablet"
},
"prescriptionProductNplID": {
"allOf": [
{
"$ref": "#/components/schemas/II"
}
],
"description": "Business identifier of the drug/product"
},
"prescriptionProductAtcCode": {
"allOf": [
{
"$ref": "#/components/schemas/CD"
}
],
"description": "The ATC code of the drug/product when it is applicable"
},
"prescriptionProductStrengthNumeric": {
"type": "string",
"description": "The strength of the drug/product"
},
"prescriptionProductStrengthNumericUnit": {
"type": "string",
"description": "The strength unit/Unit of measure"
},
"mainSubstance": {
"type": "string",
"description": "Main substance of the drug/product"
}
}
},
"PrescriptionDosage": {
"title": "PrescriptionDosage",
"description": "The data model for representing a drug dosage",
"type": "object",
"properties": {
"whenNeeded": {
"type": "boolean",
"description": "the value will be 'true' if the drug has to be taken only when needed"
},
"dosagePlugin": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DosagePlugin"
}
}
}
},
"PrescriptionDetail": {
"title": "PrescriptionDetail",
"description": "A data model for agregating Drug/Product and mixing details",
"type": "object",
"properties": {
"productInformation": {
"$ref": "#/components/schemas/ProductInformation"
},
"mixingDetail": {
"$ref": "#/components/schemas/MixingDetail"
},
"type": {
"type": "string",
"enum": [
"Main",
"Additive",
"Diluent"
]
}
}
},
"MixingDetail": {
"title": "MixingDetail",
"description": "A data model for representing information related to the way drugs should be mixed",
"type": "object",
"properties": {
"amount": {
"type": "number",
"example": "25"
},
"amountUnit": {
"type": "string",
"example": "ml"
},
"concentrationValue": {
"type": "number",
"description": "Numeric magnitude of the Final Concentration"
},
"finalConcentrationText": {
"type": "string",
"description": "The additive/dilute concentration text"
}
}
},
"MixturesType": {
"title": "MixturesType",
"type": "object",
"properties": {
"mixture": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MixtureType"
}
}
}
},
"MixtureType": {
"title": "MixtureType",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"name": {
"type": "string",
"description": "Dilueted / mixed product name"
},
"strength": {
"type": "string",
"description": "Strength of the diluted product or mixed product"
},
"amount": {
"type": "string"
},
"text": {
"type": "string"
}
}
},
"DosagePlugin": {
"title": "DosagePlugin",
"description": "Information related to COSMIC drug dosage plugin",
"type": "object",
"properties": {
"dripDosage": {
"$ref": "#/components/schemas/DripDosageType"
},
"multiDosage": {
"$ref": "#/components/schemas/MultiDosageType"
},
"freeTextDosage": {
"$ref": "#/components/schemas/FreeTextDosageType"
},
"normalDosage": {
"$ref": "#/components/schemas/NormalDosageType"
},
"occasionDosage": {
"$ref": "#/components/schemas/OccasionDosageType"
},
"onceDosage": {
"$ref": "#/components/schemas/OnceDosageType"
},
"periodicDosage": {
"$ref": "#/components/schemas/PeriodicDosageType"
},
"weeklyDosage": {
"$ref": "#/components/schemas/WeeklyDosageType"
},
"iX3Dosage": {
"$ref": "#/components/schemas/IX3DosageType"
}
}
},
"DripDosageType": {
"title": "DripDosageType",
"description": "The data model for re-presenting the drip dosages",
"type": "object",
"properties": {
"amount": {
"$ref": "#/components/schemas/DDAmount"
},
"volume": {
"$ref": "#/components/schemas/DDVolume"
},
"concentration": {
"$ref": "#/components/schemas/DDConcentration"
},
"duration": {
"$ref": "#/components/schemas/DDDuration"
},
"iteration": {
"$ref": "#/components/schemas/DDIteration"
},
"speeds": {
"$ref": "#/components/schemas/Speeds"
},
"dosageText": {
"type": "string",
"description": "The textual presentation of the drip dosage"
}
}
},
"DDAmount": {
"title": "DDAmount",
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "Amount"
},
"unit": {
"type": "string",
"description": "Unit of measure"
}
}
},
"DDVolume": {
"title": "DDVolume",
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "Volume"
},
"unit": {
"type": "string",
"description": "Unit of measure"
}
}
},
"DDConcentration": {
"title": "DDConcentration",
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "Concentration"
},
"unit": {
"type": "string",
"description": "Unit of measure"
}
}
},
"DDDuration": {
"title": "DDDuration",
"description": "Drip dosage duration",
"type": "object",
"properties": {
"value": {
"type": "integer",
"description": "Drip dosage duration"
},
"timeUnit": {
"$ref": "#/components/schemas/DoseTimeUnitType"
}
}
},
"DDIteration": {
"title": "DDIteration",
"description": "Drug dosage interaction",
"type": "object",
"properties": {
"dailyReoccurence": {
"$ref": "#/components/schemas/DailyReoccurence"
},
"specifiedTimes": {
"$ref": "#/components/schemas/SpecifiedTimes"
},
"timesADay": {
"$ref": "#/components/schemas/TimesADay"
},
"continuous": {
"type": "string"
}
}
},
"DailyReoccurence": {
"title": "DailyReoccurence",
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "int32",
"description": "Amount"
}
}
},
"SpecifiedTimes": {
"title": "SpecifiedTimes",
"description": "The specified time of the dosage",
"type": "object",
"properties": {
"time": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"TimesADay": {
"title": "TimesADay",
"description": "Data model for re-presenting the dose information 'how many times a day'",
"type": "object",
"properties": {
"startTime": {
"type": "string",
"description": "The dosage start time"
},
"amount": {
"type": "integer",
"format": "int32",
"description": "How many times a day"
}
}
},
"Speeds": {
"title": "Speeds",
"description": "a data model used in drip dosages to specify different speeds of a drip",
"type": "object",
"properties": {
"speed": {
"type": "number",
"description": "Drip speed"
},
"minSpeed": {
"type": "number",
"description": "Minimum drip speed"
},
"maxSpeed": {
"type": "number",
"description": "Maximum drip speed"
},
"amountUnit": {
"type": "string",
"description": "Unit of measure"
},
"timeUnit": {
"$ref": "#/components/schemas/DoseTimeUnitType"
}
}
},
"MultiDosageType": {
"title": "MultiDosageType",
"description": "The data model for representing multiple dosages",
"type": "object",
"properties": {
"dosage": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Dosage"
}
}
}
},
"Dosage": {
"title": "Dosage",
"type": "object",
"description": "The data model for representing Dosage",
"properties": {
"startTime": {
"$ref": "#/components/schemas/StartTime"
},
"startDateTime": {
"type": "string",
"description": "The start date time"
},
"durationTime": {
"$ref": "#/components/schemas/DurationTime"
},
"durationDateTime": {
"$ref": "#/components/schemas/DateTimeDuration"
},
"dosePlugin": {
"$ref": "#/components/schemas/DosePlugin"
}
}
},
"StartTime": {
"title": "StartTime",
"description": "The start time of the dosage",
"type": "object",
"properties": {
"value": {
"type": "integer",
"format": "int32"
},
"type": {
"$ref": "#/components/schemas/DoseTimeUnitType"
}
}
},
"DurationTime": {
"title": "DurationTime",
"description": "The dosage duration",
"type": "object",
"properties": {
"value": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string",
"description": "The time unit",
"enum": [
"Minutes",
"Hours",
"Days",
"Weeks",
"Unlimited"
]
}
}
},
"DateTimeDuration": {
"title": "DateTimeDuration",
"description": "The date time of the duration",
"type": "object",
"properties": {
"value": {
"type": "string"
},
"unlimited": {
"type": "boolean",
"description": "Whether the duration doesnt have an end time or not"
}
}
},
"DosePlugin": {
"title": "DosePlugin",
"description": "COSMIC Internal dose plugin for handling different types of dosages",
"type": "object",
"properties": {
"freeTextDosage": {
"$ref": "#/components/schemas/FreeTextDosageType"
},
"normalDosage": {
"$ref": "#/components/schemas/NormalDosageType"
},
"occasionDosage": {
"$ref": "#/components/schemas/OccasionDosageType"
},
"onceDosage": {
"$ref": "#/components/schemas/OnceDosageType"
},
"periodicDosage": {
"$ref": "#/components/schemas/PeriodicDosageType"
},
"weeklyDosage": {
"$ref": "#/components/schemas/WeeklyDosageType"
}
}
},
"FreeTextDosageType": {
"title": "FreeTextDosageType",
"description": "The data model used to represent free text type/unstructured dosages",
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Dosage text"
},
"unit": {
"type": "string",
"description": "Units of measure"
},
"motivation": {
"type": "string",
"description": "Motivation for issuing a free text type dosage"
},
"dosageText": {
"type": "string"
}
}
},
"NormalDosageType": {
"title": "NormalDosageType",
"description": "The data model used to represent normal dosages",
"type": "object",
"properties": {
"minDose": {
"type": "number",
"description": "Minimum dose"
},
"maxDose": {
"type": "number",
"description": "Maximum dose"
},
"unit": {
"type": "string",
"description": "Dose unit"
},
"time": {
"$ref": "#/components/schemas/Time"
},
"whenNeeded": {
"$ref": "#/components/schemas/WhenNeeded"
},
"dosageText": {
"type": "string",
"description": "Textual form of the dosage"
}
}
},
"Time": {
"title": "Time",
"type": "object",
"properties": {
"timesPerDay": {
"type": "integer",
"format": "int32",
"description": "Number of times per day"
},
"times": {
"$ref": "#/components/schemas/Times"
}
}
},
"Times": {
"title": "Times",
"description": "Array of Times",
"type": "object",
"properties": {
"time": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DoseTimeOfDayType"
}
}
}
},
"WhenNeeded": {
"title": "WhenNeeded",
"type": "object",
"properties": {
"maxDose": {
"$ref": "#/components/schemas/MaxDose"
},
"minimumIntervalBetweenDosages": {
"$ref": "#/components/schemas/MinimumIntervalBetweenDosages"
}
}
},
"MaxDose": {
"title": "MaxDose",
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "Maximum dose"
},
"doseRestriction": {
"type": "string",
"description": "Maximum dose PerDay or PerDosage",
"enum": [
"PerDay",
"PerDosage"
]
}
}
},
"MinimumIntervalBetweenDosages": {
"title": "MinimumIntervalBetweenDosages",
"description": "If there is a sequence of dosages, minimum time gap between dosages",
"type": "object",
"properties": {
"value": {
"type": "number"
},
"type": {
"$ref": "#/components/schemas/DoseTimeUnitType"
}
}
},
"OccasionDosageType": {
"title": "OccasionDosageType",
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"dosages": {
"$ref": "#/components/schemas/Dosages"
},
"dosageText": {
"type": "string"
}
}
},
"Dosages": {
"title": "Dosages",
"description": "A model for agregating different types of Occation dosage types",
"type": "object",
"properties": {
"occasionPerDayDosages": {
"$ref": "#/components/schemas/OccasionPerDayDosages"
},
"timeOfDayDosages": {
"$ref": "#/components/schemas/TimeOfDayDosages"
},
"specifiedTimeDosages": {
"$ref": "#/components/schemas/SpecifiedTimeDosages"
}
}
},
"OccasionPerDayDosages": {
"title": "OccasionPerDayDosages",
"description": "Array of OccasionPerDayDose",
"type": "object",
"properties": {
"occasionPerDayDose": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OccasionPerDayDose"
}
}
}
},
"OccasionPerDayDose": {
"title": "OccasionPerDayDose",
"type": "object",
"properties": {
"minDose": {
"type": "number",
"description": "Minimum dose"
},
"maxDose": {
"type": "number",
"description": "Maximum dose"
},
"doseOrder": {
"type": "integer",
"format": "int32",
"description": "Order of dose"
}
}
},
"TimeOfDayDosages": {
"title": "TimeOfDayDosages",
"description": "Array of TimeOfDayDose",
"type": "object",
"properties": {
"timeOfDayDose": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TimeOfDayDose"
}
}
}
},
"TimeOfDayDose": {
"title": "TimeOfDayDose",
"type": "object",
"properties": {
"minDose": {
"type": "number",
"description": "Minimum dose"
},
"maxDose":
# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cambio-healthcare-systems/refs/heads/main/openapi/cambio-healthcare-systems-medication-prescriptions-v2-openapi.json