license:mit region:us
---
license: mit
---

# Medical Triage Complaint Data Structure README

This data structure is designed to use for supervised finetuining of llam2 over generating triage questions based on provided patient complaint/age/gender as input

## JSON Format

The data structure is represented in JSON format, with two main sections: `input` and `questions`.

### Input Section

The `input` section contains information about the patient's complaint, age, and gender.

```json
{
  "input": {
    "complaint": "Patient's Chief/Main Complaint",
    "age": "Patient's Age in number of years",
    "gender": "Patient's Gender Female or Male"
  }
}
```

### Questions Section

The `questions` section includes an array of questions related to the patient's specific complaint. Each question has a `questionType`, `question`, and a set of `options` (if applicable).

```json
{
  "questions": [
    {
      "questionType": "select-option",
      "question": "Question Text",
      "options": ["Option 1", "Option 2", ...]
    },
    {
      "questionType": "text",
      "question": "Free-Form Text Question"
    },
    // Add more questions as needed
  ]
}
```

- `"questionType"` can be either `"select-option"` (for multiple-choice questions) or `"text"` (for open-ended text questions).
- `"question"` is the text of the question.
- `"options"` (if present) is an array of possible answer choices.

## Preapring Instruction set for finetune the llama2 model (any of 7b-hf, 13b-hf or 70b-hf)

Each "text" sample in training records has following 3 sections

    
1. Use following gereic instruction to generate traige questions with provided patient age, gender and complaint
```
###Instruction:   
As a highly skilled doctor, your task is to assess the patient's clinical condition by asking a variety of clinical questions, You will be provided with Patient age,
gender and main complaint, and you need to generate more granular triage questions in json format, the keys of json data are as follows

question:<clinical triage question that could be helpful to understant patient condition more clearly>
questionType: <either question is type that can expect text answer or any options need to select. So set one of following types "text" or "option">
options: <provide posiible options for question if question type is option>

And dont generate any additional text except json data object. And each object should separate by comma. Follow Json Standard syntax.

questions should be atleast 8 and atmost 15 in number to understand the patient condition clearly. 
```
2. add ###Input as Patient basic info
```
###Input:
{"input": {"complaint": "Patient's Chief/Main Complaint","age": "Patient's Age in number of years","gender": "Patient's Gender Female or Male"}}
```
4. Add questions json structure as output
```
###Output:
{"questions": [{"questionType": "select-option","question": "How would you describe the severity of your sore throat?","options": ["Mild", "Moderate", "Severe"]},
    {"questionType": "select-option", "question": "Have you had a fever along with the sore throat?", "options": ["No", "Yes"]},
    {"questionType": "text","question": "Anything else you want to share?"}]}
```
## Final instruction sample
```
###Instruction:   
As a highly skilled doctor, your task is to assess the patient's clinical condition by asking a variety of clinical questions, You will be provided with Patient age,
gender and main complaint, and you need to generate more granular triage questions in json format, the keys of json data are as follows

question:<clinical triage question that could be helpful to understant patient condition more clearly>
questionType: <either question is type that can expect text answer or any options need to select. So set one of following types "text" or "option">
options: <provide posiible options for question if question type is option>

And dont generate any additional text except json data object. And each object should separate by comma. Follow Json Standard syntax.

questions should be atleast 8 and atmost 15 in number to understand the patient condition clearly. 

###Input:
{"input": {"complaint": "Patient's Chief/Main Complaint","age": "Patient's Age in number of years","gender": "Patient's Gender Female or Male"}}

###Output:
{"questions": [{"questionType": "select-option","question": "How would you describe the severity of your sore throat?","options": ["Mild", "Moderate", "Severe"]},
    {"questionType": "select-option", "question": "Have you had a fever along with the sore throat?", "options": ["No", "Yes"]},
    {"questionType": "text","question": "Anything else you want to share?"}]}
```