# External Documents Inventory — MySQL prog2
# Date: 2026-09-07

## Tables with External Document References

### 1. apps_master.preregis_owner2 (121 rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| AttachmentKTP | KTP (ID card) | firebasestorage.googleapis.com |
| AttachmentNPWP | NPWP (tax ID) | firebasestorage.googleapis.com |
| AttachmentSIA | SIA (pharmacy license) | firebasestorage.googleapis.com |
| AttachmentSIPA | SIPA (pharmacist license) | firebasestorage.googleapis.com |

**Status:** 121 rows with Firebase URLs.

### 2. apps_master.preregis_owner4 (? rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| AttachmentCDOB | CDOB (distribution cert) | ? |
| AttachmentSpeciment | Specimen | ? |
| AttachmentKTPAPJ | KTP APJ | ? |

### 3. apps_master.update_documents_owner (? rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| AttachmentSIA | SIA | ? |
| AttachmentSIPA | SIPA | ? |

### 4. apps_master_history.history_preregis_owner2 (? rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| AttachmentKTP | KTP | ? |
| AttachmentNPWP | NPWP | ? |
| AttachmentSIA | SIA | ? |
| AttachmentSIPA | SIPA | ? |

### 5. apps_transaction.detail_transaction_owner_doc (? rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| AttachmentSP | SP (purchase order) | ? |
| AttachmentSPType | SP type | ? |

### 6. pi_vitropic.wpai_posts (19 rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| post_content | Blog posts | vitropic.co.id |

### 7. u8182940_wpni213.wpai_posts (? rows)

| Column | Content | URL Pattern |
|--------|---------|-------------|
| post_content | Blog posts | ? |

## Firebase URLs Found

| Pattern | Count | Example |
|---------|-------|---------|
| firebasestorage.googleapis.com | 121 | KTP, NPWP, SIA, SIPA |
| pharmanet.apodoc.id | ~30 | KTP, NPWP, SIA, SIPA (null) |

## Document Types

| Type | Count | Notes |
|------|-------|-------|
| KTP | ~121 | Indonesian ID card |
| NPWP | ~121 | Tax ID |
| SIA | ~121 | Pharmacy license |
| SIPA | ~121 | Pharmacist license |
| CDOB | ? | Distribution cert |
| SP | ? | Purchase orders |

## Value

| Data | Value |
|------|-------|
| KTP images | **HIGH** — PII |
| NPWP images | **HIGH** — PII |
| SIA images | **HIGH** — Business license |
| SIPA images | **HIGH** — Professional license |

## Next Steps

1. **Download Firebase URLs** — 121 documents
2. **Extract document metadata** — owner, date, type
3. **Map to owners** — link to preregis_owner
4. **Negotiation** — leverage PII documents
