Le pipeline produit un JSON riche pendant l'exécution (ratios
checkbox, OCR raw, flags _parse_error/_truncated_loop/_crop_recodage,
_source, _elapsed_s…). Utile en audit, mais pollue quand on veut
exposer le résultat à un consommateur aval (Excel, dashboard, API).
pipeline/schema.py :
- SCHEMA_VERSION "2.0"
- clean_dossier(raw) : retourne une copie propre avec structure stable
(en-tête → codage → GHM/GHS → décisions) et validation ATIH en
format compact (summary + cross_checks + flags par champ).
- CLEAN_FIELDS_RECUEIL / CLEAN_FIELDS_CONCERTATION_{1,2} / CLEAN_FIELDS_PREUVES
documentent les champs stables par type de page.
- CLI : `python -m pipeline.schema` → nettoie `output/v2/*.json` vers
`output/v2_clean/`.
Séparation claire : `output/v2/` reste le JSON raw (audit), `output/v2_clean/`
est la sortie propre et stable pour livrables.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
270 lines
8.4 KiB
JSON
270 lines
8.4 KiB
JSON
{
|
|
"fichier": "OGC 69",
|
|
"pdf_hash": "75cf0c18f2090864",
|
|
"schema_version": "2.0",
|
|
"extraction": {
|
|
"recueil": {
|
|
"etablissement": "CLINIQUE D'ARCACHON",
|
|
"finess": "330780206",
|
|
"date_debut_controle": "13/02/2018",
|
|
"n_ogc": "69",
|
|
"n_champ": "1",
|
|
"dates_sejour": "10/04/2016 au 13/04/2016",
|
|
"sejour_etab": {
|
|
"age": "87",
|
|
"sexe": "2",
|
|
"duree_sejour": "3",
|
|
"mode_entree": "8",
|
|
"provenance": "",
|
|
"mode_sortie": "8",
|
|
"destination": ""
|
|
},
|
|
"sejour_reco": {
|
|
"age": "87",
|
|
"sexe": "2",
|
|
"duree_sejour": "3",
|
|
"mode_entree": "8",
|
|
"provenance": "",
|
|
"mode_sortie": "8",
|
|
"destination": ""
|
|
},
|
|
"rum_etab": {
|
|
"um": "UM",
|
|
"igs": "IGS II",
|
|
"duree": "3",
|
|
"dates": "du 10/04/2016 au 13/04/2016"
|
|
},
|
|
"codage_etab": {
|
|
"dp": "K623",
|
|
"dp_libelle": "PROPLAPUS RECTAL",
|
|
"dr": "G20",
|
|
"das": []
|
|
},
|
|
"codage_reco": {
|
|
"dp": "",
|
|
"dr": "",
|
|
"das": []
|
|
},
|
|
"actes_etab": [],
|
|
"actes_reco": [],
|
|
"ghm_etab": "1948",
|
|
"ghs_etab": "06C072",
|
|
"ghm_reco": "1947",
|
|
"ghs_reco": "06C071",
|
|
"recodage_impactant": "1",
|
|
"ghs_injustifie": "",
|
|
"accord_desaccord": "accord",
|
|
"praticien_conseil": "DR VIGNAU",
|
|
"_validation": {
|
|
"summary": {
|
|
"valid": 2,
|
|
"invalid": 4,
|
|
"empty": 2,
|
|
"total_codes": 6,
|
|
"ghm_ghs_incoherents": 0
|
|
},
|
|
"codage_etab": {
|
|
"dp": {
|
|
"valid": true,
|
|
"libelle_ref": "Prolapsus rectal"
|
|
},
|
|
"dr": {
|
|
"valid": true,
|
|
"libelle_ref": "Maladie de Parkinson"
|
|
},
|
|
"das": []
|
|
},
|
|
"codage_reco": {
|
|
"dp": {
|
|
"valid": null
|
|
},
|
|
"dr": {
|
|
"valid": null
|
|
},
|
|
"das": []
|
|
},
|
|
"ghm_etab": {
|
|
"valid": false
|
|
},
|
|
"ghs_etab": {
|
|
"valid": false
|
|
},
|
|
"ghm_reco": {
|
|
"valid": false
|
|
},
|
|
"ghs_reco": {
|
|
"valid": false
|
|
},
|
|
"cross_checks": {
|
|
"etab_ghm_ghs_coherent": null,
|
|
"reco_ghm_ghs_coherent": null
|
|
}
|
|
}
|
|
},
|
|
"concertation_2": {
|
|
"ghs_initial": "1948",
|
|
"ghs_avant_concertation": "1947",
|
|
"ghs_final": "1947",
|
|
"decision": "",
|
|
"date_concertation": "13-02",
|
|
"praticien_controleur": "DR VIGNAU",
|
|
"medecin_dim": "DR ETTORCHI-TARDY",
|
|
"_validation": {
|
|
"ghs_initial": {
|
|
"code": "1948",
|
|
"valid": true
|
|
},
|
|
"ghs_avant_concertation": {
|
|
"code": "1947",
|
|
"valid": true
|
|
},
|
|
"ghs_final": {
|
|
"code": "1947",
|
|
"valid": true
|
|
}
|
|
}
|
|
},
|
|
"concertation_1": {
|
|
"date_concertation": "1 - 3 - 18",
|
|
"argumentaire": "104 : La facturation du GHS par l'établissement n'est pas conforme à l'article 1 de l'arrêté du 19 février 2015 modifié du fait d'un non-respect des règles de codage édictées dans l'annexe II de l'arrêté du 21 décembre 2015 modifiant l'arrêté du 22 février 2008. Le non-respect des règles porte sur un diagnostic associé significatif (DAS) codé par l'établissement dans le résumé d'unité médicale (RUM). Ce DAS n'est pas conforme aux règles de codage des diagnostics rappelées par l'annexe II, chapitre IV, paragraphe 2.1 : « Un diagnostic associé est significatif s'il est pris en charge à titre diagnostique ou thérapeutique ou s'il majoré l'effort de prise en charge d'une autre affection. Par prise en charge diagnostique on entend la mise en œuvre de moyens nécessaires au diagnostic d'une affection nouvelle ou au « bilan » d'une affection préexistante. Par prise en charge thérapeutique on entend la réalisation d'un traitement. Par majoration de l'effort de prise en charge d'une autre affection on entend l'augmentation imposée par une affection B de l'effort de soins relatif à une affection A enregistrée comme diagnostic principal (DP), diagnostic relié (DR) ou DAS, par rapport à ce qu'il aurait dû être en l'absence de B. Si l'affection B, quoique non prise en charge à titre diagnostique ou thérapeutique, a néanmoins alourdi la prise en charge de A, alors B est un DAS. (...) Ne doivent pas être retenues comme significatives les affections ne respectant pas la définition, par exemple, les antécédents guéris, les maladies stabilisées ou les facteurs de risque n'ayant bénéficié d'aucune prise en charge ». Au vu des éléments du dossier du patient, le DAS choisi par l'établissement ne peut pas être codé, ce diagnostic associé n'ayant nécessité aucune prise en charge documentée au dossier."
|
|
},
|
|
"preuves": {
|
|
"date": "2017",
|
|
"praticien_controleur": [
|
|
"Dr RADZIKOWSKI",
|
|
"Dr DELAYE-PHULPIN",
|
|
"Dr TURBAN",
|
|
"Dr DUVAL",
|
|
"Dr VIGNAU",
|
|
"Dr PROMAX"
|
|
],
|
|
"medecin_dim": "Dr ETTORCHI-TARDY",
|
|
"pieces": [
|
|
{
|
|
"intitule": "Compte-rendu d'acte",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Compte-rendu opératoire",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Compte-rendu d'accouchement",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Compte-rendu d'examen complémentaire",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Compte-rendu d'imagerie",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Compte-rendu d'anatomopathologie",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Observations médicales",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Dossier de transfusion",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Dossier d'anesthésie",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Administration thérapeutique",
|
|
"present": true,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Compte-rendu d'hospitalisation",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Lettre de sortie",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Eléments de surveillance du dossier infirmier",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Prise en charge psychologue",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Prise en charge kinésithérapeute",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Prise en charge diététique",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
},
|
|
{
|
|
"intitule": "Autre",
|
|
"present": false,
|
|
"photocopie": false,
|
|
"absent_date": "",
|
|
"date_obtention": ""
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"_meta": {
|
|
"pipeline_version": "v1",
|
|
"ocr_model": "zai-org/GLM-OCR",
|
|
"generated_at": "2026-04-24T12:15:13+00:00"
|
|
}
|
|
} |