File size: 3,666 Bytes
732eb0d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# Patient Doctor QA Raw Dataset (ZoneTwelve/patient_doctor_qa_rawdata)
⚠️ **IMPORTANT**: All files in this dataset use Big5 encoding, as they originate from public e-hospital. Make sure your system is configured to handle Big5 encoded files properly.
## Overview
This dataset (`ZoneTwelve/patient_doctor_qa_rawdata`) contains patient-related Question-Answer pairs derived from Taiwan's e-Hospital system. The data is sourced from the Taiwan e-Hospital platform (https://sp1.hso.mohw.gov.tw/), providing valuable healthcare-related QA information.
## Dataset Structure
The dataset is stored in Hugging Face's blob format for efficient storage and access. It includes:
- Question-answer pairs related to patient care
- Medical terminology and procedures
- Healthcare facility information
- Patient care guidelines
## Data Source
- **Origin**: Taiwan e-Hospital Platform
- **URL**: https://sp1.hso.mohw.gov.tw/
- **Format**: Processed and stored in blob format
## Tools and Utilities
### 1. Viewer Tool (`viewer.py`)
A Python script to preview the contents of blob files.
#### Features:
- List all files in the blob storage
- Preview specific file contents
- Support for both text and binary files
- Configurable preview size
#### Usage:
```bash
# List all files
python viewer.py /path/to/ZoneTwelve/patient_docker_qa_data --list
# Preview specific file
python viewer.py /path/to/ZoneTwelve/patient_docker_qa_data --file 999
# Preview with custom size limit
python viewer.py /path/to/ZoneTwelve/patient_docker_qa_data --file 999 --size 2048
```
### 2. Export Tool (`export.py`)
A Python script to extract files from the blob storage.
#### Features:
- Extract specific files from blobs
- Maintain original file structure
- Custom output path support
- File listing capability
#### Usage:
```bash
# List available files
python export.py /path/to/ZoneTwelve/patient_docker_qa_data --list
# Extract specific file
python export.py /path/to/ZoneTwelve/patient_docker_qa_data --file 999 --output /path/to/save/999.html
# Extract to default location
python export.py /path/to/ZoneTwelve/patient_docker_qa_data --file 999
```
## Directory Structure
```
.
├── blobs/
│ ├── metadata.json
│ ├── blob_0
│ ├── blob_1
│ └── ...
├── viewer.py
└── export.py
```
## Requirements
- Python 3.6 or higher
- Standard Python libraries:
- json
- argparse
- pathlib
- shutil
## Installation
1. Clone the repository
2. Ensure Python 3.6+ is installed
3. No additional dependencies required
## Usage Examples
### Viewing Files
```bash
# List all available files
python viewer.py ./blobs --list
# Preview a specific QA file
python viewer.py ./blobs --file 999
```
### Extracting Files
```bash
# Extract a specific file to custom location
python export.py ./blobs --file qa/patient_guidelines.txt --output ./exported/guidelines.txt
# Extract maintaining original structure
python export.py ./blobs --file qa/medical_terms.txt
```
## Data Format
The blob storage contains file types including:
- Raw HTML files (.html), but without extention name
## License and Usage Rights
Please refer to Taiwan e-Hospital's terms of service and data usage guidelines for specific licensing information.
## Contributing
For contributions or issues, please follow these steps:
1. Fork the repository
2. Create a feature branch
3. Submit a pull request
## Contact
For questions or support regarding the dataset, please contact the maintainers or refer to the Taiwan e-Hospital platform.
## Acknowledgments
- Taiwan e-Hospital for providing the source data
- Contributors to the data collection and processing pipeline |