Scénario de test & Cas d'usage
Creación de notas clínicas simuladas con menciones de síntomas y medicamentos.
| 1 | DATA casuser.medical_notes; LENGTH _doc_id_ $20 _text_ $300; INFILE DATALINES delimiter='|'; INPUT _doc_id_ $ _text_ $; DATALINES; |
| 2 | PAT_001|El paciente presenta fiebre alta y tos severa. Se receta Ibuprofeno 400mg. |
| 3 | PAT_002|Sin síntomas de alergia. Continuar con Amoxicilina. |
| 4 | ; RUN; |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.loadTable / path='med_label.csv' casOut={name='med_label', replace=true}; |
| 4 | TABLE.loadTable / path='med_attr.csv' casOut={name='med_attr', replace=true}; |
| 5 | TABLE.loadTable / path='med_feature.csv' casOut={name='med_feature', replace=true}; |
| 6 | TABLE.loadTable / path='med_attrfeature.csv' casOut={name='med_attrfeature', replace=true}; |
| 7 | TABLE.loadTable / path='med_template.csv' casOut={name='med_template', replace=true}; |
| 8 | |
| 9 | RUN; |
| 10 |
| 1 | |
| 2 | PROC CAS; |
| 3 | conditionalRandomFields.crfScore TABLE={name='medical_notes'} model={label={name='med_label'}, attr={name='med_attr'}, feature={name='med_feature'}, attrfeature={name='med_attrfeature'}, template={name='med_template'}} casOut={name='medical_tagged', replace=true} target='entity_tag'; |
| 4 | |
| 5 | RUN; |
| 6 |
La tabla 'medical_tagged' contiene las notas originales desglosadas por tokens, con una columna 'entity_tag' que identifica 'fiebre' como 'SINTOMA' e 'Ibuprofeno' como 'MEDICAMENTO'.