T17: webapi sweep: unused helpers in ingest and users removed
This commit is contained in:
+1
-18
@@ -8,7 +8,7 @@ from fhir.resources.R4B.conceptmap import ConceptMap
|
||||
from pydantic import BaseModel
|
||||
|
||||
from core import concept_map
|
||||
from core.pipeline import ID_PATTERN, ImportPath, Pipeline, Source, redacted, restored
|
||||
from core.pipeline import ID_PATTERN, Pipeline, Source, redacted, restored
|
||||
from core.schema import ENTITIES
|
||||
from persistance import config_log, nodes
|
||||
from webapi.runs import dagster
|
||||
@@ -35,17 +35,6 @@ def schema() -> dict[str, Any]:
|
||||
}
|
||||
|
||||
|
||||
class SourceRef(BaseModel):
|
||||
source: ImportPath
|
||||
args: dict[str, Any] = {}
|
||||
|
||||
|
||||
@router.post("/sources/resources")
|
||||
def source_resources(ref: SourceRef) -> list[str]:
|
||||
"""What a source offers (a database's tables...): also tests that it can be reached."""
|
||||
return _from_source(nodes.resources, ref.source, ref.args)
|
||||
|
||||
|
||||
@router.post("/sources/preview")
|
||||
def source_preview(node: Source, limit: Annotated[int, Query(ge=1, le=200)] = 20) -> Rows:
|
||||
"""The first rows a source node would load."""
|
||||
@@ -86,12 +75,6 @@ def save_pipeline(pipeline_id: PipelineId, drawn: Pipeline) -> dict[str, int]:
|
||||
return {"version": config_log.save(pipeline_id, complete)}
|
||||
|
||||
|
||||
@router.get("/concept-maps")
|
||||
def concept_maps() -> Rows:
|
||||
"""Every ConceptMap a site saved: its id, latest version and when."""
|
||||
return config_log.listing("concept_maps")
|
||||
|
||||
|
||||
@router.get("/concept-maps/{map_id}")
|
||||
def get_concept_map(map_id: PipelineId) -> dict[str, Any]:
|
||||
"""A site's codes in platform terms (FHIR R4B ConceptMap), latest version."""
|
||||
|
||||
Reference in New Issue
Block a user