You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance README with detailed examples for bulk search and tibble output
- Updated the README to clarify the output structure for bulk lexical and semantic searches, emphasizing the return types and iteration methods.
- Added a new section on tibble output for batch resolution, demonstrating how to use `as_tibble = TRUE` for streamlined data manipulation with `dplyr`.
- Included standalone wrapper functions for improved usability in pipe-friendly workflows and clarified the distinction between using the client methods and raw FHIR responses.
The tibble columns are `source_system`, `source_code`, `source_concept_id`, `source_concept_name`, `standard_concept_id`, `standard_concept_name`, `standard_vocabulary_id`, `domain_id`, `target_table`, `mapping_type`, `similarity_score`, `status`, and `status_detail`. Failed rows stay in-place with `status = "failed"` and the API error text in `status_detail`. The batch summary (`total` / `resolved` / `failed`) is attached as `attr(tbl, "summary")`.
213
+
214
+
Default `as_tibble = FALSE` still returns the legacy `list(results, summary)` shape.
Both forms are fully supported - pick whichever reads better for the surrounding code.
256
+
257
+
### FHIR Client Interop
258
+
259
+
When you need raw FHIR `Parameters` / `Bundle` responses instead of the Concept Resolver envelope, `omophub_fhir_url()` returns the OMOPHub FHIR Terminology Service base URL for a given FHIR version (`"r4"` default, plus `"r4b"`, `"r5"`, `"r6"`). Use it with [`httr2`](https://httr2.r-lib.org/) or [`fhircrackr`](https://cran.r-project.org/package=fhircrackr) to talk directly to OMOPHub's FHIR endpoint.
260
+
261
+
```r
262
+
library(httr2)
263
+
264
+
# Call CodeSystem/$lookup directly against OMOPHub's FHIR endpoint
# Raw FHIR Parameters resource with the concept display and designations.
276
+
277
+
# R5 / R6 endpoints work the same way
278
+
omophub_fhir_url("r5")
279
+
#> "https://fhir.omophub.com/fhir/r5"
280
+
```
281
+
282
+
**When to use which**: Use `client$fhir$resolve()` (or `fhir_resolve()`) when you want OMOP-enriched answers (standard concept, CDM target table, mapping quality). Use `omophub_fhir_url()` + `httr2` when you need raw FHIR responses for FHIR-native tooling.
See [`inst/examples/error_handling.R`](inst/examples/error_handling.R) for the full set of patterns including graceful degradation and batch error collection.
0 commit comments