# ai.newnal.mydata.healthMedications

> Medications taken, with their purpose, dosage and status. The health conditions and symptoms treated with the medications are kept in health.healthStatus, and allergies in health.allergies.

- Kind: record
- Record key: any
- Authority: mydata.newnal.ai
- Lexicon: 1
- Published by [newnal-platform.newnal.id](https://lexicon.garden/identity/did:plc:vciktevzoffubdvdaajz2yp3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:vciktevzoffubdvdaajz2yp3/ai.newnal.mydata.healthMedications)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:vciktevzoffubdvdaajz2yp3/ai.newnal.mydata.healthMedications/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:vciktevzoffubdvdaajz2yp3/ai.newnal.mydata.healthMedications/analytics)

## Record (`ai.newnal.mydata.healthMedications`)

Type: record · key any

### Properties

- `_meta` (ref, required)
  - Reference: `ai.newnal.mydata.defs#recordMeta`
- `data` (union, required)
  - One of (closed): `#section`, `#entry`

## #entry (`ai.newnal.mydata.healthMedications#entry`)

Type: object

One medication taken.

### Properties

- `codes` (array): List of the codes for the medication in standard classifications (for example RxNorm or ATC).
  - Constraints: maxLength: 20
  - `items` (ref): One item of the list of the codes for the medication in standard classifications (for example RxNorm or ATC).
    - Reference: `ai.newnal.mydata.defs#coding`
- `daysOfWeek` (array): List of the weekdays the medication is taken on. Omit it when it is taken every day.
  - Constraints: maxLength: 7
  - `items` (ref): One item of the list of the weekdays the medication is taken on.
    - Reference: `ai.newnal.mydata.defs#weekday`
- `dosage` (string): The dosage of the medication.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `frequency` (string): How often it recurs.
  - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: daily | as_needed | weekly | monthly
- `mealTiming` (string): When the medication is taken in relation to a meal.
  - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: before_meal | with_meal | after_meal | empty_stomach
- `name` (string): The name of the medication taken.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `notes` (string): An additional note.
  - Constraints: maxLength: 30000, maxGraphemes: 3000
- `purpose` (string): The reason for taking the medication, or the symptom it targets.
  - Constraints: maxLength: 30000, maxGraphemes: 3000
- `status` (string): The status of taking the medication.
  - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: active | stopped | planned | paused | completed
- `time` (union): The point in time or period over which the medication is taken. When it is a period, endAt is left out both while the medication is still taken and when the end is not known; status says which (active: still taken; stopped or completed: ended).
  - One of (closed): `ai.newnal.mydata.defs#instantTime`, `ai.newnal.mydata.defs#intervalTime`
- `timeCertainty` (string): Whether the start and end of time are exact or approximate. The period is still the time over which the medication is taken.
  - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: exact | approximate
- `timesOfDay` (array): List of the times of day the medication is taken at.
  - Constraints: maxLength: 100
  - `items` (string): One item of the list of the times of day the medication is taken at.
    - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: morning | midday | evening | bedtime
- `timesPerDay` (integer): The number of times the medication is taken in a day.
  - Constraints: minimum: 1, maximum: 24
- `treats` (array): List of the AT-URIs of the health condition, symptom or allergy records this medication is taken for.
  - Constraints: maxLength: 100
  - `items` (string · at-uri): One item of the list of the AT-URIs of the health condition, symptom or allergy records this medication is taken for.

## #section (`ai.newnal.mydata.healthMedications#section`)

Type: object

Medications taken, with their purpose, dosage and status. The health conditions and symptoms treated with the medications are kept in health.healthStatus, and allergies in health.allergies.

### Properties

- `noneKnown` (boolean): True when, as far as is known, the user takes no medication. It is a statement, not the absence of one: a section with no item and without this key says nothing either way. It is removed when an item is added.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "entry": {
      "description": "One medication taken.",
      "properties": {
        "codes": {
          "description": "List of the codes for the medication in standard classifications (for example RxNorm or ATC).",
          "items": {
            "description": "One item of the list of the codes for the medication in standard classifications (for example RxNorm or ATC).",
            "ref": "ai.newnal.mydata.defs#coding",
            "type": "ref"
          },
          "maxLength": 20,
          "type": "array"
        },
        "daysOfWeek": {
          "description": "List of the weekdays the medication is taken on. Omit it when it is taken every day.",
          "items": {
            "description": "One item of the list of the weekdays the medication is taken on.",
            "ref": "ai.newnal.mydata.defs#weekday",
            "type": "ref"
          },
          "maxLength": 7,
          "type": "array"
        },
        "dosage": {
          "description": "The dosage of the medication.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "frequency": {
          "description": "How often it recurs.",
          "knownValues": [
            "daily",
            "as_needed",
            "weekly",
            "monthly"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "mealTiming": {
          "description": "When the medication is taken in relation to a meal.",
          "knownValues": [
            "before_meal",
            "with_meal",
            "after_meal",
            "empty_stomach"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "name": {
          "description": "The name of the medication taken.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "notes": {
          "description": "An additional note.",
          "maxGraphemes": 3000,
          "maxLength": 30000,
          "type": "string"
        },
        "purpose": {
          "description": "The reason for taking the medication, or the symptom it targets.",
          "maxGraphemes": 3000,
          "maxLength": 30000,
          "type": "string"
        },
        "status": {
          "description": "The status of taking the medication.",
          "knownValues": [
            "active",
            "stopped",
            "planned",
            "paused",
            "completed"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "time": {
          "closed": true,
          "description": "The point in time or period over which the medication is taken. When it is a period, endAt is left out both while the medication is still taken and when the end is not known; status says which (active: still taken; stopped or completed: ended).",
          "refs": [
            "ai.newnal.mydata.defs#instantTime",
            "ai.newnal.mydata.defs#intervalTime"
          ],
          "type": "union"
        },
        "timeCertainty": {
          "description": "Whether the start and end of time are exact or approximate. The period is still the time over which the medication is taken.",
          "knownValues": [
            "exact",
            "approximate"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "timesOfDay": {
          "description": "List of the times of day the medication is taken at.",
          "items": {
            "description": "One item of the list of the times of day the medication is taken at.",
            "knownValues": [
              "morning",
              "midday",
              "evening",
              "bedtime"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        },
        "timesPerDay": {
          "description": "The number of times the medication is taken in a day.",
          "maximum": 24,
          "minimum": 1,
          "type": "integer"
        },
        "treats": {
          "description": "List of the AT-URIs of the health condition, symptom or allergy records this medication is taken for.",
          "items": {
            "description": "One item of the list of the AT-URIs of the health condition, symptom or allergy records this medication is taken for.",
            "format": "at-uri",
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "Medications taken, with their purpose, dosage and status. The health conditions and symptoms treated with the medications are kept in health.healthStatus, and allergies in health.allergies.",
      "key": "any",
      "record": {
        "properties": {
          "_meta": {
            "ref": "ai.newnal.mydata.defs#recordMeta",
            "type": "ref"
          },
          "data": {
            "closed": true,
            "refs": [
              "#section",
              "#entry"
            ],
            "type": "union"
          }
        },
        "required": [
          "data",
          "_meta"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "section": {
      "description": "Medications taken, with their purpose, dosage and status. The health conditions and symptoms treated with the medications are kept in health.healthStatus, and allergies in health.allergies.",
      "properties": {
        "noneKnown": {
          "description": "True when, as far as is known, the user takes no medication. It is a statement, not the absence of one: a section with no item and without this key says nothing either way. It is removed when an item is added.",
          "type": "boolean"
        }
      },
      "type": "object"
    }
  },
  "id": "ai.newnal.mydata.healthMedications",
  "lexicon": 1
}
```
