refs/refs/fhir-to-omop-demo/demo/translate/map/Practitioner.jq

55 lines · jq
2# Maps FHIR Practitioner to OMOP provider
4include "fhir";
5#include "fhir/env"; # provides fhir_server_url, type, etc
6# ^ just an idea, not implemented.
8# Creates a link that work in the local hapi server.
9def hapi_url:
10 # Would be nicer if there was a module for accessing env variables for this.
11 "http://localhost:8080/Practitioner/\(.id)"
15Practitioner |
17 "provider", # OMOP pracitioner table
18 .id, # provider_id
19 null, # provider_name # See PractitionerRole.display
20 .npi, # npi
21 null, # dea
22 null, # specialty_concept_id
23 null, # care_site_id
24 null, # year_of_birth
25 .gender_concept_id, # gender_concept_id
26 hapi_url, # provider_source_value # synthea ID might be better here.
27 null, # specialty_source_value # See PractitionerRole: eg - "General Practice"
28 null, # specialty_source_concept_id # See PractitionerRole: eg - 38004459
29 .gender, # gender_source_value
30 null # gender_source_concept_id
31],
33 "person", # OMOP person table
34 .id, # person_id
35 .gender_concept_id, # gender_concept_id
36 .year_of_birth, # year_of_birth
37 null, # month_of_birth
38 null, # day_of_birth
39 null, # birth_datetime
40 null, # race_concept_id
41 null, # ethnicity_concept_id
42 null, # location_id
43 .id, # provider_id
44 null, # care_site_id
45 hapi_url, # person_source_value
46 .gender, # gender_source_value
47 null, # gender_source_concept_id
48 null, # race_source_value
49 null, # race_source_concept_id
50 null, # ethnicity_source_value
51 null # ethnicity_source_concept_id
54@tsv