Scénario de test & Cas d'usage
Création de notes médicales simulées et de tables de modèle vides (placeholders) pour permettre l'exécution syntaxique.
| 1 | |
| 2 | DATA casuser.clinical_notes; |
| 3 | LENGTH text $200; |
| 4 | doc_id=1; |
| 5 | text='Le patient prend 100mg d''Aspirine matin et soir.'; |
| 6 | OUTPUT; |
| 7 | doc_id=2; |
| 8 | text='Prescription : Doliprane 1000mg en cas de fièvre.'; |
| 9 | OUTPUT; |
| 10 | |
| 11 | RUN; |
| 12 | /* Création de tables de modèle factices pour l'exemple */ |
| 13 | DATA casuser.model_label; |
| 14 | x=1; |
| 15 | |
| 16 | RUN; |
| 17 | |
| 18 | DATA casuser.model_attr; |
| 19 | x=1; |
| 20 | |
| 21 | RUN; |
| 22 | |
| 23 | DATA casuser.model_feature; |
| 24 | x=1; |
| 25 | |
| 26 | RUN; |
| 27 | |
| 28 | DATA casuser.model_attrfeature; |
| 29 | x=1; |
| 30 | |
| 31 | RUN; |
| 32 | |
| 33 | DATA casuser.model_template; |
| 34 | x=1; |
| 35 | |
| 36 | RUN; |
| 37 |
| 1 | |
| 2 | PROC CAS; |
| 3 | conditionalRandomFields.crfScore / TABLE={name='clinical_notes', caslib='casuser'} model={ label={name='model_label', caslib='casuser'}, attr={name='model_attr', caslib='casuser'}, feature={name='model_feature', caslib='casuser'}, attrfeature={name='model_attrfeature', caslib='casuser'}, template={name='model_template', caslib='casuser'} } casOut={name='tagged_notes', caslib='casuser', replace=true} target='medical_entity_tag'; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.fetch / TABLE={name='tagged_notes', caslib='casuser'} fetchVars={'doc_id', 'medical_entity_tag'}; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
L'action doit s'exécuter sans erreur (rc=0). La table de sortie 'tagged_notes' doit être créée et contenir la colonne cible 'medical_entity_tag' avec les séquences d'étiquettes prédites pour chaque token des phrases médicales.