البنية الصحية الخاصة
معلومة مهمة. الرعاية الأولية: سجل 2024 مع تأكيدات جزئية في 2026. البنية الخاصة: أرقام 2024؛ لا تجمع الإجمالي الوطني مع الأرقام الجهوية.
فهم الإجابة
data: النتائج المطلوبة، في كائن أو قائمة.
meta: مصادر البيانات ورخصتها وتواريخها. تعني null أن القيمة غير معروفة أو غير متاحة.
meta.pagination: القوائم: 100 نتيجة افتراضياً، و500 كحد أقصى. استخدم limit وoffset؛ تكون meta.pagination.next_offset بقيمة null في الصفحة الأخيرة.
مثال توضيحي: مع limit=10 وoffset=0 تتضمن الصفحة الأولى 10 نتائج على الأكثر. إذا كانت next_offset تساوي 10، اطلب التالية بـoffset=10 والمرشحات نفسها. توقف عندما تصبح next_offset بقيمة null.
API v2 هو المسار المرجعي. تبقى مسارات /api/v1 القديمة أسماء بديلة متوافقة مع السلوك المنشور حالياً، بما فيه تقسيم الصفحات؛ لم يُحدد موعد لحذفها.
حقول الإجابة 13
تشير [] إلى كل عنصر في القائمة. تعني null غير معروف أو غير متاح، ولا تعني صفراً. لغة الدليل لا تترجم قيم المصادر.
dataobject[]النتيجة المطلوبة: كائن واحد أو قائمة.
data[].geographic_levelstringnational للمغرب كله، وregion لجهة واحدة. لا تجمع أرقام المستويين.
القيم المقبولة:
"national""region"data[].region_codestring | nullمعرّف الجهة؛ null للسطر الذي يمثل المغرب كله.
data[].reference_yearintegerالسنة التي تصفها الأرقام أو السجل، وهي مستقلة عن تاريخ النشر والجلب.
data[].clinicsinteger | nullعدد المؤسسات الخاصة من نوع المصحات. تعني null عدم نشر تفصيل لهذا المستوى.
data[].dental_practicesinteger | nullعدد المؤسسات الخاصة من نوع عيادات طب الأسنان. تعني null عدم نشر تفصيل لهذا المستوى.
data[].medical_practicesinteger | nullعدد المؤسسات الخاصة من نوع العيادات الطبية. تعني null عدم نشر تفصيل لهذا المستوى.
data[].radiology_practicesinteger | nullعدد المؤسسات الخاصة من نوع عيادات الأشعة. تعني null عدم نشر تفصيل لهذا المستوى.
data[].hemodialysis_centresinteger | nullعدد المؤسسات الخاصة من نوع مراكز تصفية الدم. تعني null عدم نشر تفصيل لهذا المستوى.
data[].physiotherapy_centresinteger | nullعدد المؤسسات الخاصة من نوع مراكز العلاج الطبيعي. تعني null عدم نشر تفصيل لهذا المستوى.
data[].analysis_laboratoriesinteger | nullعدد المؤسسات الخاصة من نوع مختبرات التحاليل. تعني null عدم نشر تفصيل لهذا المستوى.
data[].pharmaciesinteger | nullعدد المؤسسات الخاصة من نوع الصيدليات. تعني null عدم نشر تفصيل لهذا المستوى.
data[].infirmariesinteger | nullعدد المؤسسات الخاصة من نوع عيادات التمريض. تعني null عدم نشر تفصيل لهذا المستوى.
بنية البيانات
{
"type": "object",
"additionalProperties": false,
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"geographic_level",
"region_code",
"reference_year",
"clinics",
"dental_practices",
"medical_practices",
"radiology_practices",
"hemodialysis_centres",
"physiotherapy_centres",
"analysis_laboratories",
"pharmacies",
"infirmaries"
],
"properties": {
"geographic_level": {
"type": "string",
"enum": [
"national",
"region"
]
},
"region_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "MoroccoAPI region code, or null for the national aggregate."
},
"reference_year": {
"type": "integer",
"description": "Year described by the counts, not the publication or retrieval year."
},
"clinics": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"dental_practices": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"medical_practices": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"radiology_practices": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"hemodialysis_centres": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"physiotherapy_centres": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"analysis_laboratories": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"pharmacies": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
},
"infirmaries": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Number of private establishments. Null means no published breakdown for this geographic level."
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"total",
"license",
"retrieved_at",
"transformation_version",
"sources",
"pagination"
],
"properties": {
"dataset": {
"enum": [
"private-infrastructure"
]
},
"total": {
"type": "integer",
"minimum": 0
},
"license": {
"enum": [
"ODbL-1.0"
]
},
"retrieved_at": {
"enum": [
"2026-10-06"
]
},
"transformation_version": {
"enum": [
"1.0.0"
]
},
"sources": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"producer",
"source_url",
"resource_url",
"license",
"source_updated_at"
],
"properties": {
"dataset": {
"type": "string"
},
"producer": {
"type": "string"
},
"source_url": {
"type": "string",
"format": "uri"
},
"resource_url": {
"type": "string",
"format": "uri"
},
"license": {
"enum": [
"ODbL-1.0",
"CC-BY-4.0"
]
},
"source_updated_at": {
"type": "string",
"format": "date"
}
}
}
},
"pagination": {
"type": "object",
"additionalProperties": false,
"required": [
"limit",
"offset",
"count",
"has_more",
"next_offset"
],
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 500
},
"has_more": {
"type": "boolean"
},
"next_offset": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
}
}
}
}
}المصادر وتقسيم الصفحات 19
metaobjectسياق النتيجة: المصادر والتواريخ والرخصة وتقسيم الصفحات عند الاقتضاء.
meta.datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
القيم المقبولة:
"private-infrastructure"meta.totalintegerعدد النتائج المطابقة للمرشحات قبل تقسيم الصفحات؛ وليس حجم هذه الصفحة.
meta.licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"ODbL-1.0"meta.retrieved_atstringتاريخ جلب المشروع لملف المصدر؛ وليس تاريخ رصد البيانات.
القيم المقبولة:
"2026-10-06"meta.transformation_versionstringإصدار قواعد تحويل مجموعة البيانات؛ مستقل عن إصدار الواجهة.
القيم المقبولة:
"1.0.0"meta.sourcesobject[]المصادر المستخدمة لهذه النتيجة مع الجهات المنتجة والرخص.
meta.sources[].datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
meta.sources[].producerstringالجهة التي تنشر البيانات الأصلية.
meta.sources[].source_urlstringصفحة نشر المصدر أو التعريف ببياناته.
meta.sources[].resource_urlstringرابط الملف أو المورد المستخدم فعلياً.
meta.sources[].licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"ODbL-1.0""CC-BY-4.0"meta.sources[].source_updated_atstringآخر تحديث معلن من المصدر؛ وليس تاريخ جلب الملف.
meta.paginationobjectمعلومات لتصفّح نتائج القائمة صفحة بصفحة.
meta.pagination.limitintegerالعدد الأقصى المطلوب في الصفحة: 100 افتراضياً و500 كحد أقصى.
meta.pagination.offsetintegerعدد النتائج المتجاوزة قبل هذه الصفحة بعد التصفية. تبدأ الصفحة الأولى من 0.
meta.pagination.countintegerعدد النتائج الموجودة فعلياً في هذه الصفحة.
meta.pagination.has_morebooleanتكون true إذا بقيت صفحة أخرى من النتائج.
meta.pagination.next_offsetinteger | nullقيمة offset للصفحة التالية؛ null عند النهاية. احتفظ بالمرشحات نفسها.
الأخطاء
400: معامل غير صالح أو مفقود.
تتضمن الأخطاء error.code وerror.message وerror.request_id.
errorobjectتفاصيل الطلب الفاشل؛ تحل محل data وmeta.
error.codestringرمز ثابت للخطأ، مثل RESOURCE_NOT_FOUND؛ استعمله في منطق التطبيق.
error.messagestringشرح مقروء للخطأ؛ استعمل code في منطق التطبيق.
error.request_idstringمعرّف هذا الطلب، يفيد عند الإبلاغ عن مشكلة.