phenoml 17.0.0 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +15 -10
  4. package/dist/cjs/api/resources/fhir2Omop/client/Client.d.ts +110 -0
  5. package/dist/cjs/api/resources/fhir2Omop/client/Client.js +198 -0
  6. package/dist/cjs/api/resources/fhir2Omop/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/fhir2Omop/client/index.js +17 -0
  8. package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.ts +76 -0
  9. package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.js +3 -0
  10. package/dist/cjs/api/resources/fhir2Omop/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/fhir2Omop/client/requests/index.js +2 -0
  12. package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.d.ts +5 -0
  13. package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.js +54 -0
  14. package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.d.ts +5 -0
  15. package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.js +54 -0
  16. package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.d.ts +5 -0
  17. package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.js +54 -0
  18. package/dist/cjs/api/resources/fhir2Omop/errors/index.d.ts +3 -0
  19. package/dist/cjs/api/resources/fhir2Omop/errors/index.js +19 -0
  20. package/dist/cjs/api/resources/fhir2Omop/exports.d.ts +2 -0
  21. package/dist/cjs/api/resources/fhir2Omop/exports.js +21 -0
  22. package/dist/cjs/api/resources/fhir2Omop/index.d.ts +3 -0
  23. package/dist/cjs/api/resources/fhir2Omop/index.js +19 -0
  24. package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +12 -0
  25. package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.js +3 -0
  26. package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.d.ts +11 -0
  27. package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.js +3 -0
  28. package/dist/cjs/api/resources/fhir2Omop/types/DroppedResource.d.ts +5 -0
  29. package/dist/cjs/api/resources/fhir2Omop/types/DroppedResource.js +3 -0
  30. package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +13 -0
  31. package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.js +3 -0
  32. package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.d.ts +18 -0
  33. package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.js +3 -0
  34. package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +17 -0
  35. package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.js +3 -0
  36. package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +16 -0
  37. package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.js +3 -0
  38. package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.d.ts +13 -0
  39. package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.js +3 -0
  40. package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.d.ts +14 -0
  41. package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.js +3 -0
  42. package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +10 -0
  43. package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.js +3 -0
  44. package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.d.ts +15 -0
  45. package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.js +3 -0
  46. package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.ts +11 -0
  47. package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.js +3 -0
  48. package/dist/cjs/api/resources/fhir2Omop/types/index.d.ts +12 -0
  49. package/dist/cjs/api/resources/fhir2Omop/types/index.js +28 -0
  50. package/dist/cjs/api/resources/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/index.js +2 -1
  52. package/dist/cjs/core/fetcher/getResponseBody.js +11 -0
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/BaseClient.mjs +2 -2
  56. package/dist/esm/Client.d.mts +3 -0
  57. package/dist/esm/Client.mjs +5 -0
  58. package/dist/esm/api/resources/fhir2Omop/client/Client.d.mts +110 -0
  59. package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +161 -0
  60. package/dist/esm/api/resources/fhir2Omop/client/index.d.mts +1 -0
  61. package/dist/esm/api/resources/fhir2Omop/client/index.mjs +1 -0
  62. package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.mts +76 -0
  63. package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.mjs +2 -0
  64. package/dist/esm/api/resources/fhir2Omop/client/requests/index.d.mts +1 -0
  65. package/dist/esm/api/resources/fhir2Omop/client/requests/index.mjs +1 -0
  66. package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.d.mts +5 -0
  67. package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.mjs +17 -0
  68. package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.d.mts +5 -0
  69. package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.mjs +17 -0
  70. package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.d.mts +5 -0
  71. package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.mjs +17 -0
  72. package/dist/esm/api/resources/fhir2Omop/errors/index.d.mts +3 -0
  73. package/dist/esm/api/resources/fhir2Omop/errors/index.mjs +3 -0
  74. package/dist/esm/api/resources/fhir2Omop/exports.d.mts +2 -0
  75. package/dist/esm/api/resources/fhir2Omop/exports.mjs +3 -0
  76. package/dist/esm/api/resources/fhir2Omop/index.d.mts +3 -0
  77. package/dist/esm/api/resources/fhir2Omop/index.mjs +3 -0
  78. package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +12 -0
  79. package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.mjs +2 -0
  80. package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.d.mts +11 -0
  81. package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.mjs +2 -0
  82. package/dist/esm/api/resources/fhir2Omop/types/DroppedResource.d.mts +5 -0
  83. package/dist/esm/api/resources/fhir2Omop/types/DroppedResource.mjs +2 -0
  84. package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +13 -0
  85. package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.mjs +2 -0
  86. package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.d.mts +18 -0
  87. package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.mjs +2 -0
  88. package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +17 -0
  89. package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.mjs +2 -0
  90. package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +16 -0
  91. package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.mjs +2 -0
  92. package/dist/esm/api/resources/fhir2Omop/types/OmopTables.d.mts +13 -0
  93. package/dist/esm/api/resources/fhir2Omop/types/OmopTables.mjs +2 -0
  94. package/dist/esm/api/resources/fhir2Omop/types/PersonRow.d.mts +14 -0
  95. package/dist/esm/api/resources/fhir2Omop/types/PersonRow.mjs +2 -0
  96. package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +10 -0
  97. package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.mjs +2 -0
  98. package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.d.mts +15 -0
  99. package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.mjs +2 -0
  100. package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.mts +11 -0
  101. package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.mjs +2 -0
  102. package/dist/esm/api/resources/fhir2Omop/types/index.d.mts +12 -0
  103. package/dist/esm/api/resources/fhir2Omop/types/index.mjs +12 -0
  104. package/dist/esm/api/resources/index.d.mts +1 -0
  105. package/dist/esm/api/resources/index.mjs +1 -0
  106. package/dist/esm/core/fetcher/getResponseBody.mjs +11 -0
  107. package/dist/esm/version.d.mts +1 -1
  108. package/dist/esm/version.mjs +1 -1
  109. package/openapi/openapi.json +731 -1
  110. package/package.json +15 -4
  111. package/reference.md +146 -0
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Phenoml API",
5
- "version": "2903d5176690213e8f9bd937e4d4696088f870f9"
5
+ "version": "f063af0e8ddd9e9322b47bb8bc90c378af75764a"
6
6
  },
