|
# 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 |