Template:CARE Facility: Difference between revisions
More languages
More actions
Annotate latitude and longitude as numbers so facilities can be plotted from the API (via update-page on MediaWiki MCP Server) |
Add locality field; district is now only set when genuinely resolved (via update-page on MediaWiki MCP Server) |
||
| Line 2: | Line 2: | ||
Infobox and semantic annotations for a health facility with a CARE deployment. |
Infobox and semantic annotations for a health facility with a CARE deployment. |
||
These pages are '''machine-maintained'''. They are generated and refreshed from the [https://github.com/ohcnetwork/deployments_registry deployments registry] and OpenStreetMap; facilities are not added by hand. |
|||
Fields are split into two groups, and this split is the contract with the sync bot: |
|||
== Locality versus district == |
|||
; Bot-managed |
|||
: <code>care_id</code>, <code>name</code>, <code>program</code>, <code>facility_type</code>, <code>district</code>, <code>state</code>, <code>latitude</code>, <code>longitude</code>, <code>date_deployed</code>, <code>care_status</code>, <code>osm_id</code>, <code>wikidata</code>, <code>osm_match_confidence</code>, <code>last_synced</code>. Refreshed from the [https://github.com/ohcnetwork/deployments_registry deployments registry] and OpenStreetMap. If a volunteer changes one of these and the upstream value differs, the bot flags the page into [[:Category:Facilities with sync conflicts]] rather than overwriting the edit. |
|||
<code>locality</code> holds the registry's free-text place value (its <code>city</code> field). For keralacare records this is often an address fragment such as "Vazhithla P O" rather than a district, so it is stored as [[Property:Has locality|Has locality]] and is '''not''' treated as a district. |
|||
; Volunteer-owned |
|||
: <code>hfr_id</code>, <code>beds</code>, <code>phone</code>, <code>website</code>, <code>notes</code>, <code>last_verified</code>. Never touched by the bot. |
|||
<code>district</code> is set only when a real district could be established — from the registry directly (10bedicu), or by matching a known district name against the facility name, locality and postal address (keralacare). Where it cannot be established it is left blank and the page lands in [[:Category:Facilities with an unresolved district]], which is the queue for a future postal-code or HFR-based pass. |
|||
Page titles are the plain facility name; the registry ID is appended only to separate genuinely duplicated names. |
|||
== Known limitation: no maps yet == |
== Known limitation: no maps yet == |
||
| Line 21: | Line 24: | ||
| program = keralacare |
| program = keralacare |
||
| facility_type = Family Health Centre |
| facility_type = Family Health Centre |
||
| locality = THRISSUR |
|||
| district = Thrissur |
| district = Thrissur |
||
| state = Kerala |
| state = Kerala |
||
| Line 30: | Line 34: | ||
| wikidata = |
| wikidata = |
||
| last_synced = 2025-11-22 |
| last_synced = 2025-11-22 |
||
| hfr_id = |
|||
| beds = |
|||
| last_verified = |
|||
}} |
}} |
||
</pre> |
</pre> |
||
| Line 40: | Line 41: | ||
! style="text-align:left;" | Facility type |
! style="text-align:left;" | Facility type |
||
| {{{facility_type|''unknown''}}} |
| {{{facility_type|''unknown''}}} |
||
|- |
|||
! style="text-align:left;" | Locality |
|||
| {{{locality|''unknown''}}} |
|||
|- |
|- |
||
! style="text-align:left;" | District |
! style="text-align:left;" | District |
||
| {{#if:{{{district|}}}|[[:Category:Health facilities in {{{district}}} district|{{{district}}}]]|'' |
| {{#if:{{{district|}}}|[[:Category:Health facilities in {{{district}}} district|{{{district}}}]]|''unresolved''}} |
||
|- |
|- |
||
! style="text-align:left;" | State |
! style="text-align:left;" | State |
||
| Line 84: | Line 88: | ||
| {{#if:{{{hfr_id|}}}|<code>{{{hfr_id}}}</code>|''not recorded''}} |
| {{#if:{{{hfr_id|}}}|<code>{{{hfr_id}}}</code>|''not recorded''}} |
||
|- |
|- |
||
| colspan="2" style="font-size:88%; color:#54595d;" | |
| colspan="2" style="font-size:88%; color:#54595d;" | {{#if:{{{last_synced|}}}|Synced from the registry on {{{last_synced}}}.|}} |
||
|}<!-- |
|}<!-- |
||
-->{{#if:{{{care_id|}}}|[[Has CARE ID::{{{care_id}}}| ]]}}<!-- |
-->{{#if:{{{care_id|}}}|[[Has CARE ID::{{{care_id}}}| ]]}}<!-- |
||
-->{{#if:{{{program|}}}|[[Has program::{{{program}}}| ]]}}<!-- |
-->{{#if:{{{program|}}}|[[Has program::{{{program}}}| ]]}}<!-- |
||
-->{{#if:{{{facility_type|}}}|[[Has facility type::{{{facility_type}}}| ]]}}<!-- |
-->{{#if:{{{facility_type|}}}|[[Has facility type::{{{facility_type}}}| ]]}}<!-- |
||
| ⚫ | |||
-->{{#if:{{{district|}}}|[[Located in district::{{{district}}}| ]]}}<!-- |
-->{{#if:{{{district|}}}|[[Located in district::{{{district}}}| ]]}}<!-- |
||
-->{{#if:{{{state|}}}|[[Located in state::{{{state}}}| ]]}}<!-- |
-->{{#if:{{{state|}}}|[[Located in state::{{{state}}}| ]]}}<!-- |
||
| Line 99: | Line 104: | ||
-->{{#if:{{{hfr_id|}}}|[[Has HFR ID::{{{hfr_id}}}| ]]}}<!-- |
-->{{#if:{{{hfr_id|}}}|[[Has HFR ID::{{{hfr_id}}}| ]]}}<!-- |
||
-->{{#if:{{{beds|}}}|[[Has bed count::{{{beds}}}| ]]}}<!-- |
-->{{#if:{{{beds|}}}|[[Has bed count::{{{beds}}}| ]]}}<!-- |
||
| ⚫ | |||
-->{{#if:{{{osm_match_confidence|}}}|[[Has OSM match confidence::{{{osm_match_confidence}}}| ]]}}<!-- |
-->{{#if:{{{osm_match_confidence|}}}|[[Has OSM match confidence::{{{osm_match_confidence}}}| ]]}}<!-- |
||
-->[[Category:CARE facilities]]<!-- |
-->[[Category:CARE facilities]]<!-- |
||
-->{{#if:{{{state|}}}|[[Category:Health facilities in {{{state}}}]]|[[Category:Facilities missing a state]]}}<!-- |
-->{{#if:{{{state|}}}|[[Category:Health facilities in {{{state}}}]]|[[Category:Facilities missing a state]]}}<!-- |
||
-->{{#if:{{{district|}}}|[[Category:Health facilities in {{{district}}} district]]|}}<!-- |
-->{{#if:{{{district|}}}|[[Category:Health facilities in {{{district}}} district]]|[[Category:Facilities with an unresolved district]]}}<!-- |
||
-->{{#if:{{{facility_type|}}}|[[Category:{{{facility_type}}}s in India]]|}}<!-- |
-->{{#if:{{{facility_type|}}}|[[Category:{{{facility_type}}}s in India]]|}}<!-- |
||
-->{{#if:{{{program|}}}|[[Category:{{{program}}} deployments]]|}}<!-- |
-->{{#if:{{{program|}}}|[[Category:{{{program}}} deployments]]|}}<!-- |
||
-->{{#ifeq:{{{osm_match_confidence|}}}|review|[[Category:Facilities with an OSM match needing review]]|}}<!-- |
-->{{#ifeq:{{{osm_match_confidence|}}}|review|[[Category:Facilities with an OSM match needing review]]|}}<!-- |
||
-->{{#if:{{{osm_id|}}}||[[Category:Facilities not linked to OpenStreetMap]]}}< |
-->{{#if:{{{osm_id|}}}||[[Category:Facilities not linked to OpenStreetMap]]}}</includeonly> |
||
-->{{#if:{{{last_verified|}}}||[[Category:Facilities awaiting volunteer verification]]}}</includeonly> |
|||
Revision as of 11:34, 9 September 2026
Infobox and semantic annotations for a health facility with a CARE deployment.
These pages are machine-maintained. They are generated and refreshed from the deployments registry and OpenStreetMap; facilities are not added by hand.
Locality versus district
locality holds the registry's free-text place value (its city field). For keralacare records this is often an address fragment such as "Vazhithla P O" rather than a district, so it is stored as Has locality and is not treated as a district.
district is set only when a real district could be established — from the registry directly (10bedicu), or by matching a known district name against the facility name, locality and postal address (keralacare). Where it cannot be established it is left blank and the page lands in Category:Facilities with an unresolved district, which is the queue for a future postal-code or HFR-based pass.
Page titles are the plain facility name; the registry ID is appended only to separate genuinely duplicated names.
Known limitation: no maps yet
This template does not render a map, and coordinates are annotated as two plain numbers (Has latitude and Has longitude) rather than as a Geographic coordinate.
The installed Maps 11.0.1 is incompatible with Semantic MediaWiki 7.0.0: Maps\SemanticMW\CoordinateValue::parseUserValue() no longer matches the parent signature, so both #display_map and any coordinate annotation raise a PHP fatal and the save fails with HTTP 500. The numeric properties are enough to plot facilities from the API in the meantime.
{{CARE Facility
| care_id = keralacare-1124
| name = FHC Panjal
| program = keralacare
| facility_type = Family Health Centre
| locality = THRISSUR
| district = Thrissur
| state = Kerala
| latitude = 10.71962549
| longitude = 76.31563961
| date_deployed = 2025-03-03
| care_status = active
| osm_id =
| wikidata =
| last_synced = 2025-11-22
}}