@geoalgeria/sante 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Yasser's Studio (https://yasser.studio)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.ar.md ADDED
@@ -0,0 +1,187 @@
1
+ [English](README.md) | [Français](README.fr.md) | **العربية**
2
+
3
+ <div align="center">
4
+
5
+ # @geoalgeria/sante
6
+
7
+ **المؤسسات الصحية العمومية في الجزائر — كبيانات قابلة للتثبيت.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@geoalgeria/sante)](https://www.npmjs.com/package/@geoalgeria/sante)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@geoalgeria/sante)](https://www.npmjs.com/package/@geoalgeria/sante)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
+
13
+ </div>
14
+
15
+ **695 مؤسسة صحية عمومية** عبر **58 ولاية** لها مديرية للصحة — المؤسسات العمومية
16
+ الاستشفائية (EPH)، ومؤسسات الصحة الجوارية (EPSP)، والمؤسسات الاستشفائية المتخصصة
17
+ (EHS)، والمراكز الاستشفائية الجامعية (CHU) من **وزارة الصحة (MSP)**، ثنائية اللغة
18
+ عربي/فرنسي، **600 منها بإحداثيات** عبر OpenStreetMap وWikidata مع ربطٍ
19
+ بالبلدية والولاية. متوفر بصيغ JSON وCSV وGeoJSON وTypeScript. جزء من
20
+ [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
21
+
22
+ ```bash
23
+ npm install @geoalgeria/sante
24
+ ```
25
+
26
+ ```js
27
+ import sante from "@geoalgeria/sante";
28
+
29
+ const all = sante.sante(); // 695 مؤسسة
30
+
31
+ // المستشفيات العمومية في ولاية (ربط بـ wilaya_code في GeoAlgeria)
32
+ const ephAlger = all.filter((e) => e.wilaya_code === "16" && e.type === "eph");
33
+
34
+ // فقط ما له إحداثيات، جاهز للخريطة
35
+ const mappable = all.filter((e) => e.lat != null);
36
+ ```
37
+
38
+ ## ما يمكنك بناؤه
39
+
40
+ - **أدلّة ومحدّدات مواقع المستشفيات والعيادات** — إحداثيات على 600 من أصل 695
41
+ سجلًّا، جاهزة للخريطة أو للبحث عن الأقرب.
42
+ - **أدلّة صحية ثنائية اللغة** — أسماء عربية وفرنسية، والنوع الرسمي والولاية لكل
43
+ مؤسسة.
44
+ - **تحليل التغطية والتخطيط** — حساب المؤسسات حسب النوع لكل بلدية/ولاية عبر البلاد.
45
+
46
+ ## المحتوى
47
+
48
+ | مجموعة البيانات | العدد | الإحداثيات | ملاحظات |
49
+ | --- | --- | --- | --- |
50
+ | المؤسسات الصحية | **695** | 600 بإحداثيات | 58 ولاية، 563 ثنائية اللغة |
51
+
52
+ **حسب النوع**
53
+
54
+ | النوع | العدد | المعنى |
55
+ | --- | --- | --- |
56
+ | `eph` | 270 | المؤسسة العمومية الاستشفائية |
57
+ | `epsp` | 292 | المؤسسة العمومية للصحة الجوارية |
58
+ | `ehs` | 108 | المؤسسة الاستشفائية المتخصصة |
59
+ | `chu` | 20 | المركز الاستشفائي الجامعي |
60
+ | `hopital` | 5 | مستشفى عمومي آخر |
61
+
62
+ **حسب دقّة الإحداثيات** (`geo_precision`)
63
+
64
+ | القيمة | العدد | المعنى |
65
+ | --- | --- | --- |
66
+ | `osm_point` | 121 | نقطة دقيقة من مرفق في OpenStreetMap ضمن البلدية |
67
+ | `wikidata_point` | 3 | نقطة دقيقة من مرفق في Wikidata ضمن البلدية |
68
+ | `commune_centroid` | 476 | مركز ثقل بلدية المؤسسة (تقريبي) |
69
+ | `none` | 95 | لم تُربط البلدية — بلا إحداثيات |
70
+
71
+ > **السجل رسمي؛ أما الإحداثيات فأفضل ما أمكن.** الأسماء والنوع والولاية من وزارة
72
+ > الصحة. لا تنشر الوزارة إحداثيات، فيستنتجها GeoAlgeria (انظر *المصدر والمنهجية*).
73
+ > تتغيّر الأعداد مع تحديثات الوزارة وOpenStreetMap وWikidata.
74
+
75
+ ## الصيغ
76
+
77
+ تتضمّن حزمة npm ملف **JSON** (قابل للاستيراد مباشرة):
78
+
79
+ ```js
80
+ import sante from "@geoalgeria/sante/data/sante.json" with { type: "json" };
81
+ // أو عبر CDN، دون تثبيت:
82
+ // https://cdn.jsdelivr.net/npm/@geoalgeria/sante/data/sante.json
83
+ ```
84
+
85
+ المُحمِّلات وبنية السجلات **مُوثَّقة الأنواع** بالكامل — تعريفات TypeScript مرفقة في الحزمة:
86
+
87
+ ```ts
88
+ import sante, { type HealthEstablishment } from "@geoalgeria/sante";
89
+ const all: HealthEstablishment[] = sante.sante();
90
+ ```
91
+
92
+ ملفّا **CSV وGeoJSON** موجودان في المستودع ضمن [`data/`](data) ومُرفقان في كل
93
+ [إصدار على GitHub](https://github.com/yasserstudio/geoalgeria/releases):
94
+
95
+ ```
96
+ data/
97
+ sante.json # 695 مؤسسة (مصفوفة)
98
+ metadata.json # المصادر، الأعداد، التغطية، generated_at
99
+ csv/sante.csv # المستودع + الإصدار (ليس في حزمة npm)
100
+ geojson/sante.geojson # معالم نقطية (السجلات ذات الإحداثيات)
101
+ ```
102
+
103
+ ## بنية السجل
104
+
105
+ ```json
106
+ {
107
+ "id": "01-ehs-02",
108
+ "name": "Etablissement Hospitalier Spécialisé Psychiatrie Adrar",
109
+ "name_ar": "المؤسسة الاستشفائية المتخصصة في الأمراض العقلية أدرار",
110
+ "name_fr": "Etablissement Hospitalier Spécialisé Psychiatrie Adrar",
111
+ "type": "ehs",
112
+ "type_label_fr": "Établissement Hospitalier Spécialisé",
113
+ "type_label_ar": "المؤسسة الاستشفائية المتخصصة",
114
+ "sector": "public",
115
+ "wilaya": "Adrar",
116
+ "wilaya_ar": "أدرار",
117
+ "wilaya_code": "01",
118
+ "commune": "Adrar",
119
+ "commune_code": 101,
120
+ "source": "msp+osm",
121
+ "geo_precision": "osm_point",
122
+ "wikidata": null,
123
+ "osm_id": "way/432370657",
124
+ "msp_id": 3588,
125
+ "slug": "etablissement-hospitalier-specialise-psychiatrie-adrar",
126
+ "lat": 27.875834,
127
+ "lng": -0.307533
128
+ }
129
+ ```
130
+
131
+ `id` مفتاح ثابت `{wilaya_code}-{type}-{seq}` يولّده GeoAlgeria (لا تنشر الوزارة
132
+ رمزًا). `name` هو الاسم الفرنسي إن وُجد، وإلا العربي. يُشتقّ `type` من العنوان،
133
+ و`wilaya` من وسم الوزارة. `sector` يساوي `"public"` لكامل سجل الوزارة (العيادات
134
+ الخاصة، عند إضافتها، ستحمل `"private"`). يبيّن `source` السجلات المساهِمة، و
135
+ `geo_precision` مصدر الإحداثية. تكون `lat`/`lng` بقيمة `null` للسجلات الـ95 التي
136
+ تعذّر ربط بلديتها.
137
+
138
+ > **الإحداثيات والبلدية مُستنتَجة وليست من الوزارة.** تَسرد وزارة الصحة الأسماء
139
+ > والنوع والولاية فقط. يربط GeoAlgeria موقع كل مؤسسة ببلدية من مجموعة
140
+ > [`geoalgeria`](https://www.npmjs.com/package/geoalgeria) ضمن ولايتها
141
+ > (`commune` و`commune_code` ومركز ثقل)، ثم يرفع الإحداثية إلى نقطة دقيقة عندما
142
+ > يوجد مستشفى أو عيادة في OpenStreetMap أو Wikidata ضمن البلدية نفسها. الولاية
143
+ > دقيقة؛ أما البلدية والإحداثيات فتقريبية.
144
+
145
+ ## تحتاج التقسيمات الإدارية أيضًا؟
146
+
147
+ للولايات والدوائر والبلديات، استخدم الحزمة الرئيسية
148
+ **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** — بها تحوّل
149
+ `commune_code` لمؤسسةٍ ما إلى مضلّع أو مركز ثقل. استخدم `@geoalgeria/sante` عندما
150
+ تحتاج المؤسسات الصحية *فقط*.
151
+
152
+ ## المصدر والمنهجية
153
+
154
+ شغّل `npm run fetch` لإعادة توليد المخرجات. يقوم السكربت بـ:
155
+
156
+ 1. سحب سجل مؤسسات **وزارة الصحة** من واجهة WordPress REST في `sante.gov.dz`
157
+ (`healthinstitution`)، بالفرنسية والعربية، كلٌّ موسوم بولايته؛
158
+ 2. اشتقاق **النوع** من كل عنوان و**مزاوجة** البطاقتين الفرنسية والعربية في سجلٍ
159
+ ثنائي اللغة؛
160
+ 3. ربط **الموقع ببلدية** من مجموعة `geoalgeria` ضمن ولايته (`commune` و
161
+ `commune_code` ومركز ثقل)؛
162
+ 4. استعلام **Wikidata** (SPARQL، المستشفيات) و**OpenStreetMap** (Overpass،
163
+ `amenity=hospital`/`clinic`، `healthcare=*`) و**رفع** الإحداثية إلى نقطة دقيقة
164
+ عند وجود واحدة ضمن البلدية.
165
+
166
+ تُحفظ عمليات السحب الخام ضمن
167
+ [`research/sante/`](https://github.com/yasserstudio/geoalgeria/tree/main/research/sante).
168
+
169
+ ## الترخيص والإسناد
170
+
171
+ **شيفرة** الحزمة بترخيص [MIT](LICENSE). أما **البيانات** فهي تجميع:
172
+
173
+ - سجل **وزارة الصحة** (الأسماء والنوع والولاية) قائمة واقعية للقطاع العام.
174
+ - **الإحداثيات** مُستنتَجة من **Wikidata** (**CC0**، ملك عام) ومن
175
+ **OpenStreetMap** (**© مساهمو OpenStreetMap**، بترخيص
176
+ **[ODbL 1.0](https://www.openstreetmap.org/copyright)**). عند استخدامك أو إعادة
177
+ نشرك لهذه البيانات يجب **إسناد الفضل لمساهمي OpenStreetMap** وإبقاء القواعد
178
+ المُشتقّة تحت ترخيصٍ متوافق.
179
+
180
+ تحقّق من المصادر الرسمية للمعلومات الموثوقة. تُقدَّم هذه البيانات للمرجعية ولتشغيل
181
+ [GeoAlgeria](https://geoalgeria.com).
182
+
183
+ [توثيق API والحقول →](https://geoalgeria.com/data/docs/sante) · [تصفّح كل الحزم →](https://geoalgeria.com/data)
184
+
185
+ ---
186
+
187
+ من إنجاز [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
package/README.fr.md ADDED
@@ -0,0 +1,198 @@
1
+ [English](README.md) | **Français** | [العربية](README.ar.md)
2
+
3
+ <div align="center">
4
+
5
+ # @geoalgeria/sante
6
+
7
+ **Les établissements de santé publics d'Algérie — sous forme de données prêtes à installer.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@geoalgeria/sante)](https://www.npmjs.com/package/@geoalgeria/sante)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@geoalgeria/sante)](https://www.npmjs.com/package/@geoalgeria/sante)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
+
13
+ </div>
14
+
15
+ **695 établissements de santé publics** dans les **58 wilayas** dotées d'une
16
+ direction de la santé — établissements publics hospitaliers (EPH), de santé de
17
+ proximité (EPSP), hospitaliers spécialisés (EHS) et centres hospitalo-universitaires
18
+ (CHU) du **Ministère de la Santé (MSP)**, bilingues français/arabe, **600
19
+ géolocalisés** via OpenStreetMap et Wikidata avec rattachement commune/wilaya.
20
+ Livré en JSON, CSV, GeoJSON et TypeScript. Fait partie de
21
+ [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
22
+
23
+ ```bash
24
+ npm install @geoalgeria/sante
25
+ ```
26
+
27
+ ```js
28
+ import sante from "@geoalgeria/sante";
29
+
30
+ const all = sante.sante(); // 695 établissements
31
+
32
+ // Hôpitaux publics d'une wilaya (jointure sur le wilaya_code de GeoAlgeria)
33
+ const ephAlger = all.filter((e) => e.wilaya_code === "16" && e.type === "eph");
34
+
35
+ // Uniquement les géolocalisés, prêts pour une carte
36
+ const mappable = all.filter((e) => e.lat != null);
37
+ ```
38
+
39
+ ## Ce que vous pouvez construire
40
+
41
+ - **Localisateurs d'hôpitaux et de cliniques** — des coordonnées sur 600 des 695
42
+ enregistrements, prêtes pour une carte ou une recherche de proximité.
43
+ - **Annuaires de santé bilingues** — noms français et arabe, type officiel et
44
+ wilaya pour chaque établissement.
45
+ - **Analyse de couverture & planification** — compter les établissements par type
46
+ par commune/wilaya sur tout le pays.
47
+
48
+ ## Contenu
49
+
50
+ | Jeu de données | Nombre | Coordonnées | Notes |
51
+ | --- | --- | --- | --- |
52
+ | Établissements de santé | **695** | 600 géolocalisés | 58 wilayas, 563 bilingues |
53
+
54
+ **Par type**
55
+
56
+ | Type | Nombre | Signification |
57
+ | --- | --- | --- |
58
+ | `eph` | 270 | Établissement Public Hospitalier |
59
+ | `epsp` | 292 | Établissement Public de Santé de Proximité |
60
+ | `ehs` | 108 | Établissement Hospitalier Spécialisé |
61
+ | `chu` | 20 | Centre Hospitalo-Universitaire |
62
+ | `hopital` | 5 | autre hôpital public |
63
+
64
+ **Par précision des coordonnées** (`geo_precision`)
65
+
66
+ | Valeur | Nombre | Signification |
67
+ | --- | --- | --- |
68
+ | `osm_point` | 121 | point précis d'un établissement OpenStreetMap dans la commune |
69
+ | `wikidata_point` | 3 | point précis d'un établissement Wikidata dans la commune |
70
+ | `commune_centroid` | 476 | centroïde de la commune de l'établissement (approximatif) |
71
+ | `none` | 95 | localité non rattachée à une commune — pas de coordonnées |
72
+
73
+ > **Le registre est officiel ; les coordonnées sont au mieux.** Les noms, le type
74
+ > et la wilaya proviennent du Ministère de la Santé. Le MSP ne publie pas de
75
+ > coordonnées : GeoAlgeria les dérive (voir *Source & méthode*). Les totaux
76
+ > évoluent au gré des mises à jour du MSP, d'OpenStreetMap et de Wikidata.
77
+
78
+ ## Formats
79
+
80
+ Le paquet npm fournit le **JSON** (importable directement) :
81
+
82
+ ```js
83
+ import sante from "@geoalgeria/sante/data/sante.json" with { type: "json" };
84
+ // ou via CDN, sans installation :
85
+ // https://cdn.jsdelivr.net/npm/@geoalgeria/sante/data/sante.json
86
+ ```
87
+
88
+ Les chargeurs et les enregistrements sont entièrement **typés** — les définitions TypeScript sont incluses :
89
+
90
+ ```ts
91
+ import sante, { type HealthEstablishment } from "@geoalgeria/sante";
92
+ const all: HealthEstablishment[] = sante.sante();
93
+ ```
94
+
95
+ Les **CSV et GeoJSON** sont dans le dépôt sous [`data/`](data) et inclus dans
96
+ chaque [GitHub Release](https://github.com/yasserstudio/geoalgeria/releases) :
97
+
98
+ ```
99
+ data/
100
+ sante.json # 695 établissements (tableau)
101
+ metadata.json # sources, totaux, couverture, generated_at
102
+ csv/sante.csv # dépôt + Release (pas dans le tarball npm)
103
+ geojson/sante.geojson # entités Point (enregistrements géolocalisés)
104
+ ```
105
+
106
+ ## Structure d'un enregistrement
107
+
108
+ ```json
109
+ {
110
+ "id": "01-ehs-02",
111
+ "name": "Etablissement Hospitalier Spécialisé Psychiatrie Adrar",
112
+ "name_ar": "المؤسسة الاستشفائية المتخصصة في الأمراض العقلية أدرار",
113
+ "name_fr": "Etablissement Hospitalier Spécialisé Psychiatrie Adrar",
114
+ "type": "ehs",
115
+ "type_label_fr": "Établissement Hospitalier Spécialisé",
116
+ "type_label_ar": "المؤسسة الاستشفائية المتخصصة",
117
+ "sector": "public",
118
+ "wilaya": "Adrar",
119
+ "wilaya_ar": "أدرار",
120
+ "wilaya_code": "01",
121
+ "commune": "Adrar",
122
+ "commune_code": 101,
123
+ "source": "msp+osm",
124
+ "geo_precision": "osm_point",
125
+ "wikidata": null,
126
+ "osm_id": "way/432370657",
127
+ "msp_id": 3588,
128
+ "slug": "etablissement-hospitalier-specialise-psychiatrie-adrar",
129
+ "lat": 27.875834,
130
+ "lng": -0.307533
131
+ }
132
+ ```
133
+
134
+ `id` est une clé stable `{wilaya_code}-{type}-{seq}` synthétisée par GeoAlgeria
135
+ (le MSP ne publie pas de code). `name` est le nom français s'il existe, sinon
136
+ l'arabe. `type` est déduit du titre ; `wilaya` de l'étiquette du MSP. `sector`
137
+ vaut `"public"` pour tout le registre MSP (les cliniques privées, une fois
138
+ ajoutées, porteront `"private"`). `source` indique les registres ayant
139
+ contribué ; `geo_precision` l'origine de la coordonnée. `lat`/`lng` valent
140
+ `null` pour les 95 enregistrements dont la localité n'a pu être rattachée à une
141
+ commune.
142
+
143
+ > **Les coordonnées et la commune sont dérivées, pas issues du MSP.** Le
144
+ > Ministère de la Santé ne liste que noms, type et wilaya. GeoAlgeria rattache la
145
+ > localité de chaque établissement à une commune du jeu
146
+ > [`geoalgeria`](https://www.npmjs.com/package/geoalgeria) dans sa wilaya
147
+ > (`commune`, `commune_code` et un centroïde), puis remplace la coordonnée par un
148
+ > point précis lorsqu'un hôpital ou une clinique d'OpenStreetMap ou de Wikidata
149
+ > se trouve dans la même commune. La wilaya est exacte ; la commune et les
150
+ > coordonnées sont approximatives.
151
+
152
+ ## Besoin des divisions administratives ?
153
+
154
+ Pour les wilayas, dairas et communes, utilisez le paquet principal
155
+ **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** — c'est ce qui
156
+ transforme le `commune_code` d'un établissement en polygone ou centroïde.
157
+ Utilisez `@geoalgeria/sante` quand vous n'avez besoin *que* des établissements de
158
+ santé.
159
+
160
+ ## Source & méthode
161
+
162
+ Lancez `npm run fetch` pour régénérer les sorties. Le script :
163
+
164
+ 1. récupère le registre des établissements du **Ministère de la Santé** depuis
165
+ l'API REST WordPress de `sante.gov.dz` (`healthinstitution`), en français et
166
+ en arabe, chacun étiqueté par sa wilaya ;
167
+ 2. déduit le **type** de chaque titre et **apparie** les fiches française et
168
+ arabe en un enregistrement bilingue ;
169
+ 3. rattache la **localité à une commune** du jeu `geoalgeria` dans sa wilaya
170
+ (`commune`, `commune_code` et un centroïde) ;
171
+ 4. interroge **Wikidata** (SPARQL, hôpitaux) et **OpenStreetMap** (Overpass,
172
+ `amenity=hospital`/`clinic`, `healthcare=*`) et **remplace** la coordonnée par
173
+ un point précis lorsqu'il s'en trouve un dans la commune.
174
+
175
+ Les extractions brutes sont mises en cache sous
176
+ [`research/sante/`](https://github.com/yasserstudio/geoalgeria/tree/main/research/sante).
177
+
178
+ ## Licence & attribution
179
+
180
+ Le **code** du paquet est sous [MIT](LICENSE). Les **données** sont un composite :
181
+
182
+ - Le registre du **Ministère de la Santé** (noms, type, wilaya) est une liste
183
+ factuelle du secteur public.
184
+ - Les **coordonnées** sont dérivées de **Wikidata** (**CC0**, domaine public) et
185
+ d'**OpenStreetMap** (**© les contributeurs d'OpenStreetMap**, sous licence
186
+ **[ODbL 1.0](https://www.openstreetmap.org/copyright)**). Si vous utilisez ou
187
+ redistribuez ce jeu de données, vous devez **attribuer aux contributeurs
188
+ d'OpenStreetMap** et conserver les bases dérivées sous une licence compatible.
189
+
190
+ Vérifiez auprès des sources officielles pour toute information faisant foi. Ce jeu
191
+ de données est fourni à titre de référence et pour alimenter
192
+ [GeoAlgeria](https://geoalgeria.com).
193
+
194
+ [Docs API & champs →](https://geoalgeria.com/data/docs/sante) · [Tous les paquets →](https://geoalgeria.com/data)
195
+
196
+ ---
197
+
198
+ Réalisé par [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
package/README.md ADDED
@@ -0,0 +1,194 @@
1
+ **English** | [Français](README.fr.md) | [العربية](README.ar.md)
2
+
3
+ <div align="center">
4
+
5
+ # @geoalgeria/sante
6
+
7
+ **Algeria's public health establishments — as data you can install.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@geoalgeria/sante)](https://www.npmjs.com/package/@geoalgeria/sante)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@geoalgeria/sante)](https://www.npmjs.com/package/@geoalgeria/sante)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
+
13
+ </div>
14
+
15
+ **695 public health establishments** across all **58 wilayas** with health
16
+ directorates — public hospitals (EPH), proximity-health establishments (EPSP),
17
+ specialized hospitals (EHS) and university hospitals (CHU) from the **Ministère
18
+ de la Santé (MSP)**, bilingual French/Arabic, **600 geocoded** via OpenStreetMap
19
+ and Wikidata with commune/wilaya linkage. Shipped as JSON, CSV, GeoJSON, and
20
+ TypeScript. Part of [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
21
+
22
+ ```bash
23
+ npm install @geoalgeria/sante
24
+ ```
25
+
26
+ ```js
27
+ import sante from "@geoalgeria/sante";
28
+
29
+ const all = sante.sante(); // 695 establishments
30
+
31
+ // Public hospitals in a wilaya (joins GeoAlgeria's wilaya_code)
32
+ const ephAlger = all.filter((e) => e.wilaya_code === "16" && e.type === "eph");
33
+
34
+ // Only the geocoded ones, ready to map
35
+ const mappable = all.filter((e) => e.lat != null);
36
+ ```
37
+
38
+ ## What you can build
39
+
40
+ - **Hospital & clinic locators** — coordinates on 600 of 695 records, ready for a
41
+ map or nearest-facility search.
42
+ - **Bilingual health directories** — French and Arabic names, official type and
43
+ wilaya for every establishment.
44
+ - **Coverage & planning analysis** — count establishments by type per
45
+ commune/wilaya across the whole country.
46
+
47
+ ## What's inside
48
+
49
+ | Dataset | Count | Coordinates | Notes |
50
+ | --- | --- | --- | --- |
51
+ | Health establishments | **695** | 600 geocoded | 58 wilayas, 563 bilingual |
52
+
53
+ **By type**
54
+
55
+ | Type | Count | Meaning |
56
+ | --- | --- | --- |
57
+ | `eph` | 270 | Établissement Public Hospitalier — public hospital |
58
+ | `epsp` | 292 | Établissement Public de Santé de Proximité — proximity health |
59
+ | `ehs` | 108 | Établissement Hospitalier Spécialisé — specialized hospital |
60
+ | `chu` | 20 | Centre Hospitalo-Universitaire — university hospital |
61
+ | `hopital` | 5 | other public hospital |
62
+
63
+ **By coordinate precision** (`geo_precision`)
64
+
65
+ | Value | Count | Meaning |
66
+ | --- | --- | --- |
67
+ | `osm_point` | 121 | precise point from an OpenStreetMap facility in the commune |
68
+ | `wikidata_point` | 3 | precise point from a Wikidata facility in the commune |
69
+ | `commune_centroid` | 476 | the establishment's commune centroid (approximate) |
70
+ | `none` | 95 | locality not resolved to a commune — no coordinates |
71
+
72
+ > **The registry is official; the coordinates are best-effort.** Names, type and
73
+ > wilaya come from the Ministère de la Santé. The MSP publishes no coordinates,
74
+ > so GeoAlgeria derives them — see *Source & method* below. Counts move as the
75
+ > MSP, OpenStreetMap and Wikidata are edited; each rebuild reflects their current
76
+ > state.
77
+
78
+ ## Formats
79
+
80
+ The npm package ships the **JSON** (importable directly):
81
+
82
+ ```js
83
+ import sante from "@geoalgeria/sante/data/sante.json" with { type: "json" };
84
+ // or via CDN, no install:
85
+ // https://cdn.jsdelivr.net/npm/@geoalgeria/sante/data/sante.json
86
+ ```
87
+
88
+ The loaders and record shapes are fully **typed** — TypeScript definitions ship in the package:
89
+
90
+ ```ts
91
+ import sante, { type HealthEstablishment } from "@geoalgeria/sante";
92
+ const all: HealthEstablishment[] = sante.sante();
93
+ ```
94
+
95
+ **CSV and GeoJSON** are in the repo under [`data/`](data) and bundled in every
96
+ [GitHub Release](https://github.com/yasserstudio/geoalgeria/releases):
97
+
98
+ ```
99
+ data/
100
+ sante.json # 695 establishments (array)
101
+ metadata.json # sources, counts, coverage, generated_at
102
+ csv/sante.csv # repo + Release bundle (not in npm tarball)
103
+ geojson/sante.geojson # Point features (geocoded records only)
104
+ ```
105
+
106
+ ## Record shape
107
+
108
+ ```json
109
+ {
110
+ "id": "01-ehs-02",
111
+ "name": "Etablissement Hospitalier Spécialisé Psychiatrie Adrar",
112
+ "name_ar": "المؤسسة الاستشفائية المتخصصة في الأمراض العقلية أدرار",
113
+ "name_fr": "Etablissement Hospitalier Spécialisé Psychiatrie Adrar",
114
+ "type": "ehs",
115
+ "type_label_fr": "Établissement Hospitalier Spécialisé",
116
+ "type_label_ar": "المؤسسة الاستشفائية المتخصصة",
117
+ "sector": "public",
118
+ "wilaya": "Adrar",
119
+ "wilaya_ar": "أدرار",
120
+ "wilaya_code": "01",
121
+ "commune": "Adrar",
122
+ "commune_code": 101,
123
+ "source": "msp+osm",
124
+ "geo_precision": "osm_point",
125
+ "wikidata": null,
126
+ "osm_id": "way/432370657",
127
+ "msp_id": 3588,
128
+ "slug": "etablissement-hospitalier-specialise-psychiatrie-adrar",
129
+ "lat": 27.875834,
130
+ "lng": -0.307533
131
+ }
132
+ ```
133
+
134
+ `id` is a stable `{wilaya_code}-{type}-{seq}` key synthesized by GeoAlgeria (the
135
+ MSP publishes no establishment code). `name` is the French name where available,
136
+ else Arabic. `type` is derived from the establishment's title; `wilaya` from the
137
+ MSP's wilaya tag. `sector` is `"public"` for the whole MSP registry (private
138
+ clinics, when added, will carry `"private"`). `source` records which registries
139
+ contributed; `geo_precision` records where the coordinate came from. `lat`/`lng`
140
+ are `null` for the 95 records whose locality could not be matched to a commune.
141
+
142
+ > **Coordinates and commune are derived, not from the MSP.** The Ministère de la
143
+ > Santé lists names, type and wilaya only. GeoAlgeria matches each
144
+ > establishment's locality to the [`geoalgeria`](https://www.npmjs.com/package/geoalgeria)
145
+ > commune set within its wilaya (giving `commune`, `commune_code` and a centroid
146
+ > coordinate), then upgrades the coordinate to a precise point where a hospital
147
+ > or clinic in OpenStreetMap or Wikidata sits in that same commune. Wilaya is
148
+ > exact; commune and coordinates are best-effort.
149
+
150
+ ## Need the administrative divisions too?
151
+
152
+ For wilayas, dairas, and communes, use the main
153
+ **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** package — it's how
154
+ you turn an establishment's `commune_code` into a polygon or centroid. Use
155
+ `@geoalgeria/sante` when you *only* need the health establishments.
156
+
157
+ ## Source & method
158
+
159
+ Run `npm run fetch` to regenerate every output. It:
160
+
161
+ 1. pulls the **Ministère de la Santé** establishment registry from the
162
+ `sante.gov.dz` WordPress REST API (`healthinstitution`), in French and Arabic,
163
+ each tagged with its wilaya;
164
+ 2. derives the **type** from each title and **pairs** the French and Arabic posts
165
+ into one bilingual record;
166
+ 3. matches each establishment's **locality to a commune** in the `geoalgeria`
167
+ set within its wilaya, attaching `commune`, `commune_code` and a centroid;
168
+ 4. queries **Wikidata** (SPARQL, hospitals) and **OpenStreetMap** (Overpass,
169
+ `amenity=hospital`/`clinic`, `healthcare=*`) and **upgrades** the coordinate
170
+ to a precise point where one sits in the establishment's commune.
171
+
172
+ Raw source pulls are cached under
173
+ [`research/sante/`](https://github.com/yasserstudio/geoalgeria/tree/main/research/sante).
174
+
175
+ ## License & attribution
176
+
177
+ Package **code** is [MIT](LICENSE). The **data** is a composite:
178
+
179
+ - The **Ministère de la Santé** registry (names, type, wilaya) is a factual
180
+ public-sector listing.
181
+ - **Coordinates** are derived from **Wikidata** (**CC0**, public domain) and
182
+ **OpenStreetMap** (**© OpenStreetMap contributors**, licensed under the
183
+ **[ODbL 1.0](https://www.openstreetmap.org/copyright)**). If you use or
184
+ redistribute this dataset, you must **attribute OpenStreetMap contributors**
185
+ and keep derived databases under a compatible license.
186
+
187
+ Verify against official sources for authoritative information. This dataset is
188
+ provided for reference and to power [GeoAlgeria](https://geoalgeria.com).
189
+
190
+ [API docs & field reference →](https://geoalgeria.com/data/docs/sante) · [Browse all packages →](https://geoalgeria.com/data)
191
+
192
+ ---
193
+
194
+ Made by [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)