7
7
  "x-services": [
8
8
  {
@@ -26,6 +26,13 @@
26
26
  "iconHint": "fhir2summary",
27
27
  "status": "beta"
28
28
  },
29
+ {
30
+ "id": "fhir2omop",
31
+ "name": "FHIR2OMOP",
32
+ "description": "Map FHIR R4 resources and bundles into OMOP Common Data Model (CDM v5.4) tables.",
33
+ "iconHint": "fhir2omop",
34
+ "status": "alpha"
35
+ },
29
36
  {
30
37
  "id": "agent",
31
38
  "name": "Agent",
@@ -3010,6 +3017,224 @@
3010
3017
  "x-service": "construe"
3011
3018
  }
3012
3019
  },
3020
+ "/fhir2omop/create": {
3021
+ "post": {
3022
+ "operationId": "fhir2omop_create",
3023
+ "summary": "Map FHIR resources to OMOP CDM v5.4",
3024
+ "description": "Shapes a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows\n(person, visit_occurrence, condition_occurrence, drug_exposure,\nprocedure_occurrence, measurement, observation).\n\n**This is a structural mapping (`mode: \"structural\"`).** Rows are\nstructurally valid OMOP, but every clinical and source `concept_id` is `0`:\nthe vocabulary crosswalk that assigns real OMOP `concept_id`s is a planned\nfollow-up. Each `*_source_value` carries the verbatim FHIR coding\n(`system#code`), `*_type_concept_id` is set to `32817` (EHR), and the\nresponse `report` lists a standard-code *suggestion* for each source coding\n(already-standard, an unchecked normalization suggestion, or unmapped). Do\nnot treat the output as analytically resolved OMOP until `concept_id`s are\npopulated.\n\nMedication codes are resolved whether they appear inline\n(`medicationCodeableConcept`) or via a `medicationReference` to a contained,\nrelative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.\nA medication with no usable code, resolvable reference, or display is\nreported under `scan_summary.dropped_resources` rather than emitted as a\nblank row. The bundle must contain at least one Patient resource.\n",
3025
+ "requestBody": {
3026
+ "required": true,
3027
+ "content": {
3028
+ "application/json": {
3029
+ "schema": {
3030
+ "$ref": "#/components/schemas/fhir2omop_CreateOmopRequest"
3031
+ },
3032
+ "examples": {
3033
+ "bundle_with_medication": {
3034
+ "summary": "Bundle with a referenced medication",
3035
+ "description": "Patient, Condition, and a MedicationRequest whose drug code lives in a contained Medication resource.",
3036
+ "value": {
3037
+ "fhir_resources": {
3038
+ "resourceType": "Bundle",
3039
+ "type": "collection",
3040
+ "entry": [
3041
+ {
3042
+ "resource": {
3043
+ "resourceType": "Patient",
3044
+ "id": "patient-1",
3045
+ "gender": "female",
3046
+ "birthDate": "1985-07-22"
3047
+ }
3048
+ },
3049
+ {
3050
+ "resource": {
3051
+ "resourceType": "Condition",
3052
+ "id": "condition-1",
3053
+ "subject": {
3054
+ "reference": "Patient/patient-1"
3055
+ },
3056
+ "code": {
3057
+ "coding": [
3058
+ {
3059
+ "system": "http://snomed.info/sct",
3060
+ "code": "44054006",
3061
+ "display": "Type 2 diabetes mellitus"
3062
+ }
3063
+ ]
3064
+ },
3065
+ "onsetDateTime": "2024-01-15"
3066
+ }
3067
+ },
3068
+ {
3069
+ "resource": {
3070
+ "resourceType": "MedicationRequest",
3071
+ "id": "medreq-1",
3072
+ "status": "active",
3073
+ "subject": {
3074
+ "reference": "Patient/patient-1"
3075
+ },
3076
+ "medicationReference": {
3077
+ "reference": "#med0"
3078
+ },
3079
+ "authoredOn": "2024-01-16",
3080
+ "contained": [
3081
+ {
3082
+ "resourceType": "Medication",
3083
+ "id": "med0",
3084
+ "code": {
3085
+ "coding": [
3086
+ {
3087
+ "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
3088
+ "code": "860975",
3089
+ "display": "metformin hydrochloride 500 MG"
3090
+ }
3091
+ ]
3092
+ }
3093
+ }
3094
+ ]
3095
+ }
3096
+ }
3097
+ ]
3098
+ }
3099
+ }
3100
+ }
3101
+ }
3102
+ }
3103
+ }
3104
+ },
3105
+ "responses": {
3106
+ "200": {
3107
+ "description": "FHIR resources mapped to OMOP CDM v5.4 (structural)",
3108
+ "content": {
3109
+ "application/json": {
3110
+ "schema": {
3111
+ "$ref": "#/components/schemas/fhir2omop_CreateOmopResponse"
3112
+ },
3113
+ "examples": {
3114
+ "structural_mapping": {
3115
+ "summary": "Structural mapping result",
3116
+ "value": {
3117
+ "success": true,
3118
+ "message": "FHIR resources mapped to OMOP CDM v5.4 (structural; concept_ids pending vocabulary crosswalk)",
3119
+ "mode": "structural",
3120
+ "tables": {
3121
+ "person": [
3122
+ {
3123
+ "person_id": 1,
3124
+ "gender_concept_id": 0,
3125
+ "year_of_birth": 1985,
3126
+ "month_of_birth": 7,
3127
+ "day_of_birth": 22,
3128
+ "birth_datetime": "1985-07-22",
3129
+ "race_concept_id": 0,
3130
+ "ethnicity_concept_id": 0,
3131
+ "person_source_value": "patient-1",
3132
+ "gender_source_value": "female"
3133
+ }
3134
+ ],
3135
+ "condition_occurrence": [
3136
+ {
3137
+ "condition_occurrence_id": 1,
3138
+ "person_id": 1,
3139
+ "condition_concept_id": 0,
3140
+ "condition_start_date": "2024-01-15",
3141
+ "condition_start_datetime": "2024-01-15",
3142
+ "condition_type_concept_id": 32817,
3143
+ "condition_source_value": "http://snomed.info/sct#44054006",
3144
+ "condition_source_concept_id": 0
3145
+ }
3146
+ ],
3147
+ "drug_exposure": [
3148
+ {
3149
+ "drug_exposure_id": 1,
3150
+ "person_id": 1,
3151
+ "drug_concept_id": 0,
3152
+ "drug_exposure_start_date": "2024-01-16",
3153
+ "drug_exposure_start_datetime": "2024-01-16",
3154
+ "drug_type_concept_id": 32817,
3155
+ "drug_source_value": "http://www.nlm.nih.gov/research/umls/rxnorm#860975",
3156
+ "drug_source_concept_id": 0
3157
+ }
3158
+ ]
3159
+ },
3160
+ "report": [
3161
+ {
3162
+ "resource_type": "Condition",
3163
+ "resource_id": "condition-1",
3164
+ "omop_table": "condition_occurrence",
3165
+ "source_system": "http://snomed.info/sct",
3166
+ "source_code": "44054006",
3167
+ "source_name": "Type 2 diabetes mellitus",
3168
+ "target_vocabulary": "SNOMED",
3169
+ "target_code": "44054006",
3170
+ "target_name": "Type 2 diabetes mellitus",
3171
+ "mapping_status": "ALREADY_STANDARD"
3172
+ },
3173
+ {
3174
+ "resource_type": "MedicationRequest",
3175
+ "resource_id": "medreq-1",
3176
+ "omop_table": "drug_exposure",
3177
+ "source_system": "http://www.nlm.nih.gov/research/umls/rxnorm",
3178
+ "source_code": "860975",
3179
+ "source_name": "metformin hydrochloride 500 MG",
3180
+ "target_vocabulary": "RXNORM",
3181
+ "target_code": "860975",
3182
+ "target_name": "metformin hydrochloride 500 MG",
3183
+ "mapping_status": "ALREADY_STANDARD"
3184
+ }
3185
+ ],
3186
+ "scan_summary": {
3187
+ "total_resources": 3,
3188
+ "resource_counts": {
3189
+ "Patient": 1,
3190
+ "Condition": 1,
3191
+ "MedicationRequest": 1
3192
+ },
3193
+ "tables_populated": {
3194
+ "person": 1,
3195
+ "condition_occurrence": 1,
3196
+ "drug_exposure": 1
3197
+ },
3198
+ "coding_systems": {
3199
+ "http://snomed.info/sct": 1,
3200
+ "http://www.nlm.nih.gov/research/umls/rxnorm": 1
3201
+ },
3202
+ "codes_already_standard": 2,
3203
+ "codes_normalized": 0,
3204
+ "codes_unmapped": 0,
3205
+ "off_vocab_rate": 0
3206
+ }
3207
+ }
3208
+ }
3209
+ }
3210
+ }
3211
+ }
3212
+ },
3213
+ "400": {
3214
+ "description": "Bad request - invalid input. Possible reasons:\n- Invalid FHIR input (missing or non-Bundle/non-resource payload)\n- No Patient resource found (OMOP requires at least one person)\n",
3215
+ "content": {
3216
+ "application/json": {
3217
+ "schema": {
3218
+ "$ref": "#/components/schemas/fhir2omop_CreateOmopResponse"
3219
+ }
3220
+ }
3221
+ }
3222
+ },
3223
+ "401": {
3224
+ "description": "Unauthorized"
3225
+ },
3226
+ "500": {
3227
+ "description": "Internal server error"
3228
+ }
3229
+ },
3230
+ "security": [
3231
+ {
3232
+ "bearerAuth": []
3233
+ }
3234
+ ],
3235
+ "x-service": "fhir2omop"
3236
+ }
3237
+ },
3013
3238
  "/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}": {
3014
3239
  "get": {
3015
3240
  "summary": "Read or search FHIR resources",
@@ -8312,6 +8537,511 @@
8312
8537
  }
8313
8538
  }
