# Section 1: Graphical representation of end product

```
# Introdution

MSE component has 15 child components.

Mood/Affect
Appearance
Attitude
Cognition
Constitutional
Eye Contact
Impulse Control
Insight
Judgement
Perception
Psychomotor
Speech
Thought Content
Thought Process
Neurologicalal

## Appearence sub component

Normal (Short code)
Good grooming and hygiene,
No apparent distress,
Well-developed, well-nourished,
Appears stated age,
Appears younger than stated age,
Appears older than stated age,
Obese,
Thin or cachectic,
Disheveled, unkempt,
Malodorous,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:

1. Good grooming and hygiene,
2. No apparent distress,
3. Well-developed, well-nourished,
4. Appears stated age

## Attitude sub component

Normal (Short code)
Pleasant and cooperative,
Uncooperative,
Hostile or defiant,
Guarded,
Evasive,
Apathetic,
Disorganized behavior,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Pleasant and cooperative

## Cognition sub component

Grossly intact, no memory impairment, adequate fund of knowledge, no language deficit, normal attention,
Impaired,
Fluctuating,
Other

## Consitutional sub component

Vitals signs stable,
Other

## Eye Contact sub component

Normal (Short code)
Appropriate,
Downcast,
Intense,
Fleeting,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Appropriate,

## Impulse Control sub component

Normal (Short code)
Good,
Fair,
Questionable,
Poor,
Impaired,
Limited,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Good,

## Insight sub component

Normal (Short code)
Good,
Fair,
Questionable,
Poor,
Impaired,
Limited,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Good,

## Judgement sub component

Normal (Short code) ,
Good,
Fair,
Questionable,
Poor,
Impaired,
Limited,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Good,

## Perception sub component

Normal (Short code),
No AVH,
+AH,
+Command AH,
+VH,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
No AVH,

## Psychomotor sub component

Normal (Short code),
Normal,
Agitated,
Retarded,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Normal,

## Speech sub component

Normal (Short code),
Regular, rate and rhythm,
Fluent,
Incoherent,
Talkative,
Pressured,
Mumbling,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Regular, rate and rhythm,

## Thought Content sub component

Normal (Short code),
No SI, intent or plan,
No passive death wish,
No HI, intent or plan,
No delusional thinking observed,
No obsessive thinking observed,
+ruminations,
+SI without intent or plan,
+SI as detailed below,
+HI as detailed below,
+delusions,
+IOR,
+obsessions,
Other,
Passive death wish

Note: when user choose "Normal (Short code)", it will select following automatically:
No SI, intent or plan,
No passive death wish,
No HI, intent or plan,
No delusional thinking observed,
No obsessive thinking observed,

## Thought Process sub component

Normal (Short code),
Linear, logical and goal-directed,
Disorganized,
Circumstantial,
Tangential,
Looseness of associations,
Flight of ideas,
Poverty of thought,
Other

Note: when user choose "Normal (Short code)", it will select following automatically:
Linear, logical and goal-directed,

## Neurologicalal sub component

Gait and station normal,
Other,
Gait and station abnormal

## Mood/Affect sub component

Normal (Short code)
Euthymic,
Dysphoric,
Irritable,
Angry,
Bright,
Euphoric,
Labile,
Stable,
Mood congruent,
Mood incongruent,
Expansive,
Constricted,
Blunted,
Flat,
Anxious,
Tearful,
Dysthymic,
Full-range,
Other,

Note: when user choose "Normal (Short code)", it will select following automatically:
Euthymic,
Stable,
Full-range,
Mood congruent,

# Layer 1 card



Layer 1 card
============

                       ┌────────────────────────────────┐
                       │      Mental status exam        │
                       │                                │
                       │  Layer 1 card - Current state  │
                       └────────────────────────────────┘
┌─┬─────────────────────┬────────────────────────────────────────┬─────┬───────────┐
│ │ Mental status exam  │                                        │ M F │           │
│ └─────────────────────┘                                        └─────┘           │
├──────────────────┬───────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ │                                                          C    │
│ │  Appearence  │ │        ┌───────────────┬─┬────────────┬───┐                   │
│ └──────────────┘ │        │               │ │   Dates    │   │                   │
│ ┌──────────────┐ │        │               │ └────────────┘   │                   │
│ │   Attitude   │ │        │               │                  │                   │
│ └──────────────┘ │        │               │   │   │    │   │ │                   │
│ ┌──────────────┐ │        │               │   │   │    │   │ │                   │
│ │Psychomotor   │ │        │               │   │   │    │   │ │                   │
│ └──────────────┘ │        │               │   │   │    │   │ │                   │
│ ┌──────────────┐ │        │┌────────────┐ │   │   │    │   │ │                   │
│ │ Eye contact  │ │        ││  Dropdown  │ │   │   │    │   │ │                   │
│ └──────────────┘ │        ││  choices   │ │   │   │    │   │ │                   │
│    │             │        │└────────────┘ │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        │               │   │   │    │   │ │                   │
│    │             │        └───────────────┴───┴───┴────┴───┴─┘                   │
│    │             │    e.g. of graph see image in same folder                     │
│    │             │                                                               │
└────┼─────────────┴───────────────────────────────────────────────────────────────┘
     │
     │            ┌─────────────────────────────────────────┐
     │            │  C -> get 2nd layer tab to submit form  │
     ▼            └─────────────────────────────────────────┘
┌──────────┐
│ 15 tabs  │
└──────────┘


                           ┌────────────────────────────────┐
                           │      Mental status exam        │
                           │                                │
                           │   Layer 1 card - multiState    │
                           └────────────────────────────────┘
┌─┬─────────────────────┬────────────────────────────────────────┬─────┬───────────┐
│ │ Mental status exam  │                                        │  M  │           │
│ └─────────────────────┘                                        └─────┘           │
├──────────────────┬───────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ │    ┌─────────────────────────┐                           C    │
│ │  Appearence  │ │    │ Comma seperated values  │                                │
│ └──────────────┘ │    └─────────────────────────┘                                │
├──────────────────┼───────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ │    ┌─────────────────────────┐                           C    │
│ │   Attitude   │ │    │ Comma seperated values  │                                │
│ └──────────────┘ │    └─────────────────────────┘                                │
├──────────────────┼───────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ │    ┌─────────────────────────┐                          C     │
│ │Psychomotor   │ │    │ Comma seperated values  │                                │
│ └──────────────┘ │    └─────────────────────────┘                                │
├──────────────────┼───────────────────────────────────────────────────────────────┤
│                  │                                                         C     │
│ ┌──────────────┐ │    ┌─────────────────────────┐                                │
│ │ Eye contact  │ │    │ Comma seperated values  │                                │
│ └──────────────┘ │    └─────────────────────────┘                                │
│         │        │                                                               │
│         │        │                                                               │
└─────────┼────────┴───────────────────────────────────────────────────────────────┘
          │
          │
          ▼
     ┌──────────┐
     │ 15 rows  │
     └──────────┘




Layer 2 in tab:
================
    +---------------------------------------------------------------+
    |                                                               |
    |  Mental status exam                                           |
    +---------------------------------------------------------------+     +---------------------------------+
    |                  +--------------------------------+           |     |                                 |
+----->Appearance      | Normal (Short code)            | <---------------+ These are multi-select boxes.   |
|   |                  | Good grooming and hygiene,     |           |     |                                 |
|   |                  | No apparent distress,          |           |     +-+----+--------------------------+
|   |                  | Well+de^eloped, well+nourished,|           |       |    |
|   |                  +--------------------------------+           |       |    |
|   |                                                               |       |    |
|   | +-----------------------------------------------------------+ |       |    |
|   |                                                               |       |    |
|   |                  +--------------------------------+           |       |    |
+----->Attitude        | Normal (Short code)            |           |       |    |
|   |                  | Pleasant and cooperative       | <-----------------+    |
|   |                  |                                |           |            |
|   |                  +--------------------------------+           |            |
|   |                                                               |            |
|   | +-----------------------------------------------------------+ |            |
|   |                                                               |            |
|   |                  +--------------------------------+           |            |
+----> Cognition       |                                |           |            |
|   |                  |                                | <----------------------+
|   |                  +--------------------------------+           |
|   |                                                               |
|   | +-----------------------------------------------------------+ |
+----->                                                             |
|   | +-----------------------------------------------------------+ |
+----->                                                             |
|   | +-----------------------------------------------------------+ |
+----->                                                             |
|   | +-----------------------------------------------------------+ |     +------------------------------------+
|   |                                                  +--------+   |     |                                    |
|   |                                                  |        |   |     | Save button. Clicking on it will   |
|   |                                                  |  Save <----------+ submit data selected for all 15    |
|   |                                                  |        |   |     | sub sections.                      |
|   |                                                  +--------+   |     |                                    |
|   |                                                               |     +------------------------------------+
|   +---------------------------------------------------------------+
|
|    +------------------------------------------------+
|    |                                                |
|    |   These are all the 15 sub-sections that are   |
+----+   mentioned above in introduction section.     |
     |   3 of the sub sections has been shown just    |
     |   to convey the idea. in the bottom part of    |
     |   the diagram can be seen multiple horizontal  |
     |   lines. these represents the remaining sub    |
     |   sections and related multi-select boxes.     |
     |                                                |
     +------------------------------------------------+






# Notes:

1. Data is sent to server only when submit is clicked. Half saved form just live on the client. There is only one submit for all the 15 components combined.

2. What data to load when the web page is refreshed or the <Mental-status-exam></Mental-status-exam> component is loaded
   Option 1: There are non-subnmitted data on the client. In this case load the non-sumbitted data
   Option 2: Load with the latest data in the server. Because most times doctors change only 1 or 2 options.
```

# Section 2: Feature to code relationship

# Feature Client side state Server side state Component Client side code Server side code
1 Change mse sql for table structure, sql for testdata None