Geography

View geographical areas, provinces, and cities

Reference Data

Geography data is read-only reference information used for patient address management. This data is maintained by system administrators and synchronized with national standards.

{#if activeTab === 'provinces'}
Provinces are the top-level administrative divisions. Cities and areas are organized hierarchically under provinces.
{#if loading}

{loadingMessage}

{:else if filteredProvinces.length === 0}
{#if provinceSearch.trim()}

No provinces match "{provinceSearch}"

{:else}

No provinces found

{/if}
{:else} {/if}
{:else if activeTab === 'cities'}
Cities are the second-level administrative divisions within provinces. Use the filter below to view cities for a specific province.
{#if selectedProvince && selectedProvinceLabel}
{filteredCities.length} cities in {selectedProvinceLabel}
{/if}

Select a province to filter cities, or leave empty to view all cities

{#if loading}

{loadingMessage}

{:else if filteredCities.length === 0}
{#if citySearch.trim()}

No cities match "{citySearch}"

{:else if selectedProvince}

No cities found for {selectedProvinceLabel}

Try selecting a different province

{:else}

No cities found

{/if}
{:else} {/if}
{:else if activeTab === 'areas'}
All Areas shows the complete geographical hierarchy including provinces, cities, districts, and villages with their relationships.
{#if loading}

{loadingMessage}

{:else if filteredAreas.length === 0}
{#if areaSearch.trim()}

No areas match "{areaSearch}"

{:else}

No geographical areas found

{/if}
{:else} {#snippet cell({ column, row, value })} {#if column.key === 'Class'} {@const IconComponent = getAreaClassIcon(value)}
{value}
{:else} {value} {/if} {/snippet}
{/if}
{#if filteredAreas.length > 0}

Area Class Types

{#each Object.entries(areaClassIcons) as [className, IconComponent] (className)}
{className}
{/each}
{/if}
{/if}