8314
8539
  },
8540
+ "fhir2omop_CreateOmopRequest": {
8541
+ "type": "object",
8542
+ "required": [
8543
+ "fhir_resources"
8544
+ ],
8545
+ "properties": {
8546
+ "fhir_resources": {
8547
+ "type": "object",
8548
+ "additionalProperties": true,
8549
+ "description": "FHIR resources (single resource or Bundle). Must contain at least one\nPatient resource. Resources are mapped to OMOP rows; standalone\nMedication resources are consumed by medication references rather than\nmapped to their own table.\n"
8550
+ }
8551
+ }
8552
+ },
8553
+ "fhir2omop_CreateOmopResponse": {
8554
+ "type": "object",
8555
+ "properties": {
8556
+ "success": {
8557
+ "type": "boolean"
8558
+ },
8559
+ "message": {
8560
+ "type": "string"
8561
+ },
8562
+ "mode": {
8563
+ "type": "string",
8564
+ "description": "Resolution mode. `structural` means all clinical concept_ids are 0 (vocabulary crosswalk pending)."
8565
+ },
8566
+ "tables": {
8567
+ "$ref": "#/components/schemas/fhir2omop_OmopTables"
8568
+ },
8569
+ "report": {
8570
+ "type": "array",
8571
+ "description": "One Usagi-shaped entry per source coding routed through concept resolution.",
8572
+ "items": {
8573
+ "$ref": "#/components/schemas/fhir2omop_MappingReportEntry"
8574
+ }
8575
+ },
8576
+ "scan_summary": {
8577
+ "$ref": "#/components/schemas/fhir2omop_ScanSummary"
8578
+ }
8579
+ }
8580
+ },
8581
+ "fhir2omop_OmopTables": {
8582
+ "type": "object",
8583
+ "description": "OMOP CDM v5.4 rows grouped by destination table.",
8584
+ "properties": {
8585
+ "person": {
8586
+ "type": "array",
8587
+ "items": {
8588
+ "$ref": "#/components/schemas/fhir2omop_PersonRow"
8589
+ }
8590
+ },
8591
+ "visit_occurrence": {
8592
+ "type": "array",
8593
+ "items": {
8594
+ "$ref": "#/components/schemas/fhir2omop_VisitOccurrenceRow"
8595
+ }
8596
+ },
8597
+ "condition_occurrence": {
8598
+ "type": "array",
8599
+ "items": {
8600
+ "$ref": "#/components/schemas/fhir2omop_ConditionOccurrenceRow"
8601
+ }
8602
+ },
8603
+ "drug_exposure": {
8604
+ "type": "array",
8605
+ "items": {
8606
+ "$ref": "#/components/schemas/fhir2omop_DrugExposureRow"
8607
+ }
8608
+ },
8609
+ "procedure_occurrence": {
8610
+ "type": "array",
8611
+ "items": {
8612
+ "$ref": "#/components/schemas/fhir2omop_ProcedureOccurrenceRow"
8613
+ }
8614
+ },
8615
+ "measurement": {
8616
+ "type": "array",
8617
+ "items": {
8618
+ "$ref": "#/components/schemas/fhir2omop_MeasurementRow"
8619
+ }
8620
+ },
8621
+ "observation": {
8622
+ "type": "array",
8623
+ "items": {
8624
+ "$ref": "#/components/schemas/fhir2omop_ObservationRow"
8625
+ }
8626
+ }
8627
+ }
8628
+ },
8629
+ "fhir2omop_PersonRow": {
8630
+ "type": "object",
8631
+ "properties": {
8632
+ "person_id": {
8633
+ "type": "integer",
8634
+ "format": "int64"
8635
+ },
8636
+ "gender_concept_id": {
8637
+ "type": "integer",
8638
+ "format": "int64"
8639
+ },
8640
+ "year_of_birth": {
8641
+ "type": "integer"
8642
+ },
8643
+ "month_of_birth": {
8644
+ "type": "integer"
8645
+ },
8646
+ "day_of_birth": {
8647
+ "type": "integer"
8648
+ },
8649
+ "birth_datetime": {
8650
+ "type": "string"
8651
+ },
8652
+ "race_concept_id": {
8653
+ "type": "integer",
8654
+ "format": "int64"
8655
+ },
8656
+ "ethnicity_concept_id": {
8657
+ "type": "integer",
8658
+ "format": "int64"
8659
+ },
8660
+ "person_source_value": {
8661
+ "type": "string"
8662
+ },
8663
+ "gender_source_value": {
8664
+ "type": "string"
8665
+ },
8666
+ "race_source_value": {
8667
+ "type": "string"
8668
+ },
8669
+ "ethnicity_source_value": {
8670
+ "type": "string"
8671
+ }
8672
+ }
8673
+ },
8674
+ "fhir2omop_VisitOccurrenceRow": {
8675
+ "type": "object",
8676
+ "properties": {
8677
+ "visit_occurrence_id": {
8678
+ "type": "integer",
8679
+ "format": "int64"
8680
+ },
8681
+ "person_id": {
8682
+ "type": "integer",
8683
+ "format": "int64"
8684
+ },
8685
+ "visit_concept_id": {
8686
+ "type": "integer",
8687
+ "format": "int64"
8688
+ },
8689
+ "visit_start_date": {
8690
+ "type": "string"
8691
+ },
8692
+ "visit_start_datetime": {
8693
+ "type": "string"
8694
+ },
8695
+ "visit_end_date": {
8696
+ "type": "string"
8697
+ },
8698
+ "visit_end_datetime": {
8699
+ "type": "string"
8700
+ },
8701
+ "visit_type_concept_id": {
8702
+ "type": "integer",
8703
+ "format": "int64"
8704
+ },
8705
+ "visit_source_value": {
8706
+ "type": "string"
8707
+ }
8708
+ }
8709
+ },
8710
+ "fhir2omop_ConditionOccurrenceRow": {
8711
+ "type": "object",
8712
+ "properties": {
8713
+ "condition_occurrence_id": {
8714
+ "type": "integer",
8715
+ "format": "int64"
8716
+ },
8717
+ "person_id": {
8718
+ "type": "integer",
8719
+ "format": "int64"
8720
+ },
8721
+ "condition_concept_id": {
8722
+ "type": "integer",
8723
+ "format": "int64"
8724
+ },
8725
+ "condition_start_date": {
8726
+ "type": "string"
8727
+ },
8728
+ "condition_start_datetime": {
8729
+ "type": "string"
8730
+ },
8731
+ "condition_end_date": {
8732
+ "type": "string"
8733
+ },
8734
+ "condition_type_concept_id": {
8735
+ "type": "integer",
8736
+ "format": "int64"
8737
+ },
8738
+ "condition_source_value": {
8739
+ "type": "string"
8740
+ },
8741
+ "condition_source_concept_id": {
8742
+ "type": "integer",
8743
+ "format": "int64"
8744
+ },
8745
+ "condition_status_source_value": {
8746
+ "type": "string"
8747
+ }
8748
+ }
8749
+ },
8750
+ "fhir2omop_DrugExposureRow": {
8751
+ "type": "object",
8752
+ "properties": {
8753
+ "drug_exposure_id": {
8754
+ "type": "integer",
8755
+ "format": "int64"
8756
+ },
8757
+ "person_id": {
8758
+ "type": "integer",
8759
+ "format": "int64"
8760
+ },
8761
+ "drug_concept_id": {
8762
+ "type": "integer",
8763
+ "format": "int64"
8764
+ },
8765
+ "drug_exposure_start_date": {
8766
+ "type": "string"
8767
+ },
8768
+ "drug_exposure_start_datetime": {
8769
+ "type": "string"
8770
+ },
8771
+ "drug_exposure_end_date": {
8772
+ "type": "string"
8773
+ },
8774
+ "drug_type_concept_id": {
8775
+ "type": "integer",
8776
+ "format": "int64"
8777
+ },
8778
+ "stop_reason": {
8779
+ "type": "string"
8780
+ },
8781
+ "sig": {
8782
+ "type": "string"
8783
+ },
8784
+ "drug_source_value": {
8785
+ "type": "string"
8786
+ },
8787
+ "drug_source_concept_id": {
8788
+ "type": "integer",
8789
+ "format": "int64"
8790
+ }
8791
+ }
8792
+ },
8793
+ "fhir2omop_ProcedureOccurrenceRow": {
8794
+ "type": "object",
8795
+ "properties": {
8796
+ "procedure_occurrence_id": {
8797
+ "type": "integer",
8798
+ "format": "int64"
8799
+ },
8800
+ "person_id": {
8801
+ "type": "integer",
8802
+ "format": "int64"
8803
+ },
8804
+ "procedure_concept_id": {
8805
+ "type": "integer",
8806
+ "format": "int64"
8807
+ },
8808
+ "procedure_date": {
8809
+ "type": "string"
8810
+ },
8811
+ "procedure_datetime": {
8812
+ "type": "string"
8813
+ },
8814
+ "procedure_type_concept_id": {
8815
+ "type": "integer",
8816
+ "format": "int64"
8817
+ },
8818
+ "procedure_source_value": {
8819
+ "type": "string"
8820
+ },
8821
+ "procedure_source_concept_id": {
8822
+ "type": "integer",
8823
+ "format": "int64"
8824
+ }
8825
+ }
8826
+ },
8827
+ "fhir2omop_MeasurementRow": {
8828
+ "type": "object",
8829
+ "properties": {
8830
+ "measurement_id": {
8831
+ "type": "integer",
8832
+ "format": "int64"
8833
+ },
8834
+ "person_id": {
8835
+ "type": "integer",
8836
+ "format": "int64"
8837
+ },
8838
+ "measurement_concept_id": {
8839
+ "type": "integer",
8840
+ "format": "int64"
8841
+ },
8842
+ "measurement_date": {
8843
+ "type": "string"
8844
+ },
8845
+ "measurement_datetime": {
8846
+ "type": "string"
8847
+ },
8848
+ "measurement_type_concept_id": {
8849
+ "type": "integer",
8850
+ "format": "int64"
8851
+ },
8852
+ "value_as_number": {
8853
+ "type": "number",
8854
+ "format": "double"
8855
+ },
8856
+ "value_as_concept_id": {
8857
+ "type": "integer",
8858
+ "format": "int64"
8859
+ },
8860
+ "unit_concept_id": {
8861
+ "type": "integer",
8862
+ "format": "int64"
8863
+ },
8864
+ "range_low": {
8865
+ "type": "number",
8866
+ "format": "double"
8867
+ },
8868
+ "range_high": {
8869
+ "type": "number",
8870
+ "format": "double"
8871
+ },
8872
+ "measurement_source_value": {
8873
+ "type": "string"
8874
+ },
8875
+ "measurement_source_concept_id": {
8876
+ "type": "integer",
8877
+ "format": "int64"
8878
+ },
8879
+ "unit_source_value": {
8880
+ "type": "string"
8881
+ },
8882
+ "value_source_value": {
8883
+ "type": "string"
8884
+ }
8885
+ }
8886
+ },
8887
+ "fhir2omop_ObservationRow": {
8888
+ "type": "object",
8889
+ "properties": {
8890
+ "observation_id": {
8891
+ "type": "integer",
8892
+ "format": "int64"
8893
+ },
8894
+ "person_id": {
8895
+ "type": "integer",
8896
+ "format": "int64"
8897
+ },
8898
+ "observation_concept_id": {
8899
+ "type": "integer",
8900
+ "format": "int64"
8901
+ },
8902
+ "observation_date": {
8903
+ "type": "string"
8904
+ },
8905
+ "observation_datetime": {
8906
+ "type": "string"
8907
+ },
8908
+ "observation_type_concept_id": {
8909
+ "type": "integer",
8910
+ "format": "int64"
8911
+ },
8912
+ "value_as_number": {
8913
+ "type": "number",
8914
+ "format": "double"
8915
+ },
8916
+ "value_as_string": {
8917
+ "type": "string"
8918
+ },
8919
+ "value_as_concept_id": {
8920
+ "type": "integer",
8921
+ "format": "int64"
8922
+ },
8923
+ "unit_concept_id": {
8924
+ "type": "integer",
8925
+ "format": "int64"
8926
+ },
8927
+ "observation_source_value": {
8928
+ "type": "string"
8929
+ },
8930
+ "observation_source_concept_id": {
8931
+ "type": "integer",
8932
+ "format": "int64"
8933
+ },
8934
+ "unit_source_value": {
8935
+ "type": "string"
8936
+ },
8937
+ "value_source_value": {
8938
+ "type": "string"
8939
+ }
8940
+ }
8941
+ },
8942
+ "fhir2omop_MappingReportEntry": {
8943
+ "type": "object",
8944
+ "description": "One source_to_concept_map-style mapping suggestion (Usagi-shaped).",
8945
+ "properties": {
8946
+ "resource_type": {
8947
+ "type": "string"
8948
+ },
8949
+ "resource_id": {
8950
+ "type": "string"
8951
+ },
8952
+ "omop_table": {
8953
+ "type": "string"
8954
+ },
8955
+ "source_system": {
8956
+ "type": "string"
8957
+ },
8958
+ "source_code": {
8959
+ "type": "string"
8960
+ },
8961
+ "source_name": {
8962
+ "type": "string"
8963
+ },
8964
+ "target_vocabulary": {
8965
+ "type": "string"
8966
+ },
8967
+ "target_code": {
8968
+ "type": "string"
8969
+ },
8970
+ "target_name": {
8971
+ "type": "string"
8972
+ },
8973
+ "mapping_status": {
8974
+ "type": "string",
8975
+ "description": "ALREADY_STANDARD (source already in target vocabulary), UNCHECKED (unreviewed suggestion), or UNMAPPED (no candidate found)."
8976
+ },
8977
+ "equivalence": {
8978
+ "type": "string"
8979
+ },
8980
+ "note": {
8981
+ "type": "string"
8982
+ }
8983
+ }
8984
+ },
8985
+ "fhir2omop_ScanSummary": {
8986
+ "type": "object",
8987
+ "description": "White Rabbit-style aggregate profile of the mapping request.",
8988
+ "properties": {
8989
+ "total_resources": {
8990
+ "type": "integer"
8991
+ },
8992
+ "resource_counts": {
8993
+ "type": "object",
8994
+ "additionalProperties": {
8995
+ "type": "integer"
8996
+ }
8997
+ },
8998
+ "tables_populated": {
8999
+ "type": "object",
9000
+ "additionalProperties": {
9001
+ "type": "integer"
9002
+ }
9003
+ },
9004
+ "coding_systems": {
9005
+ "type": "object",
9006
+ "additionalProperties": {
9007
+ "type": "integer"
9008
+ }
9009
+ },
9010
+ "codes_already_standard": {
9011
+ "type": "integer"
9012
+ },
9013
+ "codes_normalized": {
9014
+ "type": "integer"
9015
+ },
9016
+ "codes_unmapped": {
9017
+ "type": "integer"
9018
+ },
9019
+ "off_vocab_rate": {
9020
+ "type": "number",
9021
+ "format": "double"
9022
+ },
9023
+ "dropped_resources": {
9024
+ "type": "array",
9025
+ "items": {
9026
+ "$ref": "#/components/schemas/fhir2omop_DroppedResource"
9027
+ }
9028
+ }
9029
+ }
9030
+ },
9031
+ "fhir2omop_DroppedResource": {
9032
+ "type": "object",
9033
+ "properties": {
9034
+ "resource_type": {
9035
+ "type": "string"
9036
+ },
9037
+ "resource_id": {
9038
+ "type": "string"
9039
+ },
9040
+ "reason": {
9041
+ "type": "string"
9042
+ }
9043
+ }
9044
+ },
8315
9045
  "fhir_provider_FhirProviderCreateRequest": {
8316
9046
  "type": "object",
8317
9047
  "required": [