Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ A new data shape, to be served at `/v2/…` next to v1. Not live yet; v1 is unch
- No loan programs. New: PCSO (Medical Assistance Program) and DOH (MAIFIP).
- A `null` or empty value means "Not available".

### Images
- PhilHealth, SPMC Cancer Institute and AMUMA now use images hosted by this API (`/images/…`, WebP) instead of links to other sites. AMUMA has a new image: `amuma.webp` replaces `amuma.jpg`.
- Image standard ([images/README.md](images/README.md)): WebP; doctor photos square up to 800 × 800, other images 16:9 up to 1200 × 675. `npm run validate` warns about images that are not WebP.
- Images for PCSO and DOH are ready for v2.

### Docs
- Added [MILESTONES.md](MILESTONES.md) and this changelog.
- README is now a short quick start. The full API reference moved to [API-GUIDE.md](API-GUIDE.md), and how the API is served and maintained to [MAINTAINING.md](MAINTAINING.md).
Expand Down
2 changes: 1 addition & 1 deletion data/FinancialInstitution/FinancialInstiData.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"id": 1,
"name": "PhilHealth",
"bgImageURL": "https://newsfortph.com/upload/media/posts/2022-07/10/philhealth-davao-region-intensifies-konsulta-campaign_1657399553-b.jpg",
"bgImageURL": "/images/FinancialInstitution/philhealth.webp",
"source": "https://www.philhealth.gov.ph/",
"description": "PhilHealth is the Philippines' government-owned health insurer, providing universal health coverage through a social insurance program. It pools funds from member contributions to subsidize medical costs, making healthcare affordable for hospitalizations and preventive care.",
"type": "Public Institution",
Expand Down
2 changes: 1 addition & 1 deletion data/HealthInstitution/HealthInstiData.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"id": 1,
"name": "SPMC Cancer Institute",
"bgImageURL": "https://media.assettype.com/sunstar%2F2025-09-20%2F08lzbtjf%2FUntitled-1.jpg",
"bgImageURL": "/images/HealthInstitution/spmc-cancer-institute.webp",
"source": "https://www.facebook.com/SouthernPhilippinesMedicalCenter",
"description": "The Southern Philippines Medical Center is the largest government hospital under the Department of Health of the Republic of the Philippines. It is located at the JP Laurel Ave, Bajada, Davao City. It began as the Davao Medical Center. Its name was changed on November 19, 2009, by Republic Act 9792.",
"type": "Public Institution",
Expand Down
2 changes: 1 addition & 1 deletion data/SupportGroups/SupportGroupsData.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"description": "AMUMA is a non-stock, non-profit foundation based in Davao City, Philippines. We are a group of dynamic and caring individuals committed to meeting the spiritual, emotional, and practical needs of cancer patients, their families and caregivers, by providing holistic care and support through building and maintaining a healing center for education, counseling, networking, and empowerment.",
"type": "General Support Groups",
"socmedURL": "https://www.facebook.com/amumasupport",
"bgImageURL": "/images/SupportGroups/amuma.jpg",
"bgImageURL": "/images/SupportGroups/amuma.webp",
"location": "Davao City",
"longitude": null,
"latitude": null,
Expand Down
Empty file added images/Feeds/.gitkeep
Empty file.
Empty file.
Binary file added images/FinancialInstitution/doh.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/FinancialInstitution/pcso.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/FinancialInstitution/philhealth.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
15 changes: 15 additions & 0 deletions images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
Images here are served by the API at `/images/<Folder>/<file>`, for example
`images/MedicalSpecialist/dr-santos.webp` → `https://cancer-open-data.capillanesjohnfritz.workers.dev/images/MedicalSpecialist/dr-santos.webp`.

## Standard (use this for every new image)

| Kind | Folder | Shape and size | File name |
|---|---|---|---|
| Doctor photo | `MedicalSpecialist/` | Square **1:1**, up to **800 × 800** px | `dr-<first>-<last>.webp`, e.g. `dr-felycette-gay-lapus.webp` |
| Institution logo or building | `FinancialInstitution/`, `HealthInstitution/` | Wide **16:9**, up to **1200 × 675** px | `<name>.webp`, e.g. `philhealth.webp` |
| Support group logo or photo | `SupportGroups/` | Wide **16:9**, up to **1200 × 675** px | `<name>.webp`, e.g. `amuma.webp` |
| Feed cover | `Feeds/` | Wide **16:9**, up to **1200 × 675** px | `feed-<id>.webp`, e.g. `feed-1.webp` |

- **Format: WebP**, quality about 80. It is the smallest for the same quality, keeps transparency for logos, and works in every current browser.
- **Size:** aim under **200 KB** (photos) and **300 KB** (wide images).
- **Never enlarged:** a smaller original keeps its size (same shape). A logo far from 16:9 (tall or square) is padded with its own background color; one close to 16:9 is only trimmed at its plain edges.
- **Center the subject** so apps can crop to a circle (doctors) or a card (wide images).
- Other types still pass the check but get a warning. Convert them to WebP before adding.

## Rules (checked by `npm run validate`)

- **One folder per dataset:** `Feeds/`, `FinancialInstitution/`, `HealthInstitution/`, `MedicalSpecialist/`, `SupportGroups/`. No files loose in `images/`, no sub-folders.
Expand Down
Binary file removed images/SupportGroups/amuma.jpg
Binary file not shown.
Binary file added images/SupportGroups/amuma.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scripts/validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ for (const f of listImageFiles()) {
} else if (f.size > MAX_BYTES) { console.error(`FAIL ${at}: ${kb(f.size)} is over the ${kb(MAX_BYTES)} limit. Resize or compress it`); failed++; }
else {
if (f.size > WARN_BYTES) warn(`${at} is ${kb(f.size)}. Under ${kb(WARN_BYTES)} loads faster (try WebP, about 1200 px wide)`);
if (!f.rel.endsWith(".webp")) warn(`${at} is not WebP. The standard is WebP (see ${IMAGES_DIR}/README.md)`);
images.add(f.rel);
}
}
Expand Down
Loading