Ingrediente canônico versus texto publicado#
active_ingredient_text em um medicamento é um campo textual. Não é um UUID de ActiveIngredient e não confirma sozinho um vínculo estruturado. GET /v1/ingredients/{id} exige um UUID real de ingrediente canônico obtido de um vínculo aprovado do catálogo.
Consulta pelo identificador#
curl --fail-with-body "$IABULA_API_BASE/v1/ingredients/$IABULA_INGREDIENT_ID" \
--header "X-API-Key: $IABULA_API_KEY"Defina IABULA_INGREDIENT_ID com um identificador canônico existente. O objeto de resposta contém id, name, dcbs e evidence. Cada DCB inclui id, code, denomination e evidence. Um ingrediente inexistente retorna HTTP 404; isso não é uma prova de inexistência da substância no mundo real.
O que a DCB acrescenta#
DCB significa Denominação Comum Brasileira. O conjunto adotado fornece número e denominação pública. Não deduza propriedades clínicas, equivalência terapêutica ou recomendações a partir de uma denominação. A evidência indica a origem do dado e os vínculos disponíveis no catálogo.
GET /v1/ingredients/{id}#
| Parâmetro | Local | Obrigatório | Tipo e limites |
|---|---|---|---|
| id | path | yes | string (uuid) |
| HTTP | Content-Type | Schema |
|---|---|---|
| 200 | application/json | IngredientDetail |
| 400 | application/json | Problem |
| 401 | application/json | Problem |
| 403 | application/json | Problem |
| 429 | application/json | Problem |
| 500 | application/json | Problem |
| 503 | application/json | Problem |
| 404 | application/json | Problem |
| 422 | application/json | HTTPValidationError |
Campos do contrato OpenAPI#
| Schema.campo | Tipo e limites | Obrigatório |
|---|---|---|
| DCBDetail.id | string (uuid) | yes |
| DCBDetail.code | string | yes |
| DCBDetail.denomination | string | yes |
| DCBDetail.evidence | Evidence | yes |
| Evidence.class | string | yes |
| Evidence.source | string | null | no |
| Evidence.dataset | string | null | no |
| Evidence.retrieved_at | string (date-time) | null | no |
| Evidence.source_version | string | null | no |
| Evidence.source_record_id | string | null | no |
| Evidence.source_run_id | string | null | no |
| Evidence.attribute | string | null | no |
| Evidence.rule_version | string | null | no |
| HTTPValidationError.detail | array<ValidationError> | no |
| IngredientDetail.id | string (uuid) | yes |
| IngredientDetail.name | string | yes |
| IngredientDetail.dcbs | array<DCBDetail> | yes |
| IngredientDetail.evidence | array<Evidence> | yes |
| Problem.type | string | yes |
| Problem.title | string | yes |
| Problem.status | integer | yes |
| Problem.code | string | yes |
| Problem.detail | string | null | no |
| Problem.request_id | string | yes |
| ValidationError.loc | array<string | integer> | yes |
| ValidationError.msg | string | yes |
| ValidationError.type | string | yes |
| ValidationError.input | object | no |
| ValidationError.ctx | object | no |