diff --git a/.data/aml/generate.py b/.data/aml/generate.py index b130cdb1..9c1c1aec 100644 --- a/.data/aml/generate.py +++ b/.data/aml/generate.py @@ -9,7 +9,7 @@ fake = Faker() # Constants -CURRENT_DATE = datetime(2025, 2, 28) +CURRENT_DATE = datetime.today() COUNTRIES = ["USA", "Canada", "UK", "Germany", "South Africa", "Cuba", "Iran", "Russia"] HIGH_RISK_COUNTRIES = ["Cuba", "Iran", "Russia"] CURRENCIES = ["USD", "CAD", "EUR", "ZAR", "BTC"] diff --git a/.data/healthcare/compose.yaml b/.data/healthcare/compose.yaml new file mode 100644 index 00000000..c6e27d3d --- /dev/null +++ b/.data/healthcare/compose.yaml @@ -0,0 +1,44 @@ +name: ${CONTAINER_PREFIX} +services: + # Databases + postgres: + image: postgres + container_name: ${CONTAINER_PREFIX}_postgres + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + - ./postgres/:/docker-entrypoint-initdb.d/ + environment: + PGUSER: postgres + POSTGRES_USER: postgres + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + ports: + - "5432:5432" + healthcheck: + test: "pg_isready -q -h postgres" + interval: 10s + timeout: 5s + retries: 30 + + redis: + image: redis:latest + restart: unless-stopped + ports: + - 6379:6379 + + caching: + build: + context: https://github.com/hasura/engine-plugin-caching.git + restart: unless-stopped + ports: + - 8787:8787 + environment: + CACHING_PLUGIN_SECRET: ${CACHING_PLUGIN_SECRET} + CACHING_PLUGIN_REDIS_URL: ${CACHING_PLUGIN_REDIS_URL} + extra_hosts: + - local.hasura.dev=host-gateway + volumes: + - ../plugins/caching-config.js:/app/src/config.js + +volumes: + postgres-data: diff --git a/.data/healthcare/generate.py b/.data/healthcare/generate.py new file mode 100644 index 00000000..ab4c514a --- /dev/null +++ b/.data/healthcare/generate.py @@ -0,0 +1,109 @@ +import csv +import random +from datetime import datetime, timedelta +import uuid +from faker import Faker +import os + +fake = Faker() +OUTPUT_DIR = "postgres" +CURRENT_DATE = datetime.today() +os.makedirs(OUTPUT_DIR, exist_ok=True) + +# Load HCPCS codes +def load_hcpcs_codes(file_path=f"{OUTPUT_DIR}/procedure_codes.csv"): + with open(file_path, "r") as f: + reader = csv.DictReader(f) + return [(row["ref.hcpc"], row["ref.category"], int(row["ref.avg_duration_minutes"])) for row in reader] + +# Generate Patients and Insurance Plans +def generate_patients_and_insurance(num_patients=1000): + with open(f"{OUTPUT_DIR}/patients.csv", "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(["patient.patient_id", "patient.first_name", "patient.last_name", + "patient.date_of_birth", "patient.insurance_plan_id"]) + for _ in range(num_patients): + pid = fake.uuid4()[:20] + writer.writerow([ + pid, fake.first_name(), fake.last_name(), + fake.date_of_birth(minimum_age=18, maximum_age=90).isoformat(), + f"PLAN{random.randint(1, 5):03d}" + ]) + + with open(f"{OUTPUT_DIR}/insurance_plans.csv", "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(["patient.plan_id", "patient.plan_name", "patient.payer_name"]) + for i in range(10): + writer.writerow([ + f"PLAN{i+1:03d}", fake.company() + " Plan", + random.choice([ + "UnitedHealthcare", "Aetna", "Cigna", "Blue Cross Blue Shield", + "Humana", "Kaiser Permanente", "Anthem", "Molina Healthcare", + "Health Net", "WellCare", "Centene", "Ambetter", "Oscar Health", + "Medica", "Priority Health", "Highmark", "Florida Blue", + "Empire BlueCross", "Regence BlueShield", "Premera Blue Cross" +]) + ]) + +# Generate Operators and Schedule with Variance +def generate_operators_and_schedule(num_operators=10): + with open(f"{OUTPUT_DIR}/operators.csv", "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(["ops.operator_id", "ops.full_name", "ops.region", "ops.specialty"]) + for i in range(num_operators): + writer.writerow([f"OP{i:03d}", fake.name(), "Region1", + random.choice(["Radiology", "Cardiology", "Orthopedics"])]) + + busy_operators = ["OP000", "OP001", "OP002"] # 30% busier + start_date = CURRENT_DATE + + with open(f"{OUTPUT_DIR}/operator_schedule.csv", "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(["ops.operator_id", "ops.work_date", "ops.booked_minutes", "ops.max_minutes"]) + for i in range(num_operators): + op_id = f"OP{i:03d}" + for day in range(14): + work_date = start_date + timedelta(days=day) + booked = random.randint(200, 400) if op_id in busy_operators else random.randint(0, 150) + writer.writerow([op_id, work_date.date().isoformat(), booked, 480]) + +# Generate Cases with Variance +def generate_cases(num_cases=1000): + hcpcs_codes = load_hcpcs_codes() + patients = [row["patient.patient_id"] for row in csv.DictReader(open(f"{OUTPUT_DIR}/patients.csv"))] + operators = [row["ops.operator_id"] for row in csv.DictReader(open(f"{OUTPUT_DIR}/operators.csv"))] + start_date = CURRENT_DATE + + with open(f"{OUTPUT_DIR}/cases.csv", "w", newline="") as f: + writer = csv.writer(f) + writer.writerow(["ops.patient_id", "ops.clinic_id", "ops.procedure_code", "ops.urgency_level", + "ops.recommended_date", "ops.status", "ops.operator_id", "ops.region", "ops.created_at"]) + + for _ in range(num_cases): + hcpc, category, duration = random.choice(hcpcs_codes) + urgency = random.choices( + ["critical", "emergency", "urgent", "semi-urgent", "routine"], + weights=[10, 20, 30, 20, 20] + )[0] + rec_date = start_date + timedelta(days=random.randint(0, 13)) + status_roll = random.random() + if status_roll < 0.6: + status, op_id = "pending", "" + elif status_roll < 0.9: + status, op_id = "assigned", random.choice(operators[:3]) # Busier operators + else: + status, op_id = "completed", random.choice(operators) + + writer.writerow([ + random.choice(patients), "CL001", hcpc, urgency, rec_date.date().isoformat(), + status, op_id, "Region1", datetime.now().isoformat() + ]) + +if __name__ == "__main__": + print("Generating patients and insurance...") + generate_patients_and_insurance(5000) + print("Generating operators and schedule...") + generate_operators_and_schedule(20) + print("Generating cases...") + generate_cases(10000) + print(f"Data generation complete. Files saved in {OUTPUT_DIR}/") \ No newline at end of file diff --git a/.data/healthcare/postgres/1-create-ref.sql b/.data/healthcare/postgres/1-create-ref.sql new file mode 100644 index 00000000..abe2cde5 --- /dev/null +++ b/.data/healthcare/postgres/1-create-ref.sql @@ -0,0 +1,39 @@ +CREATE DATABASE ref; + +\c ref; + +CREATE TABLE drug_reference ( + product_ndc VARCHAR(11) PRIMARY KEY, + proprietary_name VARCHAR(200), + nonproprietary_name VARCHAR(200), + dosage_form_name VARCHAR(50), + route_name VARCHAR(100), + labeler_name VARCHAR(200), + substance_name VARCHAR(400), + active_ingredients_info VARCHAR(400) +); + +CREATE TABLE drug_packaging ( + ndc_package_code VARCHAR(12) PRIMARY KEY, + product_ndc VARCHAR(11) REFERENCES drug_reference(product_ndc), + package_description VARCHAR(150) +); + +CREATE TABLE procedure_codes ( + hcpc VARCHAR(5) PRIMARY KEY, + long_description TEXT NOT NULL, + short_description VARCHAR(100), + category VARCHAR(50), + avg_duration_minutes INT +); + +\COPY drug_reference FROM '/docker-entrypoint-initdb.d/drug_reference.csv' WITH (FORMAT csv, HEADER true); +\COPY drug_packaging FROM '/docker-entrypoint-initdb.d/drug_packaging.csv' WITH (FORMAT csv, HEADER true); +\COPY procedure_codes FROM '/docker-entrypoint-initdb.d/procedure_codes.csv' WITH (FORMAT csv, HEADER true); + +CREATE INDEX idx_drug_packaging_product_ndc ON drug_packaging(product_ndc); +CREATE INDEX idx_drug_reference_proprietary_name ON drug_reference(proprietary_name); +CREATE INDEX idx_drug_reference_nonproprietary_name ON drug_reference(nonproprietary_name); +CREATE INDEX idx_drug_reference_labeler_name ON drug_reference(labeler_name); +CREATE INDEX idx_drug_reference_active_ingredients ON drug_reference(active_ingredients_info); +CREATE INDEX idx_procedure_codes_category ON procedure_codes(category); \ No newline at end of file diff --git a/.data/healthcare/postgres/2-create-patient.sql b/.data/healthcare/postgres/2-create-patient.sql new file mode 100644 index 00000000..5d2301fb --- /dev/null +++ b/.data/healthcare/postgres/2-create-patient.sql @@ -0,0 +1,25 @@ +CREATE DATABASE patient; + +\c patient; + +CREATE TABLE insurance_plans ( + plan_id VARCHAR(20) PRIMARY KEY, + plan_name VARCHAR(100), + payer_name VARCHAR(100) +); + +CREATE TABLE patients ( + patient_id VARCHAR(20) PRIMARY KEY, + first_name VARCHAR(50), + last_name VARCHAR(50), + date_of_birth DATE, + insurance_plan_id VARCHAR(20) REFERENCES insurance_plans(plan_id) +); + +\COPY insurance_plans FROM '/docker-entrypoint-initdb.d/insurance_plans.csv' WITH (FORMAT csv, HEADER true); +\COPY patients FROM '/docker-entrypoint-initdb.d/patients.csv' WITH (FORMAT csv, HEADER true); + +CREATE INDEX idx_patients_last_name ON patients(last_name); +CREATE INDEX idx_patients_first_name ON patients(first_name); +CREATE INDEX idx_patients_insurance_plan_id ON patients(insurance_plan_id); +CREATE INDEX idx_insurance_plans_payer_name ON insurance_plans(payer_name); diff --git a/.data/healthcare/postgres/3-create-ops.sql b/.data/healthcare/postgres/3-create-ops.sql new file mode 100644 index 00000000..fdb2fe33 --- /dev/null +++ b/.data/healthcare/postgres/3-create-ops.sql @@ -0,0 +1,49 @@ +CREATE DATABASE ops; + +\c ops; + +CREATE TABLE operators ( + operator_id VARCHAR(10) PRIMARY KEY, + full_name VARCHAR(100), + region VARCHAR(50), + specialty VARCHAR(50) +); + +CREATE TABLE operator_schedule ( + schedule_id SERIAL PRIMARY KEY, + operator_id VARCHAR(10) REFERENCES operators(operator_id), + work_date DATE, + booked_minutes INT DEFAULT 0, + max_minutes INT DEFAULT 480, + UNIQUE (operator_id, work_date) +); + +CREATE TABLE cases ( + case_id SERIAL PRIMARY KEY, + patient_id VARCHAR(20), + clinic_id VARCHAR(10) NOT NULL, + procedure_code VARCHAR(5), + urgency_level VARCHAR(20), + recommended_date DATE NOT NULL, + status VARCHAR(20), + operator_id VARCHAR(10) REFERENCES operators(operator_id), + region VARCHAR(50), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +\COPY operators FROM '/docker-entrypoint-initdb.d/operators.csv' WITH (FORMAT csv, HEADER true); +\COPY operator_schedule(operator_id, work_date, booked_minutes, max_minutes) FROM '/docker-entrypoint-initdb.d/operator_schedule.csv' WITH (FORMAT csv, HEADER true); +\COPY cases(patient_id, clinic_id, procedure_code, urgency_level, recommended_date, status, operator_id, region, created_at) FROM '/docker-entrypoint-initdb.d/cases.csv' WITH (FORMAT csv, HEADER true); + +CREATE INDEX idx_cases_patient_id ON cases(patient_id); +CREATE INDEX idx_cases_clinic_id ON cases(clinic_id); +CREATE INDEX idx_cases_procedure_code ON cases(procedure_code); +CREATE INDEX idx_cases_urgency_level ON cases(urgency_level); +CREATE INDEX idx_cases_status ON cases(status); +CREATE INDEX idx_cases_created_at ON cases(created_at DESC); +CREATE INDEX idx_cases_operator_id ON cases(operator_id); +CREATE INDEX idx_cases_region ON cases(region); +CREATE INDEX idx_operators_full_name ON operators(full_name); +CREATE INDEX idx_operators_specialty ON operators(specialty); +CREATE INDEX idx_operator_schedule_operator_id ON operator_schedule(operator_id); +CREATE INDEX idx_operator_schedule_work_date ON operator_schedule(work_date); diff --git a/.data/healthcare/postgres/cases.csv b/.data/healthcare/postgres/cases.csv new file mode 100644 index 00000000..48675440 --- /dev/null +++ b/.data/healthcare/postgres/cases.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19f5c980fecaf7972d5b9d19ee62dfe0d4d2536d1b1c357f6aabac9d097f19c1 +size 1004501 diff --git a/.data/healthcare/postgres/drug_packaging.csv b/.data/healthcare/postgres/drug_packaging.csv new file mode 100644 index 00000000..ab09ad6c --- /dev/null +++ b/.data/healthcare/postgres/drug_packaging.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31419330fe36a8dcf5a9cd555b221a22f4d2ec51fd9cf79127bd3a8a0bce8d17 +size 136970 diff --git a/.data/healthcare/postgres/drug_reference.csv b/.data/healthcare/postgres/drug_reference.csv new file mode 100644 index 00000000..76d3ad29 --- /dev/null +++ b/.data/healthcare/postgres/drug_reference.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39cafb3cd5fc5c02136755ba9ac1a63cdb6e8dcb64ded80fc85f02724e96fb79 +size 347301 diff --git a/.data/healthcare/postgres/insurance_plans.csv b/.data/healthcare/postgres/insurance_plans.csv new file mode 100644 index 00000000..4ba3ce17 --- /dev/null +++ b/.data/healthcare/postgres/insurance_plans.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07dc9976368e1d91ec01e493dc980f5741c7c261273a18d2b31148e99e14123b +size 466 diff --git a/.data/healthcare/postgres/operator_schedule.csv b/.data/healthcare/postgres/operator_schedule.csv new file mode 100644 index 00000000..1f898d1c --- /dev/null +++ b/.data/healthcare/postgres/operator_schedule.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3c5e05cb0c617486e370954a4d8de6ff2c26d27fbee7a4c4ee7010b2085abd6 +size 7171 diff --git a/.data/healthcare/postgres/operators.csv b/.data/healthcare/postgres/operators.csv new file mode 100644 index 00000000..387edd07 --- /dev/null +++ b/.data/healthcare/postgres/operators.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80bd5082b04471401520860fe08bc55fd3bb33b98dcf863d88e885835548eb07 +size 861 diff --git a/.data/healthcare/postgres/patients.csv b/.data/healthcare/postgres/patients.csv new file mode 100644 index 00000000..04e8f61f --- /dev/null +++ b/.data/healthcare/postgres/patients.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce6e77737b7061f6218e7352ae9e87636ce5b18fa5780c7cd57eb6a6af135298 +size 275998 diff --git a/.data/healthcare/postgres/procedure_codes.csv b/.data/healthcare/postgres/procedure_codes.csv new file mode 100644 index 00000000..8d28c2ef --- /dev/null +++ b/.data/healthcare/postgres/procedure_codes.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0ac77dc7d521f6f07e8c94006be8a6d463508aec3cf90381b0d5844f6fa318c +size 1309679 diff --git a/hasura/.env.healthcare.template b/hasura/.env.healthcare.template new file mode 100644 index 00000000..dfe266f4 --- /dev/null +++ b/hasura/.env.healthcare.template @@ -0,0 +1,33 @@ +PATIENT_OPS_OPERATIONS_AUTHORIZATION_HEADER="Bearer LmI9HLQ_4_1uBum5OwND0A==" +PATIENT_OPS_OPERATIONS_CONNECTION_URI="postgres://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev/ops" +PATIENT_OPS_OPERATIONS_HASURA_SERVICE_TOKEN_SECRET="LmI9HLQ_4_1uBum5OwND0A==" +PATIENT_OPS_OPERATIONS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +PATIENT_OPS_OPERATIONS_OTEL_SERVICE_NAME="patient_ops_operations" +PATIENT_OPS_OPERATIONS_READ_URL="http://local.hasura.dev:5622" +PATIENT_OPS_OPERATIONS_WRITE_URL="http://local.hasura.dev:5622" +PATIENT_OPS_PATIENTS_AUTHORIZATION_HEADER="Bearer fKIMgAcGptTqCNymJvTuAw==" +PATIENT_OPS_PATIENTS_CONNECTION_URI="postgres://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev/patient" +PATIENT_OPS_PATIENTS_HASURA_SERVICE_TOKEN_SECRET="fKIMgAcGptTqCNymJvTuAw==" +PATIENT_OPS_PATIENTS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +PATIENT_OPS_PATIENTS_OTEL_SERVICE_NAME="patient_ops_patients" +PATIENT_OPS_PATIENTS_READ_URL="http://local.hasura.dev:6650" +PATIENT_OPS_PATIENTS_WRITE_URL="http://local.hasura.dev:6650" +REFERENCE_REFERENCE_AUTHORIZATION_HEADER="Bearer 16LYhcdSWhCeglOecVKddA==" +REFERENCE_REFERENCE_CONNECTION_URI="postgres://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev/ref" +REFERENCE_REFERENCE_HASURA_SERVICE_TOKEN_SECRET="16LYhcdSWhCeglOecVKddA==" +REFERENCE_REFERENCE_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +REFERENCE_REFERENCE_OTEL_SERVICE_NAME="reference_reference" +REFERENCE_REFERENCE_READ_URL="http://local.hasura.dev:5655" +REFERENCE_REFERENCE_WRITE_URL="http://local.hasura.dev:5655" +JWT_SECRET="KGOUts9A6hU2dWQQiQHdNN5VZBixs+BAh74RwDElxps" +CACHING_PLUGIN_PRE_PARSE_URL="http://local.hasura.dev:8787/pre-parse" +CACHING_PLUGIN_PRE_RESPONSE_URL="http://local.hasura.dev:8787/pre-response" +CACHING_PLUGIN_REDIS_URL="redis://local.hasura.dev:6379" +CACHING_PLUGIN_SECRET="zZkhKqFjqXR4g5MZCsJUZCnhCcoPyZ" +GLOBALS_GLOBAL_FUNCTIONS_AUTHORIZATION_HEADER="Bearer YQ==" +GLOBALS_GLOBAL_FUNCTIONS_HASURA_CONNECTOR_PORT=5756 +GLOBALS_GLOBAL_FUNCTIONS_HASURA_SERVICE_TOKEN_SECRET="YQ==" +GLOBALS_GLOBAL_FUNCTIONS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +GLOBALS_GLOBAL_FUNCTIONS_OTEL_SERVICE_NAME="globals_global_functions" +GLOBALS_GLOBAL_FUNCTIONS_READ_URL="http://local.hasura.dev:5756" +GLOBALS_GLOBAL_FUNCTIONS_WRITE_URL="http://local.hasura.dev:5756" \ No newline at end of file diff --git a/hasura/.hasura/context.yaml b/hasura/.hasura/context.yaml index f1691404..b249c38d 100644 --- a/hasura/.hasura/context.yaml +++ b/hasura/.hasura/context.yaml @@ -9,6 +9,12 @@ definition: subgraph: ../industry/aml/app/subgraph.yaml localEnvFile: ../.env.aml cloudEnvFile: ../.env.cloud.aml + healthcare: + project: healthcare-dev + supergraph: ../supergraph-config/healthcare/2-supergraph.yaml + subgraph: ../industry/healthcare/reference/subgraph.yaml + localEnvFile: ../.env.healthcare + cloudEnvFile: ../.env.cloud.healthcare telco: project: telco supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml @@ -28,33 +34,42 @@ definition: localEnvFile: ../.env.telco cloudEnvFile: ../.env.cloud.telco-test scripts: + build-aml: + bash: ddn supergraph build local --supergraph supergraph-config/aml/2-supergraph.yaml + powershell: ddn supergraph build local --supergraph supergraph-config/aml/2-supergraph.yaml build-starter: bash: ddn supergraph build local --env-file .env.starter --env-file .env --supergraph supergraph-config/starter/2-supergraph.yaml powershell: ddn supergraph build local --env-file .env.starter --env-file .env --supergraph supergraph-config/starter/2-supergraph.yaml build-telco: bash: ddn supergraph build local --supergraph supergraph-config/telco/4-supergraph-with-mutations.yaml powershell: ddn supergraph build local --supergraph supergraph-config/telco/4-supergraph-with-mutations.yaml - build-aml: - bash: ddn supergraph build local --supergraph supergraph-config/aml/2-supergraph.yaml - powershell: ddn supergraph build local --supergraph supergraph-config/aml/2-supergraph.yaml + demo-aml: + bash: ddn run docker-start-aml; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-aml.yaml --env-file .env.aml up --build --pull always -d + powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-aml.yaml --env-file .env.aml up --build --pull always -d demo-starter: bash: ddn run docker-start-starter; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-starter.yaml up --build --pull always -d powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-starter.yaml up --build --pull always -d demo-telco: bash: ddn run docker-start-telco; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-telco.yaml --env-file .env.telco up --build --pull always -d powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-telco.yaml --env-file .env.telco up --build --pull always -d - demo-aml: - bash: ddn run docker-start-aml; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-aml.yaml --env-file .env.aml up --build --pull always -d - powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-aml.yaml --env-file .env.aml up --build --pull always -d + docker-start-aml: + bash: export DATASET=aml; docker compose -f ../.data/aml/compose.yaml --env-file ../.data/aml/.env up --build --pull always -d + powershell: $Env:DATASET = "aml"; docker compose -f ../.data/aml/compose.yaml --env-file ../.data/aml/.env up --build --pull always -d docker-start-starter: bash: export DATASET=starter; docker compose -f ../.data/starter/compose.yaml --env-file ../.data/starter/.env up --build --pull always -d powershell: $Env:DATASET = "starter"; docker compose -f ../.data/starter/compose.yaml --env-file ../.data/starter/.env up --build --pull always -d docker-start-telco: bash: export DATASET=telco; docker compose -f ../.data/telco/compose.yaml --env-file ../.data/telco/.env up --build --pull always -d powershell: $Env:DATASET = "telco"; docker compose -f ../.data/telco/compose.yaml --env-file ../.data/telco/.env up --build --pull always -d - docker-start-aml: - bash: export DATASET=aml; docker compose -f ../.data/aml/compose.yaml --env-file ../.data/aml/.env up --build --pull always -d - powershell: $Env:DATASET = "aml"; docker compose -f ../.data/aml/compose.yaml --env-file ../.data/aml/.env up --build --pull always -d docker-stop: bash: for file in compose*.yaml $(find ../.data -type f -name "compose.yaml"); do docker compose -f $file down -v; done powershell: docker compose -f compose.yaml down -v; docker compose -f .data/compose.yaml down -v + docker-start-healthcare: + bash: export DATASET=healthcare; docker compose -f ../.data/healthcare/compose.yaml --env-file ../.data/healthcare/.env up --build --pull always -d + powershell: $Env:DATASET = "healthcare"; docker compose -f ../.data/healthcare/compose.yaml --env-file ../.data/healthcare/.env up --build --pull always -d + build-healthcare: + bash: ddn supergraph build local --supergraph supergraph-config/healthcare/2-supergraph.yaml + powershell: ddn supergraph build local --supergraph supergraph-config/healthcare/2-supergraph.yaml + demo-healthcare: + bash: ddn run docker-start-healthcare; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-healthcare.yaml --env-file .env.healthcare up --build --pull always -d + powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-healthcare.yaml --env-file .env.healthcare up --build --pull always -d \ No newline at end of file diff --git a/hasura/README.md b/hasura/README.md index 780499af..24eee751 100644 --- a/hasura/README.md +++ b/hasura/README.md @@ -172,17 +172,17 @@ Make any further adjustments to the profile's `compose.yaml` as appropriate to u Add a DDN run script for starting the Docker environment. Replace `$PROFILE` with your profile name > [!NOTE] -> The initdb-prepare.sh script is used to combine profile datasets with the postgres/mongo datasets from the common directory. This is required if auth/support subgraphs are used. Containers must be configured with volumes in the `../build` location. Use `.data/starter/compose.yaml` for reference. +> Use `.data/starter/compose.yaml` for reference. ```yaml docker-start-$PROFILE: - bash: export DATASET=$PROFILE; ../.data/initdb-prepare.sh; docker compose -f ../.data/$PROFILE/compose.yaml --env-file ../.data/$PROFILE/.env up --build --pull always -d + bash: export DATASET=$PROFILE; docker compose -f ../.data/$PROFILE/compose.yaml --env-file ../.data/$PROFILE/.env up --build --pull always -d powershell: $Env:DATASET = "$PROFILE"; docker compose -f ../.data/$PROFILE/compose.yaml --env-file ../.data/$PROFILE/.env up --build --pull always -d ``` This can be achieved automatically with `yq` ``` -yq eval ".definition.scripts[\"docker-start-$PROFILE\"] = {\"bash\": \"export DATASET=\$PROFILE; ../.data/initdb-prepare.sh; docker compose -f ../.data/\$PROFILE/compose.yaml --env-file ../.data/\$PROFILE/.env up --build --pull always -d\", \"powershell\": \"\$Env:DATASET = \\\"\$PROFILE\\\"; docker compose -f ../.data/\$PROFILE/compose.yaml --env-file ../.data/\$PROFILE/.env up --build --pull always -d\"}" -i hasura/.hasura/context.yaml +yq eval ".definition.scripts[\"docker-start-$PROFILE\"] = {\"bash\": \"export DATASET=\$PROFILE; docker compose -f ../.data/\$PROFILE/compose.yaml --env-file ../.data/\$PROFILE/.env up --build --pull always -d\", \"powershell\": \"\$Env:DATASET = \\\"\$PROFILE\\\"; docker compose -f ../.data/\$PROFILE/compose.yaml --env-file ../.data/\$PROFILE/.env up --build --pull always -d\"}" -i hasura/.hasura/context.yaml ``` ### Step 3: Docker Compose @@ -198,23 +198,25 @@ cp hasura/compose.yaml hasura/compose-$PROFILE.yaml 1. Build script: ```yaml build-$PROFILE: - bash: ddn supergraph build local --env-file .env.$PROFILE --env-file .env --supergraph supergraph-config/$PROFILE/1-supergraph.yaml + bash: ddn supergraph build local --supergraph supergraph-config/$PROFILE$/2-supergraph.yaml + powershell: ddn supergraph build local --supergraph supergraph-config/$PROFILE$/2-supergraph.yaml ``` This can be achieved automatically with `yq` ``` -yq eval ".definition.scripts[\"build-$PROFILE\"] = {\"bash\": \"ddn supergraph build local --env-file .env.$PROFILE --env-file .env --supergraph supergraph-config/$PROFILE/1-supergraph.yaml\"}" -i hasura/.hasura/context.yaml +yq eval ".definition.scripts[\"build-$PROFILE\"] = {\"bash\": \"ddn supergraph build local --env-file .env.$PROFILE --env-file .env --supergraph supergraph-config/$PROFILE/2-supergraph.yaml\", \"powershell\": \"ddn supergraph build local --env-file .env.$PROFILE --env-file .env --supergraph supergraph-config/$PROFILE/2-supergraph.yaml\"}" -i hasura/.hasura/context.yaml ``` 2. Demo script: ```yaml demo-$PROFILE: - bash: ddn run docker-start-$PROFILE; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-$PROFILE.yaml --env-file .env.$PROFILE --env-file .env up --build --pull always -d + bash: ddn run docker-start-$PROFILE; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-$PROFILE$.yaml --env-file .env.$PROFILE$ up --build --pull always -d + powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-$PROFILE.yaml --env-file .env.$PROFILE up --build --pull always -d ``` This can be achieved automatically with `yq` ``` -yq eval ".definition.scripts[\"demo-$PROFILE\"] = {\"bash\": \"ddn run docker-start-$PROFILE; HASURA_DDN_PAT=\$(ddn auth print-pat) docker compose -f compose-$PROFILE.yaml --env-file .env.$PROFILE --env-file .env up --build --pull always -d\"}" -i hasura/.hasura/context.yaml +yq eval ".definition.scripts[\"demo-$PROFILE\"] = {\"bash\": \" ddn run docker-start-$PROFILE; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-$PROFILE.yaml --env-file .env.$PROFILE up --build --pull always -d\", \"powershell\": \"$Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-$PROFILE.yaml --env-file .env.$PROFILE up --build --pull always -d\"}" -i hasura/.hasura/context.yaml ``` --- diff --git a/hasura/compose-healthcare.yaml b/hasura/compose-healthcare.yaml new file mode 100644 index 00000000..1bf22ed4 --- /dev/null +++ b/hasura/compose-healthcare.yaml @@ -0,0 +1,43 @@ +include: + - path: globals/connector/global_functions/compose.yaml + - path: industry/healthcare/patient_ops/connector/patients/compose.yaml + - path: industry/healthcare/patient_ops/connector/operations/compose.yaml + - path: industry/healthcare/reference/connector/reference/compose.yaml +services: + engine: + build: + context: engine + dockerfile_inline: |- + FROM ghcr.io/hasura/v3-engine + COPY ./build /md/ + develop: + watch: + - action: sync+restart + path: engine/build + target: /md/ + env_file: + - engine/.env.engine + extra_hosts: + - local.hasura.dev=host-gateway + ports: + - mode: ingress + protocol: tcp + published: "3280" + target: 3000 + otel-collector: + command: + - --config=/etc/otel-collector-config.yaml + environment: + HASURA_DDN_PAT: ${HASURA_DDN_PAT} + image: otel/opentelemetry-collector:0.104.0 + ports: + - mode: ingress + protocol: tcp + published: "4317" + target: 4317 + - mode: ingress + protocol: tcp + published: "4318" + target: 4318 + volumes: + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/.ddnignore b/hasura/industry/healthcare/patient_ops/connector/operations/.ddnignore new file mode 100644 index 00000000..ed72dd19 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/.ddnignore @@ -0,0 +1,2 @@ +.env* +compose.yaml diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/.hasura-connector/Dockerfile.operations b/hasura/industry/healthcare/patient_ops/connector/operations/.hasura-connector/Dockerfile.operations new file mode 100644 index 00000000..bd6c9cfb --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/.hasura-connector/Dockerfile.operations @@ -0,0 +1,2 @@ +FROM ghcr.io/hasura/ndc-postgres:v2.0.0 +COPY ./ /etc/connector \ No newline at end of file diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/.hasura-connector/connector-metadata.yaml b/hasura/industry/healthcare/patient_ops/connector/operations/.hasura-connector/connector-metadata.yaml new file mode 100644 index 00000000..58ef7f16 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/.hasura-connector/connector-metadata.yaml @@ -0,0 +1,26 @@ +packagingDefinition: + type: PrebuiltDockerImage + dockerImage: ghcr.io/hasura/ndc-postgres:v2.0.0 +supportedEnvironmentVariables: + - name: CONNECTION_URI + description: The PostgreSQL connection URI + defaultValue: postgresql://read_only_user:readonlyuser@35.236.11.122:5432/v3-docs-sample-app + - name: CLIENT_CERT + description: The SSL client certificate (Optional) + defaultValue: "" + - name: CLIENT_KEY + description: The SSL client key (Optional) + defaultValue: "" + - name: ROOT_CERT + description: The SSL root certificate (Optional) + defaultValue: "" +commands: + update: hasura-ndc-postgres update +cliPlugin: + type: null + name: ndc-postgres + version: v2.0.0 +dockerComposeWatch: + - path: ./ + action: sync+restart + target: /etc/connector diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/compose.postgres-adminer.yaml b/hasura/industry/healthcare/patient_ops/connector/operations/compose.postgres-adminer.yaml new file mode 100644 index 00000000..8e229bcb --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/compose.postgres-adminer.yaml @@ -0,0 +1,48 @@ +# Configuration used for adminer +configs: + adminer-index.php: + content: | + $$_ENV['ADMINER_DEFAULT_SERVER'], + 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], + 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], + 'driver' => $$_ENV['ADMINER_DEFAULT_DRIVER'], + 'db' => $$_ENV['ADMINER_DEFAULT_DB'], + ]; + } + include './adminer.php'; + ?> +services: + # Adminer is a lightweight database management tool (optional) + adminer: + configs: + - source: adminer-index.php + target: /var/www/html/index.php + depends_on: + - postgres + environment: + ADMINER_DEFAULT_DB: dev + ADMINER_DEFAULT_DRIVER: pgsql + ADMINER_DEFAULT_PASSWORD: password + ADMINER_DEFAULT_SERVER: postgres + ADMINER_DEFAULT_USERNAME: user + image: adminer:latest + ports: + - 9984:8080 + restart: unless-stopped + # Bundled Postgres database with pgvector (optional) + postgres: + environment: + POSTGRES_DB: dev + POSTGRES_PASSWORD: password + POSTGRES_USER: user + image: pgvector/pgvector:pg17 + ports: + - 5054:5432 + restart: unless-stopped + volumes: + - db_data:/var/lib/postgresql/data +volumes: + db_data: {} diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/compose.yaml b/hasura/industry/healthcare/patient_ops/connector/operations/compose.yaml new file mode 100644 index 00000000..2f09fd97 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/compose.yaml @@ -0,0 +1,14 @@ +services: + patient_ops_operations: + build: + context: . + dockerfile: .hasura-connector/Dockerfile.operations + environment: + CONNECTION_URI: $PATIENT_OPS_OPERATIONS_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: $PATIENT_OPS_OPERATIONS_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: $PATIENT_OPS_OPERATIONS_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: $PATIENT_OPS_OPERATIONS_OTEL_SERVICE_NAME + extra_hosts: + - local.hasura.dev:host-gateway + ports: + - 5622:8080 diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/configuration.json b/hasura/industry/healthcare/patient_ops/connector/operations/configuration.json new file mode 100644 index 00000000..214656bc --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/configuration.json @@ -0,0 +1,1139 @@ +{ + "version": "5", + "$schema": "schema.json", + "connectionSettings": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "metadata": { + "tables": { + "cases": { + "schemaName": "public", + "tableName": "cases", + "columns": { + "case_id": { + "name": "case_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "clinic_id": { + "name": "clinic_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "created_at": { + "name": "created_at", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "operator_id": { + "name": "operator_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "patient_id": { + "name": "patient_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "procedure_code": { + "name": "procedure_code", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "recommended_date": { + "name": "recommended_date", + "type": { + "scalarType": "date" + }, + "nullable": "nonNullable", + "description": null + }, + "region": { + "name": "region", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "status": { + "name": "status", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "urgency_level": { + "name": "urgency_level", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "cases_pkey": [ + "case_id" + ] + }, + "foreignRelations": { + "cases_operator_id_fkey": { + "foreignSchema": "public", + "foreignTable": "operators", + "columnMapping": { + "operator_id": "operator_id" + } + } + }, + "description": null + }, + "operator_schedule": { + "schemaName": "public", + "tableName": "operator_schedule", + "columns": { + "booked_minutes": { + "name": "booked_minutes", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "max_minutes": { + "name": "max_minutes", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "operator_id": { + "name": "operator_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "schedule_id": { + "name": "schedule_id", + "type": { + "scalarType": "int4" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "work_date": { + "name": "work_date", + "type": { + "scalarType": "date" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "operator_schedule_operator_id_work_date_key": [ + "operator_id", + "work_date" + ], + "operator_schedule_pkey": [ + "schedule_id" + ] + }, + "foreignRelations": { + "operator_schedule_operator_id_fkey": { + "foreignSchema": "public", + "foreignTable": "operators", + "columnMapping": { + "operator_id": "operator_id" + } + } + }, + "description": null + }, + "operators": { + "schemaName": "public", + "tableName": "operators", + "columns": { + "full_name": { + "name": "full_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "operator_id": { + "name": "operator_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "region": { + "name": "region", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "specialty": { + "name": "specialty", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "operators_pkey": [ + "operator_id" + ] + }, + "foreignRelations": {}, + "description": null + } + }, + "types": { + "scalar": { + "date": { + "typeName": "date", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "date" + }, + "min": { + "returnType": "date" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "date", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "date", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + } + }, + "typeRepresentation": "date" + }, + "int4": { + "typeName": "int4", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int4" + }, + "bit_or": { + "returnType": "int4" + }, + "bit_xor": { + "returnType": "int4" + }, + "max": { + "returnType": "int4" + }, + "min": { + "returnType": "int4" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "int8" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int4", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int4", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + } + }, + "typeRepresentation": "int32" + }, + "int8": { + "typeName": "int8", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int8" + }, + "bit_or": { + "returnType": "int8" + }, + "bit_xor": { + "returnType": "int8" + }, + "max": { + "returnType": "int8" + }, + "min": { + "returnType": "int8" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int8", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int8", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + } + }, + "typeRepresentation": "int64AsString" + }, + "numeric": { + "typeName": "numeric", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "max": { + "returnType": "numeric" + }, + "min": { + "returnType": "numeric" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "numeric", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "numeric", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + } + }, + "typeRepresentation": "bigDecimalAsString" + }, + "text": { + "typeName": "text", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "text", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "text", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "timestamp": { + "typeName": "timestamp", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "timestamp" + }, + "min": { + "returnType": "timestamp" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "timestamp", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "timestamp", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + } + }, + "typeRepresentation": "timestamp" + }, + "varchar": { + "typeName": "varchar", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "varchar", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "varchar", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + } + }, + "typeRepresentation": "string" + } + }, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "introspectionOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "mutationsVersion": "v2", + "mutationsPrefix": "" +} diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/connector.yaml b/hasura/industry/healthcare/patient_ops/connector/operations/connector.yaml new file mode 100644 index 00000000..081296bc --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/connector.yaml @@ -0,0 +1,16 @@ +kind: Connector +version: v2 +definition: + name: operations + subgraph: patient_ops + source: hasura/postgres:v2.0.0 + context: . + envMapping: + CONNECTION_URI: + fromEnv: PATIENT_OPS_OPERATIONS_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: + fromEnv: PATIENT_OPS_OPERATIONS_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: + fromEnv: PATIENT_OPS_OPERATIONS_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: + fromEnv: PATIENT_OPS_OPERATIONS_OTEL_SERVICE_NAME diff --git a/hasura/industry/healthcare/patient_ops/connector/operations/schema.json b/hasura/industry/healthcare/patient_ops/connector/operations/schema.json new file mode 100644 index 00000000..15e45a37 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/operations/schema.json @@ -0,0 +1,1622 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ParsedConfiguration", + "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/definitions/Version" + }, + "$schema": { + "description": "Jsonschema of the configuration format.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "connectionSettings": { + "description": "Database connection settings.", + "default": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "allOf": [ + { + "$ref": "#/definitions/DatabaseConnectionSettings" + } + ] + }, + "metadata": { + "description": "Connector metadata.", + "default": { + "tables": {}, + "types": { + "scalar": {}, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "allOf": [ + { + "$ref": "#/definitions/Metadata" + } + ] + }, + "introspectionOptions": { + "description": "Database introspection options.", + "default": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "allOf": [ + { + "$ref": "#/definitions/IntrospectionOptions" + } + ] + }, + "mutationsVersion": { + "description": "Which version of the generated mutation procedures to include in the schema response", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/MutationsVersion" + }, + { + "type": "null" + } + ] + }, + "mutationsPrefix": { + "description": "Provide a custom prefix for generated mutation names. Defaults to mutations version.", + "default": null, + "type": [ + "string", + "null" + ] + } + }, + "definitions": { + "Version": { + "type": "string", + "enum": [ + "5" + ] + }, + "DatabaseConnectionSettings": { + "description": "Database connection settings.", + "type": "object", + "required": [ + "connectionUri" + ], + "properties": { + "connectionUri": { + "description": "Connection string for a Postgres-compatible database.", + "allOf": [ + { + "$ref": "#/definitions/ConnectionUri" + } + ] + }, + "poolSettings": { + "description": "Connection pool settings.", + "default": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "allOf": [ + { + "$ref": "#/definitions/PoolSettings" + } + ] + }, + "isolationLevel": { + "description": "Query isolation level.", + "default": "ReadCommitted", + "allOf": [ + { + "$ref": "#/definitions/IsolationLevel" + } + ] + } + } + }, + "ConnectionUri": { + "$ref": "#/definitions/Secret" + }, + "Secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "variable" + ], + "properties": { + "variable": { + "$ref": "#/definitions/Variable" + } + } + } + ] + }, + "Variable": { + "description": "The name of an an environment variable.", + "type": "string" + }, + "PoolSettings": { + "description": "Settings for the PostgreSQL connection pool", + "type": "object", + "properties": { + "maxConnections": { + "description": "maximum number of pool connections", + "default": 50, + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "poolTimeout": { + "description": "timeout for acquiring a connection from the pool (seconds)", + "default": 30, + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "idleTimeout": { + "description": "idle timeout for releasing a connection from the pool (seconds)", + "default": 180, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "checkConnectionAfterIdle": { + "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", + "default": 60, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "connectionLifetime": { + "description": "maximum lifetime for an individual connection (seconds)", + "default": 600, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + } + }, + "IsolationLevel": { + "description": "The isolation level of the transaction in which a query is executed.", + "oneOf": [ + { + "description": "Prevents reading data from another uncommitted transaction.", + "type": "string", + "enum": [ + "ReadCommitted" + ] + }, + { + "description": "Reading the same data twice is guaranteed to return the same result.", + "type": "string", + "enum": [ + "RepeatableRead" + ] + }, + { + "description": "Concurrent transactions behave identically to serializing them one at a time.", + "type": "string", + "enum": [ + "Serializable" + ] + } + ] + }, + "Metadata": { + "description": "Metadata information.", + "type": "object", + "properties": { + "tables": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/TablesInfo" + } + ] + }, + "types": { + "default": { + "scalar": {}, + "composite": {} + }, + "allOf": [ + { + "$ref": "#/definitions/Types" + } + ] + }, + "nativeOperations": { + "default": { + "queries": {}, + "mutations": {} + }, + "allOf": [ + { + "$ref": "#/definitions/NativeOperations" + } + ] + } + } + }, + "TablesInfo": { + "description": "Mapping from a \"table\" name to its information.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TableInfo" + } + }, + "TableInfo": { + "description": "Information about a database table (or any other kind of relation).", + "type": "object", + "required": [ + "columns", + "schemaName", + "tableName" + ], + "properties": { + "schemaName": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "columns": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ColumnInfo" + } + }, + "uniquenessConstraints": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/UniquenessConstraints" + } + ] + }, + "foreignRelations": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/ForeignRelations" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "ColumnInfo": { + "description": "Information about a database column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "hasDefault": { + "$ref": "#/definitions/HasDefault" + }, + "isIdentity": { + "$ref": "#/definitions/IsIdentity" + }, + "isGenerated": { + "$ref": "#/definitions/IsGenerated" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "Type": { + "description": "The type of values that a column, field, or argument may take.", + "oneOf": [ + { + "type": "object", + "required": [ + "scalarType" + ], + "properties": { + "scalarType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "compositeType" + ], + "properties": { + "compositeType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "arrayType" + ], + "properties": { + "arrayType": { + "$ref": "#/definitions/Type" + } + }, + "additionalProperties": false + } + ] + }, + "Nullable": { + "description": "Can this column contain null values", + "type": "string", + "enum": [ + "nullable", + "nonNullable" + ] + }, + "HasDefault": { + "description": "Does this column have a default value.", + "type": "string", + "enum": [ + "noDefault", + "hasDefault" + ] + }, + "IsIdentity": { + "description": "Is this column an identity column.", + "type": "string", + "enum": [ + "notIdentity", + "identityByDefault", + "identityAlways" + ] + }, + "IsGenerated": { + "description": "Is this column a generated column.", + "type": "string", + "enum": [ + "notGenerated", + "stored" + ] + }, + "UniquenessConstraints": { + "description": "A mapping from the name of a unique constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UniquenessConstraint" + } + }, + "UniquenessConstraint": { + "description": "The set of columns that make up a uniqueness constraint. We map each table column to their ndc field names.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "ForeignRelations": { + "description": "A mapping from the name of a foreign key constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ForeignRelation" + } + }, + "ForeignRelation": { + "description": "A foreign key constraint.", + "type": "object", + "required": [ + "columnMapping", + "foreignTable" + ], + "properties": { + "foreignSchema": { + "type": [ + "string", + "null" + ] + }, + "foreignTable": { + "type": "string" + }, + "columnMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Types": { + "description": "Information about types.", + "type": "object", + "required": [ + "composite", + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/definitions/ScalarTypes" + }, + "composite": { + "$ref": "#/definitions/CompositeTypes" + } + } + }, + "ScalarTypes": { + "description": "Map of all known/occurring scalar types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ScalarType" + } + }, + "ScalarType": { + "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", + "type": "object", + "required": [ + "aggregateFunctions", + "comparisonOperators", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "aggregateFunctions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AggregateFunction" + } + }, + "comparisonOperators": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ComparisonOperator" + } + }, + "typeRepresentation": { + "anyOf": [ + { + "$ref": "#/definitions/TypeRepresentation" + }, + { + "type": "null" + } + ] + } + } + }, + "AggregateFunction": { + "type": "object", + "required": [ + "returnType" + ], + "properties": { + "returnType": { + "type": "string" + } + } + }, + "ComparisonOperator": { + "description": "Represents a postgres binary comparison operator", + "type": "object", + "required": [ + "argumentType", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "type": "string" + }, + "operatorKind": { + "$ref": "#/definitions/OperatorKind" + }, + "argumentType": { + "type": "string" + }, + "isInfix": { + "default": true, + "type": "boolean" + } + } + }, + "OperatorKind": { + "description": "Is it a built-in operator, or a custom operator.", + "type": "string", + "enum": [ + "equal", + "in", + "custom" + ] + }, + "TypeRepresentation": { + "description": "Type representation of a scalar type.", + "oneOf": [ + { + "description": "JSON booleans", + "type": "string", + "enum": [ + "boolean" + ] + }, + { + "description": "Any JSON string", + "type": "string", + "enum": [ + "string" + ] + }, + { + "description": "float4", + "type": "string", + "enum": [ + "float32" + ] + }, + { + "description": "float8", + "type": "string", + "enum": [ + "float64" + ] + }, + { + "description": "int2", + "type": "string", + "enum": [ + "int16" + ] + }, + { + "description": "int4", + "type": "string", + "enum": [ + "int32" + ] + }, + { + "description": "int8 as integer", + "type": "string", + "enum": [ + "int64" + ] + }, + { + "description": "int8 as string", + "type": "string", + "enum": [ + "int64AsString" + ] + }, + { + "description": "numeric", + "type": "string", + "enum": [ + "bigDecimal" + ] + }, + { + "description": "numeric as string", + "type": "string", + "enum": [ + "bigDecimalAsString" + ] + }, + { + "description": "timestamp", + "type": "string", + "enum": [ + "timestamp" + ] + }, + { + "description": "timestamp with timezone", + "type": "string", + "enum": [ + "timestamptz" + ] + }, + { + "description": "time", + "type": "string", + "enum": [ + "time" + ] + }, + { + "description": "time with timezone", + "type": "string", + "enum": [ + "timetz" + ] + }, + { + "description": "date", + "type": "string", + "enum": [ + "date" + ] + }, + { + "description": "uuid", + "type": "string", + "enum": [ + "uUID" + ] + }, + { + "description": "geography", + "type": "string", + "enum": [ + "geography" + ] + }, + { + "description": "geometry", + "type": "string", + "enum": [ + "geometry" + ] + }, + { + "description": "Any JSON number", + "type": "string", + "enum": [ + "number" + ] + }, + { + "description": "Any JSON number, with no decimal part", + "type": "string", + "enum": [ + "integer" + ] + }, + { + "description": "An arbitrary json.", + "type": "string", + "enum": [ + "json" + ] + }, + { + "description": "One of the specified string values", + "type": "object", + "required": [ + "enum" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + ] + }, + "CompositeTypes": { + "description": "Map of all known composite types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CompositeType" + } + }, + "CompositeType": { + "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", + "type": "object", + "required": [ + "fields", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FieldInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "FieldInfo": { + "description": "Information about a composite type field.", + "type": "object", + "required": [ + "fieldName", + "type" + ], + "properties": { + "fieldName": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeOperations": { + "description": "Metadata information of Native Operations.", + "type": "object", + "required": [ + "mutations", + "queries" + ], + "properties": { + "queries": { + "description": "Native Queries.", + "allOf": [ + { + "$ref": "#/definitions/NativeQueries" + } + ] + }, + "mutations": { + "description": "Native Mutations.", + "allOf": [ + { + "$ref": "#/definitions/NativeMutations" + } + ] + } + } + }, + "NativeQueries": { + "description": "Metadata information of Native Queries.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "NativeQueryInfo": { + "description": "Information about a Native Operation", + "type": "object", + "required": [ + "columns", + "sql" + ], + "properties": { + "sql": { + "description": "SQL expression to use for the Native Operation. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", + "allOf": [ + { + "$ref": "#/definitions/NativeQuerySql" + } + ] + }, + "columns": { + "description": "Columns returned by the Native Operation", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "arguments": { + "description": "Names and types of arguments that can be passed to this Native Operation", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeQuerySql": { + "description": "Native Operation SQL location.", + "anyOf": [ + { + "description": "Refer to an external Native Operation SQL file.", + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "description": "Relative path to a sql file.", + "type": "string" + } + } + }, + { + "description": "Inline Native Operation SQL string.", + "type": "object", + "required": [ + "inline" + ], + "properties": { + "inline": { + "description": "An inline Native Operation SQL string.", + "allOf": [ + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + } + } + }, + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + }, + "InlineNativeQuerySql": { + "type": "string" + }, + "ReadOnlyColumnInfo": { + "description": "Information about a native query column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeMutations": { + "description": "Metadata information of Native Mutations.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "IntrospectionOptions": { + "description": "Options which only influence how the configuration is updated.", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTables": { + "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", + "default": [ + "public" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTypesAndProcedures": { + "description": "The types and procedures in these schemas will be returned unqualified.", + "default": [ + "public", + "pg_catalog", + "tiger" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ComparisonOperatorMapping" + } + }, + "introspectPrefixFunctionComparisonOperators": { + "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", + "default": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "typeRepresentations": { + "description": "The type representations to pick for base scalar types.", + "default": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + }, + "allOf": [ + { + "$ref": "#/definitions/TypeRepresentations" + } + ] + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + }, + "operatorKind": { + "description": "Equal, In or Custom.", + "allOf": [ + { + "$ref": "#/definitions/OperatorKind" + } + ] + } + } + }, + "TypeRepresentations": { + "description": "The type representations that guide introspection.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TypeRepresentation" + } + }, + "MutationsVersion": { + "description": "Which version of the generated mutations will be included in the schema", + "type": "string", + "enum": [ + "v1", + "v2" + ] + } + } +} diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/.ddnignore b/hasura/industry/healthcare/patient_ops/connector/patients/.ddnignore new file mode 100644 index 00000000..ed72dd19 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/.ddnignore @@ -0,0 +1,2 @@ +.env* +compose.yaml diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/.hasura-connector/Dockerfile.patients b/hasura/industry/healthcare/patient_ops/connector/patients/.hasura-connector/Dockerfile.patients new file mode 100644 index 00000000..bd6c9cfb --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/.hasura-connector/Dockerfile.patients @@ -0,0 +1,2 @@ +FROM ghcr.io/hasura/ndc-postgres:v2.0.0 +COPY ./ /etc/connector \ No newline at end of file diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/.hasura-connector/connector-metadata.yaml b/hasura/industry/healthcare/patient_ops/connector/patients/.hasura-connector/connector-metadata.yaml new file mode 100644 index 00000000..58ef7f16 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/.hasura-connector/connector-metadata.yaml @@ -0,0 +1,26 @@ +packagingDefinition: + type: PrebuiltDockerImage + dockerImage: ghcr.io/hasura/ndc-postgres:v2.0.0 +supportedEnvironmentVariables: + - name: CONNECTION_URI + description: The PostgreSQL connection URI + defaultValue: postgresql://read_only_user:readonlyuser@35.236.11.122:5432/v3-docs-sample-app + - name: CLIENT_CERT + description: The SSL client certificate (Optional) + defaultValue: "" + - name: CLIENT_KEY + description: The SSL client key (Optional) + defaultValue: "" + - name: ROOT_CERT + description: The SSL root certificate (Optional) + defaultValue: "" +commands: + update: hasura-ndc-postgres update +cliPlugin: + type: null + name: ndc-postgres + version: v2.0.0 +dockerComposeWatch: + - path: ./ + action: sync+restart + target: /etc/connector diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/compose.postgres-adminer.yaml b/hasura/industry/healthcare/patient_ops/connector/patients/compose.postgres-adminer.yaml new file mode 100644 index 00000000..a2d15d17 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/compose.postgres-adminer.yaml @@ -0,0 +1,48 @@ +# Configuration used for adminer +configs: + adminer-index.php: + content: | + $$_ENV['ADMINER_DEFAULT_SERVER'], + 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], + 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], + 'driver' => $$_ENV['ADMINER_DEFAULT_DRIVER'], + 'db' => $$_ENV['ADMINER_DEFAULT_DB'], + ]; + } + include './adminer.php'; + ?> +services: + # Adminer is a lightweight database management tool (optional) + adminer: + configs: + - source: adminer-index.php + target: /var/www/html/index.php + depends_on: + - postgres + environment: + ADMINER_DEFAULT_DB: dev + ADMINER_DEFAULT_DRIVER: pgsql + ADMINER_DEFAULT_PASSWORD: password + ADMINER_DEFAULT_SERVER: postgres + ADMINER_DEFAULT_USERNAME: user + image: adminer:latest + ports: + - 4587:8080 + restart: unless-stopped + # Bundled Postgres database with pgvector (optional) + postgres: + environment: + POSTGRES_DB: dev + POSTGRES_PASSWORD: password + POSTGRES_USER: user + image: pgvector/pgvector:pg17 + ports: + - 9599:5432 + restart: unless-stopped + volumes: + - db_data:/var/lib/postgresql/data +volumes: + db_data: {} diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/compose.yaml b/hasura/industry/healthcare/patient_ops/connector/patients/compose.yaml new file mode 100644 index 00000000..b3704aaa --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/compose.yaml @@ -0,0 +1,14 @@ +services: + patient_ops_patients: + build: + context: . + dockerfile: .hasura-connector/Dockerfile.patients + environment: + CONNECTION_URI: $PATIENT_OPS_PATIENTS_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: $PATIENT_OPS_PATIENTS_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: $PATIENT_OPS_PATIENTS_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: $PATIENT_OPS_PATIENTS_OTEL_SERVICE_NAME + extra_hosts: + - local.hasura.dev:host-gateway + ports: + - 6650:8080 diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/configuration.json b/hasura/industry/healthcare/patient_ops/connector/patients/configuration.json new file mode 100644 index 00000000..5db80392 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/configuration.json @@ -0,0 +1,699 @@ +{ + "version": "5", + "$schema": "schema.json", + "connectionSettings": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "metadata": { + "tables": { + "insurance_plans": { + "schemaName": "public", + "tableName": "insurance_plans", + "columns": { + "payer_name": { + "name": "payer_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "plan_id": { + "name": "plan_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "plan_name": { + "name": "plan_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "insurance_plans_pkey": [ + "plan_id" + ] + }, + "foreignRelations": {}, + "description": null + }, + "patients": { + "schemaName": "public", + "tableName": "patients", + "columns": { + "date_of_birth": { + "name": "date_of_birth", + "type": { + "scalarType": "date" + }, + "nullable": "nullable", + "description": null + }, + "first_name": { + "name": "first_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "insurance_plan_id": { + "name": "insurance_plan_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "last_name": { + "name": "last_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "patient_id": { + "name": "patient_id", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "patients_pkey": [ + "patient_id" + ] + }, + "foreignRelations": { + "patients_insurance_plan_id_fkey": { + "foreignSchema": "public", + "foreignTable": "insurance_plans", + "columnMapping": { + "insurance_plan_id": "plan_id" + } + } + }, + "description": null + } + }, + "types": { + "scalar": { + "date": { + "typeName": "date", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "date" + }, + "min": { + "returnType": "date" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "date", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "date", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + } + }, + "typeRepresentation": "date" + }, + "text": { + "typeName": "text", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "text", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "text", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "varchar": { + "typeName": "varchar", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "varchar", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "varchar", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + } + }, + "typeRepresentation": "string" + } + }, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "introspectionOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "mutationsVersion": "v2", + "mutationsPrefix": "" +} diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/connector.yaml b/hasura/industry/healthcare/patient_ops/connector/patients/connector.yaml new file mode 100644 index 00000000..27960235 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/connector.yaml @@ -0,0 +1,16 @@ +kind: Connector +version: v2 +definition: + name: patients + subgraph: patient_ops + source: hasura/postgres:v2.0.0 + context: . + envMapping: + CONNECTION_URI: + fromEnv: PATIENT_OPS_PATIENTS_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: + fromEnv: PATIENT_OPS_PATIENTS_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: + fromEnv: PATIENT_OPS_PATIENTS_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: + fromEnv: PATIENT_OPS_PATIENTS_OTEL_SERVICE_NAME diff --git a/hasura/industry/healthcare/patient_ops/connector/patients/schema.json b/hasura/industry/healthcare/patient_ops/connector/patients/schema.json new file mode 100644 index 00000000..15e45a37 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/connector/patients/schema.json @@ -0,0 +1,1622 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ParsedConfiguration", + "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/definitions/Version" + }, + "$schema": { + "description": "Jsonschema of the configuration format.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "connectionSettings": { + "description": "Database connection settings.", + "default": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "allOf": [ + { + "$ref": "#/definitions/DatabaseConnectionSettings" + } + ] + }, + "metadata": { + "description": "Connector metadata.", + "default": { + "tables": {}, + "types": { + "scalar": {}, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "allOf": [ + { + "$ref": "#/definitions/Metadata" + } + ] + }, + "introspectionOptions": { + "description": "Database introspection options.", + "default": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "allOf": [ + { + "$ref": "#/definitions/IntrospectionOptions" + } + ] + }, + "mutationsVersion": { + "description": "Which version of the generated mutation procedures to include in the schema response", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/MutationsVersion" + }, + { + "type": "null" + } + ] + }, + "mutationsPrefix": { + "description": "Provide a custom prefix for generated mutation names. Defaults to mutations version.", + "default": null, + "type": [ + "string", + "null" + ] + } + }, + "definitions": { + "Version": { + "type": "string", + "enum": [ + "5" + ] + }, + "DatabaseConnectionSettings": { + "description": "Database connection settings.", + "type": "object", + "required": [ + "connectionUri" + ], + "properties": { + "connectionUri": { + "description": "Connection string for a Postgres-compatible database.", + "allOf": [ + { + "$ref": "#/definitions/ConnectionUri" + } + ] + }, + "poolSettings": { + "description": "Connection pool settings.", + "default": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "allOf": [ + { + "$ref": "#/definitions/PoolSettings" + } + ] + }, + "isolationLevel": { + "description": "Query isolation level.", + "default": "ReadCommitted", + "allOf": [ + { + "$ref": "#/definitions/IsolationLevel" + } + ] + } + } + }, + "ConnectionUri": { + "$ref": "#/definitions/Secret" + }, + "Secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "variable" + ], + "properties": { + "variable": { + "$ref": "#/definitions/Variable" + } + } + } + ] + }, + "Variable": { + "description": "The name of an an environment variable.", + "type": "string" + }, + "PoolSettings": { + "description": "Settings for the PostgreSQL connection pool", + "type": "object", + "properties": { + "maxConnections": { + "description": "maximum number of pool connections", + "default": 50, + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "poolTimeout": { + "description": "timeout for acquiring a connection from the pool (seconds)", + "default": 30, + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "idleTimeout": { + "description": "idle timeout for releasing a connection from the pool (seconds)", + "default": 180, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "checkConnectionAfterIdle": { + "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", + "default": 60, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "connectionLifetime": { + "description": "maximum lifetime for an individual connection (seconds)", + "default": 600, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + } + }, + "IsolationLevel": { + "description": "The isolation level of the transaction in which a query is executed.", + "oneOf": [ + { + "description": "Prevents reading data from another uncommitted transaction.", + "type": "string", + "enum": [ + "ReadCommitted" + ] + }, + { + "description": "Reading the same data twice is guaranteed to return the same result.", + "type": "string", + "enum": [ + "RepeatableRead" + ] + }, + { + "description": "Concurrent transactions behave identically to serializing them one at a time.", + "type": "string", + "enum": [ + "Serializable" + ] + } + ] + }, + "Metadata": { + "description": "Metadata information.", + "type": "object", + "properties": { + "tables": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/TablesInfo" + } + ] + }, + "types": { + "default": { + "scalar": {}, + "composite": {} + }, + "allOf": [ + { + "$ref": "#/definitions/Types" + } + ] + }, + "nativeOperations": { + "default": { + "queries": {}, + "mutations": {} + }, + "allOf": [ + { + "$ref": "#/definitions/NativeOperations" + } + ] + } + } + }, + "TablesInfo": { + "description": "Mapping from a \"table\" name to its information.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TableInfo" + } + }, + "TableInfo": { + "description": "Information about a database table (or any other kind of relation).", + "type": "object", + "required": [ + "columns", + "schemaName", + "tableName" + ], + "properties": { + "schemaName": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "columns": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ColumnInfo" + } + }, + "uniquenessConstraints": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/UniquenessConstraints" + } + ] + }, + "foreignRelations": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/ForeignRelations" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "ColumnInfo": { + "description": "Information about a database column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "hasDefault": { + "$ref": "#/definitions/HasDefault" + }, + "isIdentity": { + "$ref": "#/definitions/IsIdentity" + }, + "isGenerated": { + "$ref": "#/definitions/IsGenerated" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "Type": { + "description": "The type of values that a column, field, or argument may take.", + "oneOf": [ + { + "type": "object", + "required": [ + "scalarType" + ], + "properties": { + "scalarType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "compositeType" + ], + "properties": { + "compositeType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "arrayType" + ], + "properties": { + "arrayType": { + "$ref": "#/definitions/Type" + } + }, + "additionalProperties": false + } + ] + }, + "Nullable": { + "description": "Can this column contain null values", + "type": "string", + "enum": [ + "nullable", + "nonNullable" + ] + }, + "HasDefault": { + "description": "Does this column have a default value.", + "type": "string", + "enum": [ + "noDefault", + "hasDefault" + ] + }, + "IsIdentity": { + "description": "Is this column an identity column.", + "type": "string", + "enum": [ + "notIdentity", + "identityByDefault", + "identityAlways" + ] + }, + "IsGenerated": { + "description": "Is this column a generated column.", + "type": "string", + "enum": [ + "notGenerated", + "stored" + ] + }, + "UniquenessConstraints": { + "description": "A mapping from the name of a unique constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UniquenessConstraint" + } + }, + "UniquenessConstraint": { + "description": "The set of columns that make up a uniqueness constraint. We map each table column to their ndc field names.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "ForeignRelations": { + "description": "A mapping from the name of a foreign key constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ForeignRelation" + } + }, + "ForeignRelation": { + "description": "A foreign key constraint.", + "type": "object", + "required": [ + "columnMapping", + "foreignTable" + ], + "properties": { + "foreignSchema": { + "type": [ + "string", + "null" + ] + }, + "foreignTable": { + "type": "string" + }, + "columnMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Types": { + "description": "Information about types.", + "type": "object", + "required": [ + "composite", + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/definitions/ScalarTypes" + }, + "composite": { + "$ref": "#/definitions/CompositeTypes" + } + } + }, + "ScalarTypes": { + "description": "Map of all known/occurring scalar types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ScalarType" + } + }, + "ScalarType": { + "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", + "type": "object", + "required": [ + "aggregateFunctions", + "comparisonOperators", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "aggregateFunctions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AggregateFunction" + } + }, + "comparisonOperators": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ComparisonOperator" + } + }, + "typeRepresentation": { + "anyOf": [ + { + "$ref": "#/definitions/TypeRepresentation" + }, + { + "type": "null" + } + ] + } + } + }, + "AggregateFunction": { + "type": "object", + "required": [ + "returnType" + ], + "properties": { + "returnType": { + "type": "string" + } + } + }, + "ComparisonOperator": { + "description": "Represents a postgres binary comparison operator", + "type": "object", + "required": [ + "argumentType", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "type": "string" + }, + "operatorKind": { + "$ref": "#/definitions/OperatorKind" + }, + "argumentType": { + "type": "string" + }, + "isInfix": { + "default": true, + "type": "boolean" + } + } + }, + "OperatorKind": { + "description": "Is it a built-in operator, or a custom operator.", + "type": "string", + "enum": [ + "equal", + "in", + "custom" + ] + }, + "TypeRepresentation": { + "description": "Type representation of a scalar type.", + "oneOf": [ + { + "description": "JSON booleans", + "type": "string", + "enum": [ + "boolean" + ] + }, + { + "description": "Any JSON string", + "type": "string", + "enum": [ + "string" + ] + }, + { + "description": "float4", + "type": "string", + "enum": [ + "float32" + ] + }, + { + "description": "float8", + "type": "string", + "enum": [ + "float64" + ] + }, + { + "description": "int2", + "type": "string", + "enum": [ + "int16" + ] + }, + { + "description": "int4", + "type": "string", + "enum": [ + "int32" + ] + }, + { + "description": "int8 as integer", + "type": "string", + "enum": [ + "int64" + ] + }, + { + "description": "int8 as string", + "type": "string", + "enum": [ + "int64AsString" + ] + }, + { + "description": "numeric", + "type": "string", + "enum": [ + "bigDecimal" + ] + }, + { + "description": "numeric as string", + "type": "string", + "enum": [ + "bigDecimalAsString" + ] + }, + { + "description": "timestamp", + "type": "string", + "enum": [ + "timestamp" + ] + }, + { + "description": "timestamp with timezone", + "type": "string", + "enum": [ + "timestamptz" + ] + }, + { + "description": "time", + "type": "string", + "enum": [ + "time" + ] + }, + { + "description": "time with timezone", + "type": "string", + "enum": [ + "timetz" + ] + }, + { + "description": "date", + "type": "string", + "enum": [ + "date" + ] + }, + { + "description": "uuid", + "type": "string", + "enum": [ + "uUID" + ] + }, + { + "description": "geography", + "type": "string", + "enum": [ + "geography" + ] + }, + { + "description": "geometry", + "type": "string", + "enum": [ + "geometry" + ] + }, + { + "description": "Any JSON number", + "type": "string", + "enum": [ + "number" + ] + }, + { + "description": "Any JSON number, with no decimal part", + "type": "string", + "enum": [ + "integer" + ] + }, + { + "description": "An arbitrary json.", + "type": "string", + "enum": [ + "json" + ] + }, + { + "description": "One of the specified string values", + "type": "object", + "required": [ + "enum" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + ] + }, + "CompositeTypes": { + "description": "Map of all known composite types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CompositeType" + } + }, + "CompositeType": { + "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", + "type": "object", + "required": [ + "fields", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FieldInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "FieldInfo": { + "description": "Information about a composite type field.", + "type": "object", + "required": [ + "fieldName", + "type" + ], + "properties": { + "fieldName": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeOperations": { + "description": "Metadata information of Native Operations.", + "type": "object", + "required": [ + "mutations", + "queries" + ], + "properties": { + "queries": { + "description": "Native Queries.", + "allOf": [ + { + "$ref": "#/definitions/NativeQueries" + } + ] + }, + "mutations": { + "description": "Native Mutations.", + "allOf": [ + { + "$ref": "#/definitions/NativeMutations" + } + ] + } + } + }, + "NativeQueries": { + "description": "Metadata information of Native Queries.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "NativeQueryInfo": { + "description": "Information about a Native Operation", + "type": "object", + "required": [ + "columns", + "sql" + ], + "properties": { + "sql": { + "description": "SQL expression to use for the Native Operation. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", + "allOf": [ + { + "$ref": "#/definitions/NativeQuerySql" + } + ] + }, + "columns": { + "description": "Columns returned by the Native Operation", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "arguments": { + "description": "Names and types of arguments that can be passed to this Native Operation", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeQuerySql": { + "description": "Native Operation SQL location.", + "anyOf": [ + { + "description": "Refer to an external Native Operation SQL file.", + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "description": "Relative path to a sql file.", + "type": "string" + } + } + }, + { + "description": "Inline Native Operation SQL string.", + "type": "object", + "required": [ + "inline" + ], + "properties": { + "inline": { + "description": "An inline Native Operation SQL string.", + "allOf": [ + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + } + } + }, + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + }, + "InlineNativeQuerySql": { + "type": "string" + }, + "ReadOnlyColumnInfo": { + "description": "Information about a native query column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeMutations": { + "description": "Metadata information of Native Mutations.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "IntrospectionOptions": { + "description": "Options which only influence how the configuration is updated.", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTables": { + "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", + "default": [ + "public" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTypesAndProcedures": { + "description": "The types and procedures in these schemas will be returned unqualified.", + "default": [ + "public", + "pg_catalog", + "tiger" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ComparisonOperatorMapping" + } + }, + "introspectPrefixFunctionComparisonOperators": { + "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", + "default": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "typeRepresentations": { + "description": "The type representations to pick for base scalar types.", + "default": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + }, + "allOf": [ + { + "$ref": "#/definitions/TypeRepresentations" + } + ] + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + }, + "operatorKind": { + "description": "Equal, In or Custom.", + "allOf": [ + { + "$ref": "#/definitions/OperatorKind" + } + ] + } + } + }, + "TypeRepresentations": { + "description": "The type representations that guide introspection.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TypeRepresentation" + } + }, + "MutationsVersion": { + "description": "Which version of the generated mutations will be included in the schema", + "type": "string", + "enum": [ + "v1", + "v2" + ] + } + } +} diff --git a/hasura/industry/healthcare/patient_ops/metadata/.keep b/hasura/industry/healthcare/patient_ops/metadata/.keep new file mode 100644 index 00000000..e69de29b diff --git a/hasura/industry/healthcare/patient_ops/metadata/Cases.hml b/hasura/industry/healthcare/patient_ops/metadata/Cases.hml new file mode 100644 index 00000000..c139cbf4 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/Cases.hml @@ -0,0 +1,248 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Cases + fields: + - name: caseId + type: Int4! + - name: clinicId + type: Varchar! + - name: createdAt + type: Timestamp + - name: operatorId + type: Varchar + - name: patientId + type: Varchar + - name: procedureCode + type: Varchar + - name: recommendedDate + type: Date! + - name: region + type: Varchar + - name: status + type: Varchar + - name: urgencyLevel + type: Varchar + graphql: + typeName: Cases + inputTypeName: CasesInput + dataConnectorTypeMapping: + - dataConnectorName: operations + dataConnectorObjectType: cases + fieldMapping: + caseId: + column: + name: case_id + clinicId: + column: + name: clinic_id + createdAt: + column: + name: created_at + operatorId: + column: + name: operator_id + patientId: + column: + name: patient_id + procedureCode: + column: + name: procedure_code + recommendedDate: + column: + name: recommended_date + region: + column: + name: region + status: + column: + name: status + urgencyLevel: + column: + name: urgency_level + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Cases + permissions: + - role: admin + output: + allowedFields: + - caseId + - clinicId + - createdAt + - operatorId + - patientId + - procedureCode + - recommendedDate + - region + - status + - urgencyLevel + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: CasesBoolExp + operand: + object: + type: Cases + comparableFields: + - fieldName: caseId + booleanExpressionType: Int4BoolExp + - fieldName: clinicId + booleanExpressionType: VarcharBoolExp + - fieldName: createdAt + booleanExpressionType: TimestampBoolExp + - fieldName: operatorId + booleanExpressionType: VarcharBoolExp + - fieldName: patientId + booleanExpressionType: VarcharBoolExp + - fieldName: procedureCode + booleanExpressionType: VarcharBoolExp + - fieldName: recommendedDate + booleanExpressionType: DateBoolExp + - fieldName: region + booleanExpressionType: VarcharBoolExp + - fieldName: status + booleanExpressionType: VarcharBoolExp + - fieldName: urgencyLevel + booleanExpressionType: VarcharBoolExp + comparableRelationships: + - relationshipName: operator + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: CasesBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: CasesAggExp + operand: + object: + aggregatedType: Cases + aggregatableFields: + - fieldName: caseId + aggregateExpression: Int4AggExp + - fieldName: clinicId + aggregateExpression: VarcharAggExp + - fieldName: createdAt + aggregateExpression: TimestampAggExp + - fieldName: operatorId + aggregateExpression: VarcharAggExp + - fieldName: patientId + aggregateExpression: VarcharAggExp + - fieldName: procedureCode + aggregateExpression: VarcharAggExp + - fieldName: recommendedDate + aggregateExpression: DateAggExp + - fieldName: region + aggregateExpression: VarcharAggExp + - fieldName: status + aggregateExpression: VarcharAggExp + - fieldName: urgencyLevel + aggregateExpression: VarcharAggExp + count: + enable: true + graphql: + selectTypeName: CasesAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: CasesOrderByExp + operand: + object: + orderedType: Cases + orderableFields: + - fieldName: caseId + orderByExpression: Int4OrderByExp + - fieldName: clinicId + orderByExpression: VarcharOrderByExp + - fieldName: createdAt + orderByExpression: TimestampOrderByExp + - fieldName: operatorId + orderByExpression: VarcharOrderByExp + - fieldName: patientId + orderByExpression: VarcharOrderByExp + - fieldName: procedureCode + orderByExpression: VarcharOrderByExp + - fieldName: recommendedDate + orderByExpression: DateOrderByExp + - fieldName: region + orderByExpression: VarcharOrderByExp + - fieldName: status + orderByExpression: VarcharOrderByExp + - fieldName: urgencyLevel + orderByExpression: VarcharOrderByExp + orderableRelationships: + - relationshipName: operator + graphql: + expressionTypeName: CasesOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Cases + objectType: Cases + source: + dataConnectorName: operations + collection: cases + filterExpressionType: CasesBoolExp + aggregateExpression: CasesAggExp + orderByExpression: CasesOrderByExp + graphql: + selectMany: + queryRootField: cases + subscription: + rootField: cases + selectUniques: + - queryRootField: casesByCaseId + uniqueIdentifier: + - caseId + subscription: + rootField: casesByCaseId + filterInputTypeName: CasesFilterInput + aggregate: + queryRootField: casesAggregate + subscription: + rootField: casesAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Cases + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: operator + sourceType: Cases + target: + model: + name: Operators + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: operatorId + target: + modelField: + - fieldName: operatorId + diff --git a/hasura/industry/healthcare/patient_ops/metadata/InsurancePlans.hml b/hasura/industry/healthcare/patient_ops/metadata/InsurancePlans.hml new file mode 100644 index 00000000..3a26c4f5 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/InsurancePlans.hml @@ -0,0 +1,167 @@ +--- +kind: ObjectType +version: v1 +definition: + name: InsurancePlans + fields: + - name: payerName + type: Varchar_1 + - name: planId + type: Varchar_1! + - name: planName + type: Varchar_1 + graphql: + typeName: InsurancePlans + inputTypeName: InsurancePlansInput + dataConnectorTypeMapping: + - dataConnectorName: patients + dataConnectorObjectType: insurance_plans + fieldMapping: + payerName: + column: + name: payer_name + planId: + column: + name: plan_id + planName: + column: + name: plan_name + +--- +kind: TypePermissions +version: v1 +definition: + typeName: InsurancePlans + permissions: + - role: admin + output: + allowedFields: + - payerName + - planId + - planName + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: InsurancePlansBoolExp + operand: + object: + type: InsurancePlans + comparableFields: + - fieldName: payerName + booleanExpressionType: VarcharBoolExp_1 + - fieldName: planId + booleanExpressionType: VarcharBoolExp_1 + - fieldName: planName + booleanExpressionType: VarcharBoolExp_1 + comparableRelationships: + - relationshipName: patients + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: InsurancePlansBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: InsurancePlansAggExp + operand: + object: + aggregatedType: InsurancePlans + aggregatableFields: + - fieldName: payerName + aggregateExpression: VarcharAggExp_1 + - fieldName: planId + aggregateExpression: VarcharAggExp_1 + - fieldName: planName + aggregateExpression: VarcharAggExp_1 + count: + enable: true + graphql: + selectTypeName: InsurancePlansAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: InsurancePlansOrderByExp + operand: + object: + orderedType: InsurancePlans + orderableFields: + - fieldName: payerName + orderByExpression: Varchar1OrderByExp + - fieldName: planId + orderByExpression: Varchar1OrderByExp + - fieldName: planName + orderByExpression: Varchar1OrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: InsurancePlansOrderByExp + +--- +kind: Model +version: v2 +definition: + name: InsurancePlans + objectType: InsurancePlans + source: + dataConnectorName: patients + collection: insurance_plans + filterExpressionType: InsurancePlansBoolExp + aggregateExpression: InsurancePlansAggExp + orderByExpression: InsurancePlansOrderByExp + graphql: + selectMany: + queryRootField: insurancePlans + subscription: + rootField: insurancePlans + selectUniques: + - queryRootField: insurancePlansByPlanId + uniqueIdentifier: + - planId + subscription: + rootField: insurancePlansByPlanId + filterInputTypeName: InsurancePlansFilterInput + aggregate: + queryRootField: insurancePlansAggregate + subscription: + rootField: insurancePlansAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: InsurancePlans + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: patients + sourceType: InsurancePlans + target: + model: + name: Patients + relationshipType: Array + aggregate: + aggregateExpression: PatientsAggExp + mapping: + - source: + fieldPath: + - fieldName: planId + target: + modelField: + - fieldName: insurancePlanId + graphql: + aggregateFieldName: patientsAggregate + diff --git a/hasura/industry/healthcare/patient_ops/metadata/OperatorSchedule.hml b/hasura/industry/healthcare/patient_ops/metadata/OperatorSchedule.hml new file mode 100644 index 00000000..f97de781 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/OperatorSchedule.hml @@ -0,0 +1,194 @@ +--- +kind: ObjectType +version: v1 +definition: + name: OperatorSchedule + fields: + - name: bookedMinutes + type: Int4 + - name: maxMinutes + type: Int4 + - name: operatorId + type: Varchar + - name: scheduleId + type: Int4! + - name: workDate + type: Date + graphql: + typeName: OperatorSchedule + inputTypeName: OperatorScheduleInput + dataConnectorTypeMapping: + - dataConnectorName: operations + dataConnectorObjectType: operator_schedule + fieldMapping: + bookedMinutes: + column: + name: booked_minutes + maxMinutes: + column: + name: max_minutes + operatorId: + column: + name: operator_id + scheduleId: + column: + name: schedule_id + workDate: + column: + name: work_date + +--- +kind: TypePermissions +version: v1 +definition: + typeName: OperatorSchedule + permissions: + - role: admin + output: + allowedFields: + - bookedMinutes + - maxMinutes + - operatorId + - scheduleId + - workDate + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: OperatorScheduleBoolExp + operand: + object: + type: OperatorSchedule + comparableFields: + - fieldName: bookedMinutes + booleanExpressionType: Int4BoolExp + - fieldName: maxMinutes + booleanExpressionType: Int4BoolExp + - fieldName: operatorId + booleanExpressionType: VarcharBoolExp + - fieldName: scheduleId + booleanExpressionType: Int4BoolExp + - fieldName: workDate + booleanExpressionType: DateBoolExp + comparableRelationships: + - relationshipName: operator + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: OperatorScheduleBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: OperatorScheduleAggExp + operand: + object: + aggregatedType: OperatorSchedule + aggregatableFields: + - fieldName: bookedMinutes + aggregateExpression: Int4AggExp + - fieldName: maxMinutes + aggregateExpression: Int4AggExp + - fieldName: operatorId + aggregateExpression: VarcharAggExp + - fieldName: scheduleId + aggregateExpression: Int4AggExp + - fieldName: workDate + aggregateExpression: DateAggExp + count: + enable: true + graphql: + selectTypeName: OperatorScheduleAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: OperatorScheduleOrderByExp + operand: + object: + orderedType: OperatorSchedule + orderableFields: + - fieldName: bookedMinutes + orderByExpression: Int4OrderByExp + - fieldName: maxMinutes + orderByExpression: Int4OrderByExp + - fieldName: operatorId + orderByExpression: VarcharOrderByExp + - fieldName: scheduleId + orderByExpression: Int4OrderByExp + - fieldName: workDate + orderByExpression: DateOrderByExp + orderableRelationships: + - relationshipName: operator + graphql: + expressionTypeName: OperatorScheduleOrderByExp + +--- +kind: Model +version: v2 +definition: + name: OperatorSchedule + objectType: OperatorSchedule + source: + dataConnectorName: operations + collection: operator_schedule + filterExpressionType: OperatorScheduleBoolExp + aggregateExpression: OperatorScheduleAggExp + orderByExpression: OperatorScheduleOrderByExp + graphql: + selectMany: + queryRootField: operatorSchedule + subscription: + rootField: operatorSchedule + selectUniques: + - queryRootField: operatorScheduleByOperatorScheduleOperatorIdWorkDateKey + uniqueIdentifier: + - operatorId + - workDate + subscription: + rootField: operatorScheduleByOperatorScheduleOperatorIdWorkDateKey + - queryRootField: operatorScheduleByScheduleId + uniqueIdentifier: + - scheduleId + subscription: + rootField: operatorScheduleByScheduleId + filterInputTypeName: OperatorScheduleFilterInput + aggregate: + queryRootField: operatorScheduleAggregate + subscription: + rootField: operatorScheduleAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: OperatorSchedule + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: operator + sourceType: OperatorSchedule + target: + model: + name: Operators + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: operatorId + target: + modelField: + - fieldName: operatorId + diff --git a/hasura/industry/healthcare/patient_ops/metadata/Operators.hml b/hasura/industry/healthcare/patient_ops/metadata/Operators.hml new file mode 100644 index 00000000..cb07de66 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/Operators.hml @@ -0,0 +1,202 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Operators + fields: + - name: fullName + type: Varchar + - name: operatorId + type: Varchar! + - name: region + type: Varchar + - name: specialty + type: Varchar + graphql: + typeName: Operators + inputTypeName: OperatorsInput + dataConnectorTypeMapping: + - dataConnectorName: operations + dataConnectorObjectType: operators + fieldMapping: + fullName: + column: + name: full_name + operatorId: + column: + name: operator_id + region: + column: + name: region + specialty: + column: + name: specialty + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Operators + permissions: + - role: admin + output: + allowedFields: + - fullName + - operatorId + - region + - specialty + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: OperatorsBoolExp + operand: + object: + type: Operators + comparableFields: + - fieldName: fullName + booleanExpressionType: VarcharBoolExp + - fieldName: operatorId + booleanExpressionType: VarcharBoolExp + - fieldName: region + booleanExpressionType: VarcharBoolExp + - fieldName: specialty + booleanExpressionType: VarcharBoolExp + comparableRelationships: + - relationshipName: cases + - relationshipName: operatorSchedules + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: OperatorsBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: OperatorsAggExp + operand: + object: + aggregatedType: Operators + aggregatableFields: + - fieldName: fullName + aggregateExpression: VarcharAggExp + - fieldName: operatorId + aggregateExpression: VarcharAggExp + - fieldName: region + aggregateExpression: VarcharAggExp + - fieldName: specialty + aggregateExpression: VarcharAggExp + count: + enable: true + graphql: + selectTypeName: OperatorsAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: OperatorsOrderByExp + operand: + object: + orderedType: Operators + orderableFields: + - fieldName: fullName + orderByExpression: VarcharOrderByExp + - fieldName: operatorId + orderByExpression: VarcharOrderByExp + - fieldName: region + orderByExpression: VarcharOrderByExp + - fieldName: specialty + orderByExpression: VarcharOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: OperatorsOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Operators + objectType: Operators + source: + dataConnectorName: operations + collection: operators + filterExpressionType: OperatorsBoolExp + aggregateExpression: OperatorsAggExp + orderByExpression: OperatorsOrderByExp + graphql: + selectMany: + queryRootField: operators + subscription: + rootField: operators + selectUniques: + - queryRootField: operatorsByOperatorId + uniqueIdentifier: + - operatorId + subscription: + rootField: operatorsByOperatorId + filterInputTypeName: OperatorsFilterInput + aggregate: + queryRootField: operatorsAggregate + subscription: + rootField: operatorsAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Operators + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: cases + sourceType: Operators + target: + model: + name: Cases + relationshipType: Array + aggregate: + aggregateExpression: CasesAggExp + mapping: + - source: + fieldPath: + - fieldName: operatorId + target: + modelField: + - fieldName: operatorId + graphql: + aggregateFieldName: casesAggregate + +--- +kind: Relationship +version: v1 +definition: + name: operatorSchedules + sourceType: Operators + target: + model: + name: OperatorSchedule + relationshipType: Array + aggregate: + aggregateExpression: OperatorScheduleAggExp + mapping: + - source: + fieldPath: + - fieldName: operatorId + target: + modelField: + - fieldName: operatorId + graphql: + aggregateFieldName: operatorSchedulesAggregate + diff --git a/hasura/industry/healthcare/patient_ops/metadata/Patients_1.hml b/hasura/industry/healthcare/patient_ops/metadata/Patients_1.hml new file mode 100644 index 00000000..1483c2cf --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/Patients_1.hml @@ -0,0 +1,188 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Patients + fields: + - name: dateOfBirth + type: Date_1 + - name: firstName + type: Varchar_1 + - name: insurancePlanId + type: Varchar_1 + - name: lastName + type: Varchar_1 + - name: patientId + type: Varchar_1! + graphql: + typeName: Patients + inputTypeName: PatientsInput + dataConnectorTypeMapping: + - dataConnectorName: patients + dataConnectorObjectType: patients + fieldMapping: + dateOfBirth: + column: + name: date_of_birth + firstName: + column: + name: first_name + insurancePlanId: + column: + name: insurance_plan_id + lastName: + column: + name: last_name + patientId: + column: + name: patient_id + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Patients + permissions: + - role: admin + output: + allowedFields: + - dateOfBirth + - firstName + - insurancePlanId + - lastName + - patientId + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: PatientsBoolExp + operand: + object: + type: Patients + comparableFields: + - fieldName: dateOfBirth + booleanExpressionType: DateBoolExp_1 + - fieldName: firstName + booleanExpressionType: VarcharBoolExp_1 + - fieldName: insurancePlanId + booleanExpressionType: VarcharBoolExp_1 + - fieldName: lastName + booleanExpressionType: VarcharBoolExp_1 + - fieldName: patientId + booleanExpressionType: VarcharBoolExp_1 + comparableRelationships: + - relationshipName: insurancePlan + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: PatientsBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: PatientsAggExp + operand: + object: + aggregatedType: Patients + aggregatableFields: + - fieldName: dateOfBirth + aggregateExpression: DateAggExp_1 + - fieldName: firstName + aggregateExpression: VarcharAggExp_1 + - fieldName: insurancePlanId + aggregateExpression: VarcharAggExp_1 + - fieldName: lastName + aggregateExpression: VarcharAggExp_1 + - fieldName: patientId + aggregateExpression: VarcharAggExp_1 + count: + enable: true + graphql: + selectTypeName: PatientsAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: PatientsOrderByExp + operand: + object: + orderedType: Patients + orderableFields: + - fieldName: dateOfBirth + orderByExpression: Date1OrderByExp + - fieldName: firstName + orderByExpression: Varchar1OrderByExp + - fieldName: insurancePlanId + orderByExpression: Varchar1OrderByExp + - fieldName: lastName + orderByExpression: Varchar1OrderByExp + - fieldName: patientId + orderByExpression: Varchar1OrderByExp + orderableRelationships: + - relationshipName: insurancePlan + graphql: + expressionTypeName: PatientsOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Patients + objectType: Patients + source: + dataConnectorName: patients + collection: patients + filterExpressionType: PatientsBoolExp + aggregateExpression: PatientsAggExp + orderByExpression: PatientsOrderByExp + graphql: + selectMany: + queryRootField: patients + subscription: + rootField: patients + selectUniques: + - queryRootField: patientsByPatientId + uniqueIdentifier: + - patientId + subscription: + rootField: patientsByPatientId + filterInputTypeName: PatientsFilterInput + aggregate: + queryRootField: patientsAggregate + subscription: + rootField: patientsAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Patients + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: insurancePlan + sourceType: Patients + target: + model: + name: InsurancePlans + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: insurancePlanId + target: + modelField: + - fieldName: planId + diff --git a/hasura/industry/healthcare/patient_ops/metadata/operations-types.hml b/hasura/industry/healthcare/patient_ops/metadata/operations-types.hml new file mode 100644 index 00000000..2f377ad2 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/operations-types.hml @@ -0,0 +1,612 @@ +--- +kind: ScalarType +version: v1 +definition: + name: Int4 + graphql: + typeName: Int4 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: Int4BoolExp + operand: + scalar: + type: Int4 + comparisonOperators: + - name: _eq + argumentType: Int4! + - name: _gt + argumentType: Int4! + - name: _gte + argumentType: Int4! + - name: _in + argumentType: "[Int4!]!" + - name: _lt + argumentType: Int4! + - name: _lte + argumentType: Int4! + - name: _neq + argumentType: Int4! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: int4 + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: Int4BoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: int4 + representation: Int4 + graphql: + comparisonExpressionTypeName: Int4ComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Varchar + graphql: + typeName: Varchar + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: VarcharBoolExp + operand: + scalar: + type: Varchar + comparisonOperators: + - name: _eq + argumentType: Varchar! + - name: _gt + argumentType: Varchar! + - name: _gte + argumentType: Varchar! + - name: _ilike + argumentType: Varchar! + - name: _in + argumentType: "[Varchar!]!" + - name: _iregex + argumentType: Varchar! + - name: _like + argumentType: Varchar! + - name: _lt + argumentType: Varchar! + - name: _lte + argumentType: Varchar! + - name: _neq + argumentType: Varchar! + - name: _nilike + argumentType: Varchar! + - name: _niregex + argumentType: Varchar! + - name: _nlike + argumentType: Varchar! + - name: _nregex + argumentType: Varchar! + - name: _regex + argumentType: Varchar! + - name: starts_with + argumentType: Varchar! + - name: ts_match_tt + argumentType: Varchar! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: varchar + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: VarcharBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: varchar + representation: Varchar + graphql: + comparisonExpressionTypeName: VarcharComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Timestamp + graphql: + typeName: Timestamp + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TimestampBoolExp + operand: + scalar: + type: Timestamp + comparisonOperators: + - name: _eq + argumentType: Timestamp! + - name: _gt + argumentType: Timestamp! + - name: _gte + argumentType: Timestamp! + - name: _in + argumentType: "[Timestamp!]!" + - name: _lt + argumentType: Timestamp! + - name: _lte + argumentType: Timestamp! + - name: _neq + argumentType: Timestamp! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: timestamp + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TimestampBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: timestamp + representation: Timestamp + graphql: + comparisonExpressionTypeName: TimestampComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Date + graphql: + typeName: Date + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DateBoolExp + operand: + scalar: + type: Date + comparisonOperators: + - name: _eq + argumentType: Date! + - name: _gt + argumentType: Date! + - name: _gte + argumentType: Date! + - name: _in + argumentType: "[Date!]!" + - name: _lt + argumentType: Date! + - name: _lte + argumentType: Date! + - name: _neq + argumentType: Date! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: date + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DateBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: date + representation: Date + graphql: + comparisonExpressionTypeName: DateComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Numeric + graphql: + typeName: Numeric + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: NumericBoolExp + operand: + scalar: + type: Numeric + comparisonOperators: + - name: _eq + argumentType: Numeric! + - name: _gt + argumentType: Numeric! + - name: _gte + argumentType: Numeric! + - name: _in + argumentType: "[Numeric!]!" + - name: _lt + argumentType: Numeric! + - name: _lte + argumentType: Numeric! + - name: _neq + argumentType: Numeric! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: numeric + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: NumericBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: numeric + representation: Numeric + graphql: + comparisonExpressionTypeName: NumericComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Int8 + graphql: + typeName: Int8 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: Int8BoolExp + operand: + scalar: + type: Int8 + comparisonOperators: + - name: _eq + argumentType: Int8! + - name: _gt + argumentType: Int8! + - name: _gte + argumentType: Int8! + - name: _in + argumentType: "[Int8!]!" + - name: _lt + argumentType: Int8! + - name: _lte + argumentType: Int8! + - name: _neq + argumentType: Int8! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: int8 + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: Int8BoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: int8 + representation: Int8 + graphql: + comparisonExpressionTypeName: Int8ComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: Int4AggExp + operand: + scalar: + aggregatedType: Int4 + aggregationFunctions: + - name: avg + returnType: Numeric + - name: bit_and + returnType: Int4 + - name: bit_or + returnType: Int4 + - name: bit_xor + returnType: Int4 + - name: max + returnType: Int4 + - name: min + returnType: Int4 + - name: stddev + returnType: Numeric + - name: stddev_pop + returnType: Numeric + - name: stddev_samp + returnType: Numeric + - name: sum + returnType: Int8 + - name: var_pop + returnType: Numeric + - name: var_samp + returnType: Numeric + - name: variance + returnType: Numeric + dataConnectorAggregationFunctionMapping: + - dataConnectorName: operations + dataConnectorScalarType: int4 + functionMapping: + avg: + name: avg + bit_and: + name: bit_and + bit_or: + name: bit_or + bit_xor: + name: bit_xor + max: + name: max + min: + name: min + stddev: + name: stddev + stddev_pop: + name: stddev_pop + stddev_samp: + name: stddev_samp + sum: + name: sum + var_pop: + name: var_pop + var_samp: + name: var_samp + variance: + name: variance + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: Int4AggExp + +--- +kind: ScalarType +version: v1 +definition: + name: Text + graphql: + typeName: Text + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TextBoolExp + operand: + scalar: + type: Text + comparisonOperators: + - name: _eq + argumentType: Text! + - name: _gt + argumentType: Text! + - name: _gte + argumentType: Text! + - name: _ilike + argumentType: Text! + - name: _in + argumentType: "[Text!]!" + - name: _iregex + argumentType: Text! + - name: _like + argumentType: Text! + - name: _lt + argumentType: Text! + - name: _lte + argumentType: Text! + - name: _neq + argumentType: Text! + - name: _nilike + argumentType: Text! + - name: _niregex + argumentType: Text! + - name: _nlike + argumentType: Text! + - name: _nregex + argumentType: Text! + - name: _regex + argumentType: Text! + - name: starts_with + argumentType: Text! + - name: ts_match_tt + argumentType: Text! + dataConnectorOperatorMapping: + - dataConnectorName: operations + dataConnectorScalarType: text + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TextBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: operations + dataConnectorScalarType: text + representation: Text + graphql: + comparisonExpressionTypeName: TextComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: VarcharAggExp + operand: + scalar: + aggregatedType: Varchar + aggregationFunctions: + - name: max + returnType: Text + - name: min + returnType: Text + dataConnectorAggregationFunctionMapping: + - dataConnectorName: operations + dataConnectorScalarType: varchar + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: VarcharAggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: TimestampAggExp + operand: + scalar: + aggregatedType: Timestamp + aggregationFunctions: + - name: max + returnType: Timestamp + - name: min + returnType: Timestamp + dataConnectorAggregationFunctionMapping: + - dataConnectorName: operations + dataConnectorScalarType: timestamp + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: TimestampAggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DateAggExp + operand: + scalar: + aggregatedType: Date + aggregationFunctions: + - name: max + returnType: Date + - name: min + returnType: Date + dataConnectorAggregationFunctionMapping: + - dataConnectorName: operations + dataConnectorScalarType: date + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: DateAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: Int4OrderByExp + operand: + scalar: + orderedType: Int4 + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: Int4OrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: VarcharOrderByExp + operand: + scalar: + orderedType: Varchar + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: VarcharOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: TimestampOrderByExp + operand: + scalar: + orderedType: Timestamp + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: TimestampOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: DateOrderByExp + operand: + scalar: + orderedType: Date + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: DateOrderByExp + diff --git a/hasura/industry/healthcare/patient_ops/metadata/operations.hml b/hasura/industry/healthcare/patient_ops/metadata/operations.hml new file mode 100644 index 00000000..e24ffc4e --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/operations.hml @@ -0,0 +1,1679 @@ +kind: DataConnectorLink +version: v1 +definition: + name: operations + url: + readWriteUrls: + read: + valueFromEnv: PATIENT_OPS_OPERATIONS_READ_URL + write: + valueFromEnv: PATIENT_OPS_OPERATIONS_WRITE_URL + headers: + Authorization: + valueFromEnv: PATIENT_OPS_OPERATIONS_AUTHORIZATION_HEADER + schema: + version: v0.1 + schema: + scalar_types: + date: + representation: + type: date + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: date + min: + result_type: + type: nullable + underlying_type: + type: named + name: date + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: date + _gte: + type: custom + argument_type: + type: named + name: date + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: date + _lte: + type: custom + argument_type: + type: named + name: date + _neq: + type: custom + argument_type: + type: named + name: date + int4: + representation: + type: int32 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + bit_and: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + bit_or: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + bit_xor: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + max: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + min: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: int4 + _gte: + type: custom + argument_type: + type: named + name: int4 + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: int4 + _lte: + type: custom + argument_type: + type: named + name: int4 + _neq: + type: custom + argument_type: + type: named + name: int4 + int8: + representation: + type: int64 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + bit_and: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + bit_or: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + bit_xor: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + max: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + min: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: int8 + _gte: + type: custom + argument_type: + type: named + name: int8 + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: int8 + _lte: + type: custom + argument_type: + type: named + name: int8 + _neq: + type: custom + argument_type: + type: named + name: int8 + numeric: + representation: + type: bigdecimal + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + max: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + min: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: numeric + _gte: + type: custom + argument_type: + type: named + name: numeric + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: numeric + _lte: + type: custom + argument_type: + type: named + name: numeric + _neq: + type: custom + argument_type: + type: named + name: numeric + text: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: text + _gte: + type: custom + argument_type: + type: named + name: text + _ilike: + type: custom + argument_type: + type: named + name: text + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: text + _like: + type: custom + argument_type: + type: named + name: text + _lt: + type: custom + argument_type: + type: named + name: text + _lte: + type: custom + argument_type: + type: named + name: text + _neq: + type: custom + argument_type: + type: named + name: text + _nilike: + type: custom + argument_type: + type: named + name: text + _niregex: + type: custom + argument_type: + type: named + name: text + _nlike: + type: custom + argument_type: + type: named + name: text + _nregex: + type: custom + argument_type: + type: named + name: text + _regex: + type: custom + argument_type: + type: named + name: text + starts_with: + type: custom + argument_type: + type: named + name: text + ts_match_tt: + type: custom + argument_type: + type: named + name: text + timestamp: + representation: + type: timestamp + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: timestamp + min: + result_type: + type: nullable + underlying_type: + type: named + name: timestamp + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: timestamp + _gte: + type: custom + argument_type: + type: named + name: timestamp + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: timestamp + _lte: + type: custom + argument_type: + type: named + name: timestamp + _neq: + type: custom + argument_type: + type: named + name: timestamp + varchar: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: varchar + _gte: + type: custom + argument_type: + type: named + name: varchar + _ilike: + type: custom + argument_type: + type: named + name: varchar + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: varchar + _like: + type: custom + argument_type: + type: named + name: varchar + _lt: + type: custom + argument_type: + type: named + name: varchar + _lte: + type: custom + argument_type: + type: named + name: varchar + _neq: + type: custom + argument_type: + type: named + name: varchar + _nilike: + type: custom + argument_type: + type: named + name: varchar + _niregex: + type: custom + argument_type: + type: named + name: varchar + _nlike: + type: custom + argument_type: + type: named + name: varchar + _nregex: + type: custom + argument_type: + type: named + name: varchar + _regex: + type: custom + argument_type: + type: named + name: varchar + starts_with: + type: custom + argument_type: + type: named + name: varchar + ts_match_tt: + type: custom + argument_type: + type: named + name: varchar + object_types: + cases: + fields: + case_id: + type: + type: named + name: int4 + clinic_id: + type: + type: named + name: varchar + created_at: + type: + type: nullable + underlying_type: + type: named + name: timestamp + operator_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + patient_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + procedure_code: + type: + type: nullable + underlying_type: + type: named + name: varchar + recommended_date: + type: + type: named + name: date + region: + type: + type: nullable + underlying_type: + type: named + name: varchar + status: + type: + type: nullable + underlying_type: + type: named + name: varchar + urgency_level: + type: + type: nullable + underlying_type: + type: named + name: varchar + delete_cases_by_case_id_response: + description: Responses from the 'delete_cases_by_case_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: cases + delete_operator_schedule_by_operator_id_and_work_date_response: + description: Responses from the 'delete_operator_schedule_by_operator_id_and_work_date' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operator_schedule + delete_operator_schedule_by_schedule_id_response: + description: Responses from the 'delete_operator_schedule_by_schedule_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operator_schedule + delete_operators_by_operator_id_response: + description: Responses from the 'delete_operators_by_operator_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operators + insert_cases_object: + fields: + case_id: + type: + type: nullable + underlying_type: + type: named + name: int4 + clinic_id: + type: + type: named + name: varchar + created_at: + type: + type: nullable + underlying_type: + type: named + name: timestamp + operator_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + patient_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + procedure_code: + type: + type: nullable + underlying_type: + type: named + name: varchar + recommended_date: + type: + type: named + name: date + region: + type: + type: nullable + underlying_type: + type: named + name: varchar + status: + type: + type: nullable + underlying_type: + type: named + name: varchar + urgency_level: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_cases_response: + description: Responses from the 'insert_cases' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: cases + insert_operator_schedule_object: + fields: + booked_minutes: + type: + type: nullable + underlying_type: + type: named + name: int4 + max_minutes: + type: + type: nullable + underlying_type: + type: named + name: int4 + operator_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + schedule_id: + type: + type: nullable + underlying_type: + type: named + name: int4 + work_date: + type: + type: nullable + underlying_type: + type: named + name: date + insert_operator_schedule_response: + description: Responses from the 'insert_operator_schedule' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operator_schedule + insert_operators_object: + fields: + full_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + operator_id: + type: + type: named + name: varchar + region: + type: + type: nullable + underlying_type: + type: named + name: varchar + specialty: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_operators_response: + description: Responses from the 'insert_operators' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operators + operator_schedule: + fields: + booked_minutes: + type: + type: nullable + underlying_type: + type: named + name: int4 + max_minutes: + type: + type: nullable + underlying_type: + type: named + name: int4 + operator_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + schedule_id: + type: + type: named + name: int4 + work_date: + type: + type: nullable + underlying_type: + type: named + name: date + operators: + fields: + full_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + operator_id: + type: + type: named + name: varchar + region: + type: + type: nullable + underlying_type: + type: named + name: varchar + specialty: + type: + type: nullable + underlying_type: + type: named + name: varchar + update_cases_by_case_id_response: + description: Responses from the 'update_cases_by_case_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: cases + update_cases_by_case_id_update_columns: + description: Update the columns of the 'cases' collection + fields: + case_id: + description: Update the 'case_id' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_case_id + clinic_id: + description: Update the 'clinic_id' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_clinic_id + created_at: + description: Update the 'created_at' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_created_at + operator_id: + description: Update the 'operator_id' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_operator_id + patient_id: + description: Update the 'patient_id' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_patient_id + procedure_code: + description: Update the 'procedure_code' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_procedure_code + recommended_date: + description: Update the 'recommended_date' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_recommended_date + region: + description: Update the 'region' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_region + status: + description: Update the 'status' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_status + urgency_level: + description: Update the 'urgency_level' column in the 'cases' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_cases_urgency_level + update_column_cases_case_id: + description: Update the 'case_id' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: int4 + update_column_cases_clinic_id: + description: Update the 'clinic_id' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_cases_created_at: + description: Update the 'created_at' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: timestamp + update_column_cases_operator_id: + description: Update the 'operator_id' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_cases_patient_id: + description: Update the 'patient_id' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_cases_procedure_code: + description: Update the 'procedure_code' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_cases_recommended_date: + description: Update the 'recommended_date' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: date + update_column_cases_region: + description: Update the 'region' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_cases_status: + description: Update the 'status' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_cases_urgency_level: + description: Update the 'urgency_level' column in the 'cases' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_operator_schedule_booked_minutes: + description: Update the 'booked_minutes' column in the 'operator_schedule' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: int4 + update_column_operator_schedule_max_minutes: + description: Update the 'max_minutes' column in the 'operator_schedule' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: int4 + update_column_operator_schedule_operator_id: + description: Update the 'operator_id' column in the 'operator_schedule' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_operator_schedule_schedule_id: + description: Update the 'schedule_id' column in the 'operator_schedule' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: int4 + update_column_operator_schedule_work_date: + description: Update the 'work_date' column in the 'operator_schedule' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: date + update_column_operators_full_name: + description: Update the 'full_name' column in the 'operators' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_operators_operator_id: + description: Update the 'operator_id' column in the 'operators' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_operators_region: + description: Update the 'region' column in the 'operators' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_operators_specialty: + description: Update the 'specialty' column in the 'operators' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_operator_schedule_by_operator_id_and_work_date_response: + description: Responses from the 'update_operator_schedule_by_operator_id_and_work_date' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operator_schedule + update_operator_schedule_by_operator_id_and_work_date_update_columns: + description: Update the columns of the 'operator_schedule' collection + fields: + booked_minutes: + description: Update the 'booked_minutes' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_booked_minutes + max_minutes: + description: Update the 'max_minutes' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_max_minutes + operator_id: + description: Update the 'operator_id' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_operator_id + schedule_id: + description: Update the 'schedule_id' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_schedule_id + work_date: + description: Update the 'work_date' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_work_date + update_operator_schedule_by_schedule_id_response: + description: Responses from the 'update_operator_schedule_by_schedule_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operator_schedule + update_operator_schedule_by_schedule_id_update_columns: + description: Update the columns of the 'operator_schedule' collection + fields: + booked_minutes: + description: Update the 'booked_minutes' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_booked_minutes + max_minutes: + description: Update the 'max_minutes' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_max_minutes + operator_id: + description: Update the 'operator_id' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_operator_id + schedule_id: + description: Update the 'schedule_id' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_schedule_id + work_date: + description: Update the 'work_date' column in the 'operator_schedule' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operator_schedule_work_date + update_operators_by_operator_id_response: + description: Responses from the 'update_operators_by_operator_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: operators + update_operators_by_operator_id_update_columns: + description: Update the columns of the 'operators' collection + fields: + full_name: + description: Update the 'full_name' column in the 'operators' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operators_full_name + operator_id: + description: Update the 'operator_id' column in the 'operators' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operators_operator_id + region: + description: Update the 'region' column in the 'operators' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operators_region + specialty: + description: Update the 'specialty' column in the 'operators' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_operators_specialty + collections: + - name: cases + arguments: {} + type: cases + uniqueness_constraints: + cases_pkey: + unique_columns: + - case_id + foreign_keys: + cases_operator_id_fkey: + column_mapping: + operator_id: operator_id + foreign_collection: operators + - name: operator_schedule + arguments: {} + type: operator_schedule + uniqueness_constraints: + operator_schedule_operator_id_work_date_key: + unique_columns: + - operator_id + - work_date + operator_schedule_pkey: + unique_columns: + - schedule_id + foreign_keys: + operator_schedule_operator_id_fkey: + column_mapping: + operator_id: operator_id + foreign_collection: operators + - name: operators + arguments: {} + type: operators + uniqueness_constraints: + operators_pkey: + unique_columns: + - operator_id + foreign_keys: {} + functions: [] + procedures: + - name: delete_cases_by_case_id + description: Delete any row on the 'cases' collection using the 'case_id' key + arguments: + key_case_id: + type: + type: named + name: int4 + pre_check: + description: Delete permission predicate over the 'cases' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: cases + result_type: + type: named + name: delete_cases_by_case_id_response + - name: delete_operator_schedule_by_operator_id_and_work_date + description: Delete any row on the 'operator_schedule' collection using the 'operator_id' and 'work_date' keys + arguments: + key_operator_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + key_work_date: + type: + type: nullable + underlying_type: + type: named + name: date + pre_check: + description: Delete permission predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + result_type: + type: named + name: delete_operator_schedule_by_operator_id_and_work_date_response + - name: delete_operator_schedule_by_schedule_id + description: Delete any row on the 'operator_schedule' collection using the 'schedule_id' key + arguments: + key_schedule_id: + type: + type: named + name: int4 + pre_check: + description: Delete permission predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + result_type: + type: named + name: delete_operator_schedule_by_schedule_id_response + - name: delete_operators_by_operator_id + description: Delete any row on the 'operators' collection using the 'operator_id' key + arguments: + key_operator_id: + type: + type: named + name: varchar + pre_check: + description: Delete permission predicate over the 'operators' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operators + result_type: + type: named + name: delete_operators_by_operator_id_response + - name: insert_cases + description: Insert into the cases table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_cases_object + post_check: + description: Insert permission predicate over the 'cases' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: cases + result_type: + type: named + name: insert_cases_response + - name: insert_operator_schedule + description: Insert into the operator_schedule table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_operator_schedule_object + post_check: + description: Insert permission predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + result_type: + type: named + name: insert_operator_schedule_response + - name: insert_operators + description: Insert into the operators table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_operators_object + post_check: + description: Insert permission predicate over the 'operators' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operators + result_type: + type: named + name: insert_operators_response + - name: update_cases_by_case_id + description: Update any row on the 'cases' collection using the 'case_id' key + arguments: + key_case_id: + type: + type: named + name: int4 + post_check: + description: Update permission post-condition predicate over the 'cases' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: cases + pre_check: + description: Update permission pre-condition predicate over the 'cases' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: cases + update_columns: + type: + type: named + name: update_cases_by_case_id_update_columns + result_type: + type: named + name: update_cases_by_case_id_response + - name: update_operator_schedule_by_operator_id_and_work_date + description: Update any row on the 'operator_schedule' collection using the 'operator_id' and 'work_date' keys + arguments: + key_operator_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + key_work_date: + type: + type: nullable + underlying_type: + type: named + name: date + post_check: + description: Update permission post-condition predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + pre_check: + description: Update permission pre-condition predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + update_columns: + type: + type: named + name: update_operator_schedule_by_operator_id_and_work_date_update_columns + result_type: + type: named + name: update_operator_schedule_by_operator_id_and_work_date_response + - name: update_operator_schedule_by_schedule_id + description: Update any row on the 'operator_schedule' collection using the 'schedule_id' key + arguments: + key_schedule_id: + type: + type: named + name: int4 + post_check: + description: Update permission post-condition predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + pre_check: + description: Update permission pre-condition predicate over the 'operator_schedule' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operator_schedule + update_columns: + type: + type: named + name: update_operator_schedule_by_schedule_id_update_columns + result_type: + type: named + name: update_operator_schedule_by_schedule_id_response + - name: update_operators_by_operator_id + description: Update any row on the 'operators' collection using the 'operator_id' key + arguments: + key_operator_id: + type: + type: named + name: varchar + post_check: + description: Update permission post-condition predicate over the 'operators' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operators + pre_check: + description: Update permission pre-condition predicate over the 'operators' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: operators + update_columns: + type: + type: named + name: update_operators_by_operator_id_update_columns + result_type: + type: named + name: update_operators_by_operator_id_response + capabilities: + version: 0.1.6 + capabilities: + query: + aggregates: {} + variables: {} + explain: {} + nested_fields: + filter_by: {} + order_by: {} + exists: + nested_collections: {} + mutation: + transactional: {} + explain: {} + relationships: + relation_comparisons: {} + order_by_aggregate: {} diff --git a/hasura/industry/healthcare/patient_ops/metadata/patients-types.hml b/hasura/industry/healthcare/patient_ops/metadata/patients-types.hml new file mode 100644 index 00000000..3ba8cd02 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/patients-types.hml @@ -0,0 +1,278 @@ +--- +kind: ScalarType +version: v1 +definition: + name: Varchar_1 + graphql: + typeName: Varchar1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: VarcharBoolExp_1 + operand: + scalar: + type: Varchar_1 + comparisonOperators: + - name: _eq + argumentType: Varchar_1! + - name: _gt + argumentType: Varchar_1! + - name: _gte + argumentType: Varchar_1! + - name: _ilike + argumentType: Varchar_1! + - name: _in + argumentType: "[Varchar_1!]!" + - name: _iregex + argumentType: Varchar_1! + - name: _like + argumentType: Varchar_1! + - name: _lt + argumentType: Varchar_1! + - name: _lte + argumentType: Varchar_1! + - name: _neq + argumentType: Varchar_1! + - name: _nilike + argumentType: Varchar_1! + - name: _niregex + argumentType: Varchar_1! + - name: _nlike + argumentType: Varchar_1! + - name: _nregex + argumentType: Varchar_1! + - name: _regex + argumentType: Varchar_1! + - name: starts_with + argumentType: Varchar_1! + - name: ts_match_tt + argumentType: Varchar_1! + dataConnectorOperatorMapping: + - dataConnectorName: patients + dataConnectorScalarType: varchar + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: VarcharBoolExp1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: patients + dataConnectorScalarType: varchar + representation: Varchar_1 + graphql: + comparisonExpressionTypeName: Varchar1ComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Text_1 + graphql: + typeName: Text1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TextBoolExp_1 + operand: + scalar: + type: Text_1 + comparisonOperators: + - name: _eq + argumentType: Text_1! + - name: _gt + argumentType: Text_1! + - name: _gte + argumentType: Text_1! + - name: _ilike + argumentType: Text_1! + - name: _in + argumentType: "[Text_1!]!" + - name: _iregex + argumentType: Text_1! + - name: _like + argumentType: Text_1! + - name: _lt + argumentType: Text_1! + - name: _lte + argumentType: Text_1! + - name: _neq + argumentType: Text_1! + - name: _nilike + argumentType: Text_1! + - name: _niregex + argumentType: Text_1! + - name: _nlike + argumentType: Text_1! + - name: _nregex + argumentType: Text_1! + - name: _regex + argumentType: Text_1! + - name: starts_with + argumentType: Text_1! + - name: ts_match_tt + argumentType: Text_1! + dataConnectorOperatorMapping: + - dataConnectorName: patients + dataConnectorScalarType: text + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TextBoolExp1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: patients + dataConnectorScalarType: text + representation: Text_1 + graphql: + comparisonExpressionTypeName: Text1ComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: VarcharAggExp_1 + operand: + scalar: + aggregatedType: Varchar_1 + aggregationFunctions: + - name: max + returnType: Text_1 + - name: min + returnType: Text_1 + dataConnectorAggregationFunctionMapping: + - dataConnectorName: patients + dataConnectorScalarType: varchar + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: VarcharAggExp1 + +--- +kind: OrderByExpression +version: v1 +definition: + name: Varchar1OrderByExp + operand: + scalar: + orderedType: Varchar_1 + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: Varchar1OrderByExp + +--- +kind: ScalarType +version: v1 +definition: + name: Date_1 + graphql: + typeName: Date1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DateBoolExp_1 + operand: + scalar: + type: Date_1 + comparisonOperators: + - name: _eq + argumentType: Date_1! + - name: _gt + argumentType: Date_1! + - name: _gte + argumentType: Date_1! + - name: _in + argumentType: "[Date_1!]!" + - name: _lt + argumentType: Date_1! + - name: _lte + argumentType: Date_1! + - name: _neq + argumentType: Date_1! + dataConnectorOperatorMapping: + - dataConnectorName: patients + dataConnectorScalarType: date + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DateBoolExp1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: patients + dataConnectorScalarType: date + representation: Date_1 + graphql: + comparisonExpressionTypeName: Date1ComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DateAggExp_1 + operand: + scalar: + aggregatedType: Date_1 + aggregationFunctions: + - name: max + returnType: Date_1 + - name: min + returnType: Date_1 + dataConnectorAggregationFunctionMapping: + - dataConnectorName: patients + dataConnectorScalarType: date + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: DateAggExp1 + +--- +kind: OrderByExpression +version: v1 +definition: + name: Date1OrderByExp + operand: + scalar: + orderedType: Date_1 + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: Date1OrderByExp + diff --git a/hasura/industry/healthcare/patient_ops/metadata/patients.hml b/hasura/industry/healthcare/patient_ops/metadata/patients.hml new file mode 100644 index 00000000..abffe298 --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/metadata/patients.hml @@ -0,0 +1,754 @@ +kind: DataConnectorLink +version: v1 +definition: + name: patients + url: + readWriteUrls: + read: + valueFromEnv: PATIENT_OPS_PATIENTS_READ_URL + write: + valueFromEnv: PATIENT_OPS_PATIENTS_WRITE_URL + headers: + Authorization: + valueFromEnv: PATIENT_OPS_PATIENTS_AUTHORIZATION_HEADER + schema: + version: v0.1 + schema: + scalar_types: + date: + representation: + type: date + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: date + min: + result_type: + type: nullable + underlying_type: + type: named + name: date + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: date + _gte: + type: custom + argument_type: + type: named + name: date + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: date + _lte: + type: custom + argument_type: + type: named + name: date + _neq: + type: custom + argument_type: + type: named + name: date + int4: + representation: + type: int32 + aggregate_functions: {} + comparison_operators: {} + text: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: text + _gte: + type: custom + argument_type: + type: named + name: text + _ilike: + type: custom + argument_type: + type: named + name: text + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: text + _like: + type: custom + argument_type: + type: named + name: text + _lt: + type: custom + argument_type: + type: named + name: text + _lte: + type: custom + argument_type: + type: named + name: text + _neq: + type: custom + argument_type: + type: named + name: text + _nilike: + type: custom + argument_type: + type: named + name: text + _niregex: + type: custom + argument_type: + type: named + name: text + _nlike: + type: custom + argument_type: + type: named + name: text + _nregex: + type: custom + argument_type: + type: named + name: text + _regex: + type: custom + argument_type: + type: named + name: text + starts_with: + type: custom + argument_type: + type: named + name: text + ts_match_tt: + type: custom + argument_type: + type: named + name: text + varchar: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: varchar + _gte: + type: custom + argument_type: + type: named + name: varchar + _ilike: + type: custom + argument_type: + type: named + name: varchar + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: varchar + _like: + type: custom + argument_type: + type: named + name: varchar + _lt: + type: custom + argument_type: + type: named + name: varchar + _lte: + type: custom + argument_type: + type: named + name: varchar + _neq: + type: custom + argument_type: + type: named + name: varchar + _nilike: + type: custom + argument_type: + type: named + name: varchar + _niregex: + type: custom + argument_type: + type: named + name: varchar + _nlike: + type: custom + argument_type: + type: named + name: varchar + _nregex: + type: custom + argument_type: + type: named + name: varchar + _regex: + type: custom + argument_type: + type: named + name: varchar + starts_with: + type: custom + argument_type: + type: named + name: varchar + ts_match_tt: + type: custom + argument_type: + type: named + name: varchar + object_types: + delete_insurance_plans_by_plan_id_response: + description: Responses from the 'delete_insurance_plans_by_plan_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: insurance_plans + delete_patients_by_patient_id_response: + description: Responses from the 'delete_patients_by_patient_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: patients + insert_insurance_plans_object: + fields: + payer_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + plan_id: + type: + type: named + name: varchar + plan_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_insurance_plans_response: + description: Responses from the 'insert_insurance_plans' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: insurance_plans + insert_patients_object: + fields: + date_of_birth: + type: + type: nullable + underlying_type: + type: named + name: date + first_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + insurance_plan_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + last_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + patient_id: + type: + type: named + name: varchar + insert_patients_response: + description: Responses from the 'insert_patients' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: patients + insurance_plans: + fields: + payer_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + plan_id: + type: + type: named + name: varchar + plan_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + patients: + fields: + date_of_birth: + type: + type: nullable + underlying_type: + type: named + name: date + first_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + insurance_plan_id: + type: + type: nullable + underlying_type: + type: named + name: varchar + last_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + patient_id: + type: + type: named + name: varchar + update_column_insurance_plans_payer_name: + description: Update the 'payer_name' column in the 'insurance_plans' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_insurance_plans_plan_id: + description: Update the 'plan_id' column in the 'insurance_plans' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_insurance_plans_plan_name: + description: Update the 'plan_name' column in the 'insurance_plans' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_patients_date_of_birth: + description: Update the 'date_of_birth' column in the 'patients' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: date + update_column_patients_first_name: + description: Update the 'first_name' column in the 'patients' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_patients_insurance_plan_id: + description: Update the 'insurance_plan_id' column in the 'patients' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_patients_last_name: + description: Update the 'last_name' column in the 'patients' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_patients_patient_id: + description: Update the 'patient_id' column in the 'patients' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_insurance_plans_by_plan_id_response: + description: Responses from the 'update_insurance_plans_by_plan_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: insurance_plans + update_insurance_plans_by_plan_id_update_columns: + description: Update the columns of the 'insurance_plans' collection + fields: + payer_name: + description: Update the 'payer_name' column in the 'insurance_plans' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_insurance_plans_payer_name + plan_id: + description: Update the 'plan_id' column in the 'insurance_plans' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_insurance_plans_plan_id + plan_name: + description: Update the 'plan_name' column in the 'insurance_plans' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_insurance_plans_plan_name + update_patients_by_patient_id_response: + description: Responses from the 'update_patients_by_patient_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: patients + update_patients_by_patient_id_update_columns: + description: Update the columns of the 'patients' collection + fields: + date_of_birth: + description: Update the 'date_of_birth' column in the 'patients' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_patients_date_of_birth + first_name: + description: Update the 'first_name' column in the 'patients' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_patients_first_name + insurance_plan_id: + description: Update the 'insurance_plan_id' column in the 'patients' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_patients_insurance_plan_id + last_name: + description: Update the 'last_name' column in the 'patients' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_patients_last_name + patient_id: + description: Update the 'patient_id' column in the 'patients' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_patients_patient_id + collections: + - name: insurance_plans + arguments: {} + type: insurance_plans + uniqueness_constraints: + insurance_plans_pkey: + unique_columns: + - plan_id + foreign_keys: {} + - name: patients + arguments: {} + type: patients + uniqueness_constraints: + patients_pkey: + unique_columns: + - patient_id + foreign_keys: + patients_insurance_plan_id_fkey: + column_mapping: + insurance_plan_id: plan_id + foreign_collection: insurance_plans + functions: [] + procedures: + - name: delete_insurance_plans_by_plan_id + description: Delete any row on the 'insurance_plans' collection using the 'plan_id' key + arguments: + key_plan_id: + type: + type: named + name: varchar + pre_check: + description: Delete permission predicate over the 'insurance_plans' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: insurance_plans + result_type: + type: named + name: delete_insurance_plans_by_plan_id_response + - name: delete_patients_by_patient_id + description: Delete any row on the 'patients' collection using the 'patient_id' key + arguments: + key_patient_id: + type: + type: named + name: varchar + pre_check: + description: Delete permission predicate over the 'patients' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: patients + result_type: + type: named + name: delete_patients_by_patient_id_response + - name: insert_insurance_plans + description: Insert into the insurance_plans table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_insurance_plans_object + post_check: + description: Insert permission predicate over the 'insurance_plans' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: insurance_plans + result_type: + type: named + name: insert_insurance_plans_response + - name: insert_patients + description: Insert into the patients table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_patients_object + post_check: + description: Insert permission predicate over the 'patients' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: patients + result_type: + type: named + name: insert_patients_response + - name: update_insurance_plans_by_plan_id + description: Update any row on the 'insurance_plans' collection using the 'plan_id' key + arguments: + key_plan_id: + type: + type: named + name: varchar + post_check: + description: Update permission post-condition predicate over the 'insurance_plans' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: insurance_plans + pre_check: + description: Update permission pre-condition predicate over the 'insurance_plans' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: insurance_plans + update_columns: + type: + type: named + name: update_insurance_plans_by_plan_id_update_columns + result_type: + type: named + name: update_insurance_plans_by_plan_id_response + - name: update_patients_by_patient_id + description: Update any row on the 'patients' collection using the 'patient_id' key + arguments: + key_patient_id: + type: + type: named + name: varchar + post_check: + description: Update permission post-condition predicate over the 'patients' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: patients + pre_check: + description: Update permission pre-condition predicate over the 'patients' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: patients + update_columns: + type: + type: named + name: update_patients_by_patient_id_update_columns + result_type: + type: named + name: update_patients_by_patient_id_response + capabilities: + version: 0.1.6 + capabilities: + query: + aggregates: {} + variables: {} + explain: {} + nested_fields: + filter_by: {} + order_by: {} + exists: + nested_collections: {} + mutation: + transactional: {} + explain: {} + relationships: + relation_comparisons: {} + order_by_aggregate: {} diff --git a/hasura/industry/healthcare/patient_ops/subgraph.yaml b/hasura/industry/healthcare/patient_ops/subgraph.yaml new file mode 100644 index 00000000..01e7b24e --- /dev/null +++ b/hasura/industry/healthcare/patient_ops/subgraph.yaml @@ -0,0 +1,27 @@ +kind: Subgraph +version: v2 +definition: + name: patient_ops + generator: + rootPath: . + namingConvention: graphql + includePaths: + - metadata + envMapping: + PATIENT_OPS_OPERATIONS_AUTHORIZATION_HEADER: + fromEnv: PATIENT_OPS_OPERATIONS_AUTHORIZATION_HEADER + PATIENT_OPS_OPERATIONS_READ_URL: + fromEnv: PATIENT_OPS_OPERATIONS_READ_URL + PATIENT_OPS_OPERATIONS_WRITE_URL: + fromEnv: PATIENT_OPS_OPERATIONS_WRITE_URL + PATIENT_OPS_PATIENTS_AUTHORIZATION_HEADER: + fromEnv: PATIENT_OPS_PATIENTS_AUTHORIZATION_HEADER + PATIENT_OPS_PATIENTS_READ_URL: + fromEnv: PATIENT_OPS_PATIENTS_READ_URL + PATIENT_OPS_PATIENTS_WRITE_URL: + fromEnv: PATIENT_OPS_PATIENTS_WRITE_URL + connectors: + - path: connector/patients/connector.yaml + connectorLinkName: patients + - path: connector/operations/connector.yaml + connectorLinkName: operations diff --git a/hasura/industry/healthcare/reference/connector/reference/.ddnignore b/hasura/industry/healthcare/reference/connector/reference/.ddnignore new file mode 100644 index 00000000..ed72dd19 --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/.ddnignore @@ -0,0 +1,2 @@ +.env* +compose.yaml diff --git a/hasura/industry/healthcare/reference/connector/reference/.hasura-connector/Dockerfile.reference b/hasura/industry/healthcare/reference/connector/reference/.hasura-connector/Dockerfile.reference new file mode 100644 index 00000000..bd6c9cfb --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/.hasura-connector/Dockerfile.reference @@ -0,0 +1,2 @@ +FROM ghcr.io/hasura/ndc-postgres:v2.0.0 +COPY ./ /etc/connector \ No newline at end of file diff --git a/hasura/industry/healthcare/reference/connector/reference/.hasura-connector/connector-metadata.yaml b/hasura/industry/healthcare/reference/connector/reference/.hasura-connector/connector-metadata.yaml new file mode 100644 index 00000000..58ef7f16 --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/.hasura-connector/connector-metadata.yaml @@ -0,0 +1,26 @@ +packagingDefinition: + type: PrebuiltDockerImage + dockerImage: ghcr.io/hasura/ndc-postgres:v2.0.0 +supportedEnvironmentVariables: + - name: CONNECTION_URI + description: The PostgreSQL connection URI + defaultValue: postgresql://read_only_user:readonlyuser@35.236.11.122:5432/v3-docs-sample-app + - name: CLIENT_CERT + description: The SSL client certificate (Optional) + defaultValue: "" + - name: CLIENT_KEY + description: The SSL client key (Optional) + defaultValue: "" + - name: ROOT_CERT + description: The SSL root certificate (Optional) + defaultValue: "" +commands: + update: hasura-ndc-postgres update +cliPlugin: + type: null + name: ndc-postgres + version: v2.0.0 +dockerComposeWatch: + - path: ./ + action: sync+restart + target: /etc/connector diff --git a/hasura/industry/healthcare/reference/connector/reference/compose.postgres-adminer.yaml b/hasura/industry/healthcare/reference/connector/reference/compose.postgres-adminer.yaml new file mode 100644 index 00000000..bb2c2f97 --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/compose.postgres-adminer.yaml @@ -0,0 +1,48 @@ +# Configuration used for adminer +configs: + adminer-index.php: + content: | + $$_ENV['ADMINER_DEFAULT_SERVER'], + 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], + 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], + 'driver' => $$_ENV['ADMINER_DEFAULT_DRIVER'], + 'db' => $$_ENV['ADMINER_DEFAULT_DB'], + ]; + } + include './adminer.php'; + ?> +services: + # Adminer is a lightweight database management tool (optional) + adminer: + configs: + - source: adminer-index.php + target: /var/www/html/index.php + depends_on: + - postgres + environment: + ADMINER_DEFAULT_DB: dev + ADMINER_DEFAULT_DRIVER: pgsql + ADMINER_DEFAULT_PASSWORD: password + ADMINER_DEFAULT_SERVER: postgres + ADMINER_DEFAULT_USERNAME: user + image: adminer:latest + ports: + - 5926:8080 + restart: unless-stopped + # Bundled Postgres database with pgvector (optional) + postgres: + environment: + POSTGRES_DB: dev + POSTGRES_PASSWORD: password + POSTGRES_USER: user + image: pgvector/pgvector:pg17 + ports: + - 8547:5432 + restart: unless-stopped + volumes: + - db_data:/var/lib/postgresql/data +volumes: + db_data: {} diff --git a/hasura/industry/healthcare/reference/connector/reference/compose.yaml b/hasura/industry/healthcare/reference/connector/reference/compose.yaml new file mode 100644 index 00000000..45cc7206 --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/compose.yaml @@ -0,0 +1,14 @@ +services: + reference_reference: + build: + context: . + dockerfile: .hasura-connector/Dockerfile.reference + environment: + CONNECTION_URI: $REFERENCE_REFERENCE_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: $REFERENCE_REFERENCE_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: $REFERENCE_REFERENCE_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: $REFERENCE_REFERENCE_OTEL_SERVICE_NAME + extra_hosts: + - local.hasura.dev:host-gateway + ports: + - 5655:8080 diff --git a/hasura/industry/healthcare/reference/connector/reference/configuration.json b/hasura/industry/healthcare/reference/connector/reference/configuration.json new file mode 100644 index 00000000..f457f5ff --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/configuration.json @@ -0,0 +1,982 @@ +{ + "version": "5", + "$schema": "schema.json", + "connectionSettings": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "metadata": { + "tables": { + "drug_packaging": { + "schemaName": "public", + "tableName": "drug_packaging", + "columns": { + "ndc_package_code": { + "name": "ndc_package_code", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "package_description": { + "name": "package_description", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "product_ndc": { + "name": "product_ndc", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "drug_packaging_pkey": [ + "ndc_package_code" + ] + }, + "foreignRelations": { + "drug_packaging_product_ndc_fkey": { + "foreignSchema": "public", + "foreignTable": "drug_reference", + "columnMapping": { + "product_ndc": "product_ndc" + } + } + }, + "description": null + }, + "drug_reference": { + "schemaName": "public", + "tableName": "drug_reference", + "columns": { + "active_ingredients_info": { + "name": "active_ingredients_info", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "dosage_form_name": { + "name": "dosage_form_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "labeler_name": { + "name": "labeler_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "nonproprietary_name": { + "name": "nonproprietary_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "product_ndc": { + "name": "product_ndc", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "proprietary_name": { + "name": "proprietary_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "route_name": { + "name": "route_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "substance_name": { + "name": "substance_name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "drug_reference_pkey": [ + "product_ndc" + ] + }, + "foreignRelations": {}, + "description": null + }, + "procedure_codes": { + "schemaName": "public", + "tableName": "procedure_codes", + "columns": { + "avg_duration_minutes": { + "name": "avg_duration_minutes", + "type": { + "scalarType": "int4" + }, + "nullable": "nullable", + "description": null + }, + "category": { + "name": "category", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "hcpc": { + "name": "hcpc", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "long_description": { + "name": "long_description", + "type": { + "scalarType": "text" + }, + "nullable": "nonNullable", + "description": null + }, + "short_description": { + "name": "short_description", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "procedure_codes_pkey": [ + "hcpc" + ] + }, + "foreignRelations": {}, + "description": null + } + }, + "types": { + "scalar": { + "int4": { + "typeName": "int4", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int4" + }, + "bit_or": { + "returnType": "int4" + }, + "bit_xor": { + "returnType": "int4" + }, + "max": { + "returnType": "int4" + }, + "min": { + "returnType": "int4" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "int8" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int4", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int4", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int4", + "isInfix": true + } + }, + "typeRepresentation": "int32" + }, + "int8": { + "typeName": "int8", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int8" + }, + "bit_or": { + "returnType": "int8" + }, + "bit_xor": { + "returnType": "int8" + }, + "max": { + "returnType": "int8" + }, + "min": { + "returnType": "int8" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int8", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int8", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + } + }, + "typeRepresentation": "int64AsString" + }, + "numeric": { + "typeName": "numeric", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "max": { + "returnType": "numeric" + }, + "min": { + "returnType": "numeric" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "numeric", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "numeric", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + } + }, + "typeRepresentation": "bigDecimalAsString" + }, + "text": { + "typeName": "text", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "text", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "text", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "varchar": { + "typeName": "varchar", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "varchar", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "varchar", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + } + }, + "typeRepresentation": "string" + } + }, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "introspectionOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "mutationsVersion": "v2", + "mutationsPrefix": "" +} diff --git a/hasura/industry/healthcare/reference/connector/reference/connector.yaml b/hasura/industry/healthcare/reference/connector/reference/connector.yaml new file mode 100644 index 00000000..41146a89 --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/connector.yaml @@ -0,0 +1,16 @@ +kind: Connector +version: v2 +definition: + name: reference + subgraph: reference + source: hasura/postgres:v2.0.0 + context: . + envMapping: + CONNECTION_URI: + fromEnv: REFERENCE_REFERENCE_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: + fromEnv: REFERENCE_REFERENCE_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: + fromEnv: REFERENCE_REFERENCE_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: + fromEnv: REFERENCE_REFERENCE_OTEL_SERVICE_NAME diff --git a/hasura/industry/healthcare/reference/connector/reference/schema.json b/hasura/industry/healthcare/reference/connector/reference/schema.json new file mode 100644 index 00000000..15e45a37 --- /dev/null +++ b/hasura/industry/healthcare/reference/connector/reference/schema.json @@ -0,0 +1,1622 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ParsedConfiguration", + "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/definitions/Version" + }, + "$schema": { + "description": "Jsonschema of the configuration format.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "connectionSettings": { + "description": "Database connection settings.", + "default": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "allOf": [ + { + "$ref": "#/definitions/DatabaseConnectionSettings" + } + ] + }, + "metadata": { + "description": "Connector metadata.", + "default": { + "tables": {}, + "types": { + "scalar": {}, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "allOf": [ + { + "$ref": "#/definitions/Metadata" + } + ] + }, + "introspectionOptions": { + "description": "Database introspection options.", + "default": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "allOf": [ + { + "$ref": "#/definitions/IntrospectionOptions" + } + ] + }, + "mutationsVersion": { + "description": "Which version of the generated mutation procedures to include in the schema response", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/MutationsVersion" + }, + { + "type": "null" + } + ] + }, + "mutationsPrefix": { + "description": "Provide a custom prefix for generated mutation names. Defaults to mutations version.", + "default": null, + "type": [ + "string", + "null" + ] + } + }, + "definitions": { + "Version": { + "type": "string", + "enum": [ + "5" + ] + }, + "DatabaseConnectionSettings": { + "description": "Database connection settings.", + "type": "object", + "required": [ + "connectionUri" + ], + "properties": { + "connectionUri": { + "description": "Connection string for a Postgres-compatible database.", + "allOf": [ + { + "$ref": "#/definitions/ConnectionUri" + } + ] + }, + "poolSettings": { + "description": "Connection pool settings.", + "default": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "allOf": [ + { + "$ref": "#/definitions/PoolSettings" + } + ] + }, + "isolationLevel": { + "description": "Query isolation level.", + "default": "ReadCommitted", + "allOf": [ + { + "$ref": "#/definitions/IsolationLevel" + } + ] + } + } + }, + "ConnectionUri": { + "$ref": "#/definitions/Secret" + }, + "Secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "variable" + ], + "properties": { + "variable": { + "$ref": "#/definitions/Variable" + } + } + } + ] + }, + "Variable": { + "description": "The name of an an environment variable.", + "type": "string" + }, + "PoolSettings": { + "description": "Settings for the PostgreSQL connection pool", + "type": "object", + "properties": { + "maxConnections": { + "description": "maximum number of pool connections", + "default": 50, + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "poolTimeout": { + "description": "timeout for acquiring a connection from the pool (seconds)", + "default": 30, + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "idleTimeout": { + "description": "idle timeout for releasing a connection from the pool (seconds)", + "default": 180, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "checkConnectionAfterIdle": { + "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", + "default": 60, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "connectionLifetime": { + "description": "maximum lifetime for an individual connection (seconds)", + "default": 600, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + } + }, + "IsolationLevel": { + "description": "The isolation level of the transaction in which a query is executed.", + "oneOf": [ + { + "description": "Prevents reading data from another uncommitted transaction.", + "type": "string", + "enum": [ + "ReadCommitted" + ] + }, + { + "description": "Reading the same data twice is guaranteed to return the same result.", + "type": "string", + "enum": [ + "RepeatableRead" + ] + }, + { + "description": "Concurrent transactions behave identically to serializing them one at a time.", + "type": "string", + "enum": [ + "Serializable" + ] + } + ] + }, + "Metadata": { + "description": "Metadata information.", + "type": "object", + "properties": { + "tables": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/TablesInfo" + } + ] + }, + "types": { + "default": { + "scalar": {}, + "composite": {} + }, + "allOf": [ + { + "$ref": "#/definitions/Types" + } + ] + }, + "nativeOperations": { + "default": { + "queries": {}, + "mutations": {} + }, + "allOf": [ + { + "$ref": "#/definitions/NativeOperations" + } + ] + } + } + }, + "TablesInfo": { + "description": "Mapping from a \"table\" name to its information.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TableInfo" + } + }, + "TableInfo": { + "description": "Information about a database table (or any other kind of relation).", + "type": "object", + "required": [ + "columns", + "schemaName", + "tableName" + ], + "properties": { + "schemaName": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "columns": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ColumnInfo" + } + }, + "uniquenessConstraints": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/UniquenessConstraints" + } + ] + }, + "foreignRelations": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/ForeignRelations" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "ColumnInfo": { + "description": "Information about a database column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "hasDefault": { + "$ref": "#/definitions/HasDefault" + }, + "isIdentity": { + "$ref": "#/definitions/IsIdentity" + }, + "isGenerated": { + "$ref": "#/definitions/IsGenerated" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "Type": { + "description": "The type of values that a column, field, or argument may take.", + "oneOf": [ + { + "type": "object", + "required": [ + "scalarType" + ], + "properties": { + "scalarType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "compositeType" + ], + "properties": { + "compositeType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "arrayType" + ], + "properties": { + "arrayType": { + "$ref": "#/definitions/Type" + } + }, + "additionalProperties": false + } + ] + }, + "Nullable": { + "description": "Can this column contain null values", + "type": "string", + "enum": [ + "nullable", + "nonNullable" + ] + }, + "HasDefault": { + "description": "Does this column have a default value.", + "type": "string", + "enum": [ + "noDefault", + "hasDefault" + ] + }, + "IsIdentity": { + "description": "Is this column an identity column.", + "type": "string", + "enum": [ + "notIdentity", + "identityByDefault", + "identityAlways" + ] + }, + "IsGenerated": { + "description": "Is this column a generated column.", + "type": "string", + "enum": [ + "notGenerated", + "stored" + ] + }, + "UniquenessConstraints": { + "description": "A mapping from the name of a unique constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UniquenessConstraint" + } + }, + "UniquenessConstraint": { + "description": "The set of columns that make up a uniqueness constraint. We map each table column to their ndc field names.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "ForeignRelations": { + "description": "A mapping from the name of a foreign key constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ForeignRelation" + } + }, + "ForeignRelation": { + "description": "A foreign key constraint.", + "type": "object", + "required": [ + "columnMapping", + "foreignTable" + ], + "properties": { + "foreignSchema": { + "type": [ + "string", + "null" + ] + }, + "foreignTable": { + "type": "string" + }, + "columnMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Types": { + "description": "Information about types.", + "type": "object", + "required": [ + "composite", + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/definitions/ScalarTypes" + }, + "composite": { + "$ref": "#/definitions/CompositeTypes" + } + } + }, + "ScalarTypes": { + "description": "Map of all known/occurring scalar types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ScalarType" + } + }, + "ScalarType": { + "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", + "type": "object", + "required": [ + "aggregateFunctions", + "comparisonOperators", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "aggregateFunctions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AggregateFunction" + } + }, + "comparisonOperators": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ComparisonOperator" + } + }, + "typeRepresentation": { + "anyOf": [ + { + "$ref": "#/definitions/TypeRepresentation" + }, + { + "type": "null" + } + ] + } + } + }, + "AggregateFunction": { + "type": "object", + "required": [ + "returnType" + ], + "properties": { + "returnType": { + "type": "string" + } + } + }, + "ComparisonOperator": { + "description": "Represents a postgres binary comparison operator", + "type": "object", + "required": [ + "argumentType", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "type": "string" + }, + "operatorKind": { + "$ref": "#/definitions/OperatorKind" + }, + "argumentType": { + "type": "string" + }, + "isInfix": { + "default": true, + "type": "boolean" + } + } + }, + "OperatorKind": { + "description": "Is it a built-in operator, or a custom operator.", + "type": "string", + "enum": [ + "equal", + "in", + "custom" + ] + }, + "TypeRepresentation": { + "description": "Type representation of a scalar type.", + "oneOf": [ + { + "description": "JSON booleans", + "type": "string", + "enum": [ + "boolean" + ] + }, + { + "description": "Any JSON string", + "type": "string", + "enum": [ + "string" + ] + }, + { + "description": "float4", + "type": "string", + "enum": [ + "float32" + ] + }, + { + "description": "float8", + "type": "string", + "enum": [ + "float64" + ] + }, + { + "description": "int2", + "type": "string", + "enum": [ + "int16" + ] + }, + { + "description": "int4", + "type": "string", + "enum": [ + "int32" + ] + }, + { + "description": "int8 as integer", + "type": "string", + "enum": [ + "int64" + ] + }, + { + "description": "int8 as string", + "type": "string", + "enum": [ + "int64AsString" + ] + }, + { + "description": "numeric", + "type": "string", + "enum": [ + "bigDecimal" + ] + }, + { + "description": "numeric as string", + "type": "string", + "enum": [ + "bigDecimalAsString" + ] + }, + { + "description": "timestamp", + "type": "string", + "enum": [ + "timestamp" + ] + }, + { + "description": "timestamp with timezone", + "type": "string", + "enum": [ + "timestamptz" + ] + }, + { + "description": "time", + "type": "string", + "enum": [ + "time" + ] + }, + { + "description": "time with timezone", + "type": "string", + "enum": [ + "timetz" + ] + }, + { + "description": "date", + "type": "string", + "enum": [ + "date" + ] + }, + { + "description": "uuid", + "type": "string", + "enum": [ + "uUID" + ] + }, + { + "description": "geography", + "type": "string", + "enum": [ + "geography" + ] + }, + { + "description": "geometry", + "type": "string", + "enum": [ + "geometry" + ] + }, + { + "description": "Any JSON number", + "type": "string", + "enum": [ + "number" + ] + }, + { + "description": "Any JSON number, with no decimal part", + "type": "string", + "enum": [ + "integer" + ] + }, + { + "description": "An arbitrary json.", + "type": "string", + "enum": [ + "json" + ] + }, + { + "description": "One of the specified string values", + "type": "object", + "required": [ + "enum" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + ] + }, + "CompositeTypes": { + "description": "Map of all known composite types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CompositeType" + } + }, + "CompositeType": { + "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", + "type": "object", + "required": [ + "fields", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FieldInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "FieldInfo": { + "description": "Information about a composite type field.", + "type": "object", + "required": [ + "fieldName", + "type" + ], + "properties": { + "fieldName": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeOperations": { + "description": "Metadata information of Native Operations.", + "type": "object", + "required": [ + "mutations", + "queries" + ], + "properties": { + "queries": { + "description": "Native Queries.", + "allOf": [ + { + "$ref": "#/definitions/NativeQueries" + } + ] + }, + "mutations": { + "description": "Native Mutations.", + "allOf": [ + { + "$ref": "#/definitions/NativeMutations" + } + ] + } + } + }, + "NativeQueries": { + "description": "Metadata information of Native Queries.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "NativeQueryInfo": { + "description": "Information about a Native Operation", + "type": "object", + "required": [ + "columns", + "sql" + ], + "properties": { + "sql": { + "description": "SQL expression to use for the Native Operation. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", + "allOf": [ + { + "$ref": "#/definitions/NativeQuerySql" + } + ] + }, + "columns": { + "description": "Columns returned by the Native Operation", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "arguments": { + "description": "Names and types of arguments that can be passed to this Native Operation", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeQuerySql": { + "description": "Native Operation SQL location.", + "anyOf": [ + { + "description": "Refer to an external Native Operation SQL file.", + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "description": "Relative path to a sql file.", + "type": "string" + } + } + }, + { + "description": "Inline Native Operation SQL string.", + "type": "object", + "required": [ + "inline" + ], + "properties": { + "inline": { + "description": "An inline Native Operation SQL string.", + "allOf": [ + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + } + } + }, + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + }, + "InlineNativeQuerySql": { + "type": "string" + }, + "ReadOnlyColumnInfo": { + "description": "Information about a native query column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeMutations": { + "description": "Metadata information of Native Mutations.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "IntrospectionOptions": { + "description": "Options which only influence how the configuration is updated.", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTables": { + "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", + "default": [ + "public" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTypesAndProcedures": { + "description": "The types and procedures in these schemas will be returned unqualified.", + "default": [ + "public", + "pg_catalog", + "tiger" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ComparisonOperatorMapping" + } + }, + "introspectPrefixFunctionComparisonOperators": { + "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", + "default": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "typeRepresentations": { + "description": "The type representations to pick for base scalar types.", + "default": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + }, + "allOf": [ + { + "$ref": "#/definitions/TypeRepresentations" + } + ] + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + }, + "operatorKind": { + "description": "Equal, In or Custom.", + "allOf": [ + { + "$ref": "#/definitions/OperatorKind" + } + ] + } + } + }, + "TypeRepresentations": { + "description": "The type representations that guide introspection.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TypeRepresentation" + } + }, + "MutationsVersion": { + "description": "Which version of the generated mutations will be included in the schema", + "type": "string", + "enum": [ + "v1", + "v2" + ] + } + } +} diff --git a/hasura/industry/healthcare/reference/metadata/.keep b/hasura/industry/healthcare/reference/metadata/.keep new file mode 100644 index 00000000..e69de29b diff --git a/hasura/industry/healthcare/reference/metadata/DrugPackaging.hml b/hasura/industry/healthcare/reference/metadata/DrugPackaging.hml new file mode 100644 index 00000000..85effc26 --- /dev/null +++ b/hasura/industry/healthcare/reference/metadata/DrugPackaging.hml @@ -0,0 +1,164 @@ +--- +kind: ObjectType +version: v1 +definition: + name: DrugPackaging + fields: + - name: ndcPackageCode + type: Varchar! + - name: packageDescription + type: Varchar + - name: productNdc + type: Varchar + graphql: + typeName: DrugPackaging + inputTypeName: DrugPackagingInput + dataConnectorTypeMapping: + - dataConnectorName: reference + dataConnectorObjectType: drug_packaging + fieldMapping: + ndcPackageCode: + column: + name: ndc_package_code + packageDescription: + column: + name: package_description + productNdc: + column: + name: product_ndc + +--- +kind: TypePermissions +version: v1 +definition: + typeName: DrugPackaging + permissions: + - role: admin + output: + allowedFields: + - ndcPackageCode + - packageDescription + - productNdc + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DrugPackagingBoolExp + operand: + object: + type: DrugPackaging + comparableFields: + - fieldName: ndcPackageCode + booleanExpressionType: VarcharBoolExp + - fieldName: packageDescription + booleanExpressionType: VarcharBoolExp + - fieldName: productNdc + booleanExpressionType: VarcharBoolExp + comparableRelationships: + - relationshipName: drugReference + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DrugPackagingBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DrugPackagingAggExp + operand: + object: + aggregatedType: DrugPackaging + aggregatableFields: + - fieldName: ndcPackageCode + aggregateExpression: VarcharAggExp + - fieldName: packageDescription + aggregateExpression: VarcharAggExp + - fieldName: productNdc + aggregateExpression: VarcharAggExp + count: + enable: true + graphql: + selectTypeName: DrugPackagingAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: DrugPackagingOrderByExp + operand: + object: + orderedType: DrugPackaging + orderableFields: + - fieldName: ndcPackageCode + orderByExpression: VarcharOrderByExp + - fieldName: packageDescription + orderByExpression: VarcharOrderByExp + - fieldName: productNdc + orderByExpression: VarcharOrderByExp + orderableRelationships: + - relationshipName: drugReference + graphql: + expressionTypeName: DrugPackagingOrderByExp + +--- +kind: Model +version: v2 +definition: + name: DrugPackaging + objectType: DrugPackaging + source: + dataConnectorName: reference + collection: drug_packaging + filterExpressionType: DrugPackagingBoolExp + aggregateExpression: DrugPackagingAggExp + orderByExpression: DrugPackagingOrderByExp + graphql: + selectMany: + queryRootField: drugPackaging + subscription: + rootField: drugPackaging + selectUniques: + - queryRootField: drugPackagingByNdcPackageCode + uniqueIdentifier: + - ndcPackageCode + subscription: + rootField: drugPackagingByNdcPackageCode + filterInputTypeName: DrugPackagingFilterInput + aggregate: + queryRootField: drugPackagingAggregate + subscription: + rootField: drugPackagingAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: DrugPackaging + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: drugReference + sourceType: DrugPackaging + target: + model: + name: DrugReference + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: productNdc + target: + modelField: + - fieldName: productNdc + diff --git a/hasura/industry/healthcare/reference/metadata/DrugReference.hml b/hasura/industry/healthcare/reference/metadata/DrugReference.hml new file mode 100644 index 00000000..6325895a --- /dev/null +++ b/hasura/industry/healthcare/reference/metadata/DrugReference.hml @@ -0,0 +1,227 @@ +--- +kind: ObjectType +version: v1 +definition: + name: DrugReference + fields: + - name: activeIngredientsInfo + type: Varchar + - name: dosageFormName + type: Varchar + - name: labelerName + type: Varchar + - name: nonproprietaryName + type: Varchar + - name: productNdc + type: Varchar! + - name: proprietaryName + type: Varchar + - name: routeName + type: Varchar + - name: substanceName + type: Varchar + graphql: + typeName: DrugReference + inputTypeName: DrugReferenceInput + dataConnectorTypeMapping: + - dataConnectorName: reference + dataConnectorObjectType: drug_reference + fieldMapping: + activeIngredientsInfo: + column: + name: active_ingredients_info + dosageFormName: + column: + name: dosage_form_name + labelerName: + column: + name: labeler_name + nonproprietaryName: + column: + name: nonproprietary_name + productNdc: + column: + name: product_ndc + proprietaryName: + column: + name: proprietary_name + routeName: + column: + name: route_name + substanceName: + column: + name: substance_name + +--- +kind: TypePermissions +version: v1 +definition: + typeName: DrugReference + permissions: + - role: admin + output: + allowedFields: + - activeIngredientsInfo + - dosageFormName + - labelerName + - nonproprietaryName + - productNdc + - proprietaryName + - routeName + - substanceName + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DrugReferenceBoolExp + operand: + object: + type: DrugReference + comparableFields: + - fieldName: activeIngredientsInfo + booleanExpressionType: VarcharBoolExp + - fieldName: dosageFormName + booleanExpressionType: VarcharBoolExp + - fieldName: labelerName + booleanExpressionType: VarcharBoolExp + - fieldName: nonproprietaryName + booleanExpressionType: VarcharBoolExp + - fieldName: productNdc + booleanExpressionType: VarcharBoolExp + - fieldName: proprietaryName + booleanExpressionType: VarcharBoolExp + - fieldName: routeName + booleanExpressionType: VarcharBoolExp + - fieldName: substanceName + booleanExpressionType: VarcharBoolExp + comparableRelationships: + - relationshipName: drugPackagings + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DrugReferenceBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DrugReferenceAggExp + operand: + object: + aggregatedType: DrugReference + aggregatableFields: + - fieldName: activeIngredientsInfo + aggregateExpression: VarcharAggExp + - fieldName: dosageFormName + aggregateExpression: VarcharAggExp + - fieldName: labelerName + aggregateExpression: VarcharAggExp + - fieldName: nonproprietaryName + aggregateExpression: VarcharAggExp + - fieldName: productNdc + aggregateExpression: VarcharAggExp + - fieldName: proprietaryName + aggregateExpression: VarcharAggExp + - fieldName: routeName + aggregateExpression: VarcharAggExp + - fieldName: substanceName + aggregateExpression: VarcharAggExp + count: + enable: true + graphql: + selectTypeName: DrugReferenceAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: DrugReferenceOrderByExp + operand: + object: + orderedType: DrugReference + orderableFields: + - fieldName: activeIngredientsInfo + orderByExpression: VarcharOrderByExp + - fieldName: dosageFormName + orderByExpression: VarcharOrderByExp + - fieldName: labelerName + orderByExpression: VarcharOrderByExp + - fieldName: nonproprietaryName + orderByExpression: VarcharOrderByExp + - fieldName: productNdc + orderByExpression: VarcharOrderByExp + - fieldName: proprietaryName + orderByExpression: VarcharOrderByExp + - fieldName: routeName + orderByExpression: VarcharOrderByExp + - fieldName: substanceName + orderByExpression: VarcharOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: DrugReferenceOrderByExp + +--- +kind: Model +version: v2 +definition: + name: DrugReference + objectType: DrugReference + source: + dataConnectorName: reference + collection: drug_reference + filterExpressionType: DrugReferenceBoolExp + aggregateExpression: DrugReferenceAggExp + orderByExpression: DrugReferenceOrderByExp + graphql: + selectMany: + queryRootField: drugReference + subscription: + rootField: drugReference + selectUniques: + - queryRootField: drugReferenceByProductNdc + uniqueIdentifier: + - productNdc + subscription: + rootField: drugReferenceByProductNdc + filterInputTypeName: DrugReferenceFilterInput + aggregate: + queryRootField: drugReferenceAggregate + subscription: + rootField: drugReferenceAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: DrugReference + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: drugPackagings + sourceType: DrugReference + target: + model: + name: DrugPackaging + relationshipType: Array + aggregate: + aggregateExpression: DrugPackagingAggExp + mapping: + - source: + fieldPath: + - fieldName: productNdc + target: + modelField: + - fieldName: productNdc + graphql: + aggregateFieldName: drugPackagingsAggregate + diff --git a/hasura/industry/healthcare/reference/metadata/ProcedureCodes.hml b/hasura/industry/healthcare/reference/metadata/ProcedureCodes.hml new file mode 100644 index 00000000..31685a9c --- /dev/null +++ b/hasura/industry/healthcare/reference/metadata/ProcedureCodes.hml @@ -0,0 +1,168 @@ +--- +kind: ObjectType +version: v1 +definition: + name: ProcedureCodes + fields: + - name: avgDurationMinutes + type: Int4 + - name: category + type: Varchar + - name: hcpc + type: Varchar! + - name: longDescription + type: Text! + - name: shortDescription + type: Varchar + graphql: + typeName: ProcedureCodes + inputTypeName: ProcedureCodesInput + dataConnectorTypeMapping: + - dataConnectorName: reference + dataConnectorObjectType: procedure_codes + fieldMapping: + avgDurationMinutes: + column: + name: avg_duration_minutes + category: + column: + name: category + hcpc: + column: + name: hcpc + longDescription: + column: + name: long_description + shortDescription: + column: + name: short_description + +--- +kind: TypePermissions +version: v1 +definition: + typeName: ProcedureCodes + permissions: + - role: admin + output: + allowedFields: + - avgDurationMinutes + - category + - hcpc + - longDescription + - shortDescription + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: ProcedureCodesBoolExp + operand: + object: + type: ProcedureCodes + comparableFields: + - fieldName: avgDurationMinutes + booleanExpressionType: Int4BoolExp + - fieldName: category + booleanExpressionType: VarcharBoolExp + - fieldName: hcpc + booleanExpressionType: VarcharBoolExp + - fieldName: longDescription + booleanExpressionType: TextBoolExp + - fieldName: shortDescription + booleanExpressionType: VarcharBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: ProcedureCodesBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: ProcedureCodesAggExp + operand: + object: + aggregatedType: ProcedureCodes + aggregatableFields: + - fieldName: avgDurationMinutes + aggregateExpression: Int4AggExp + - fieldName: category + aggregateExpression: VarcharAggExp + - fieldName: hcpc + aggregateExpression: VarcharAggExp + - fieldName: longDescription + aggregateExpression: TextAggExp + - fieldName: shortDescription + aggregateExpression: VarcharAggExp + count: + enable: true + graphql: + selectTypeName: ProcedureCodesAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: ProcedureCodesOrderByExp + operand: + object: + orderedType: ProcedureCodes + orderableFields: + - fieldName: avgDurationMinutes + orderByExpression: Int4OrderByExp + - fieldName: category + orderByExpression: VarcharOrderByExp + - fieldName: hcpc + orderByExpression: VarcharOrderByExp + - fieldName: longDescription + orderByExpression: TextOrderByExp + - fieldName: shortDescription + orderByExpression: VarcharOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: ProcedureCodesOrderByExp + +--- +kind: Model +version: v2 +definition: + name: ProcedureCodes + objectType: ProcedureCodes + source: + dataConnectorName: reference + collection: procedure_codes + filterExpressionType: ProcedureCodesBoolExp + aggregateExpression: ProcedureCodesAggExp + orderByExpression: ProcedureCodesOrderByExp + graphql: + selectMany: + queryRootField: procedureCodes + subscription: + rootField: procedureCodes + selectUniques: + - queryRootField: procedureCodesByHcpc + uniqueIdentifier: + - hcpc + subscription: + rootField: procedureCodesByHcpc + filterInputTypeName: ProcedureCodesFilterInput + aggregate: + queryRootField: procedureCodesAggregate + subscription: + rootField: procedureCodesAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: ProcedureCodes + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + diff --git a/hasura/industry/healthcare/reference/metadata/reference-types.hml b/hasura/industry/healthcare/reference/metadata/reference-types.hml new file mode 100644 index 00000000..01c63be5 --- /dev/null +++ b/hasura/industry/healthcare/reference/metadata/reference-types.hml @@ -0,0 +1,467 @@ +--- +kind: ScalarType +version: v1 +definition: + name: Varchar + graphql: + typeName: Varchar_1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: VarcharBoolExp + operand: + scalar: + type: Varchar + comparisonOperators: + - name: _eq + argumentType: Varchar! + - name: _gt + argumentType: Varchar! + - name: _gte + argumentType: Varchar! + - name: _ilike + argumentType: Varchar! + - name: _in + argumentType: "[Varchar!]!" + - name: _iregex + argumentType: Varchar! + - name: _like + argumentType: Varchar! + - name: _lt + argumentType: Varchar! + - name: _lte + argumentType: Varchar! + - name: _neq + argumentType: Varchar! + - name: _nilike + argumentType: Varchar! + - name: _niregex + argumentType: Varchar! + - name: _nlike + argumentType: Varchar! + - name: _nregex + argumentType: Varchar! + - name: _regex + argumentType: Varchar! + - name: starts_with + argumentType: Varchar! + - name: ts_match_tt + argumentType: Varchar! + dataConnectorOperatorMapping: + - dataConnectorName: reference + dataConnectorScalarType: varchar + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: VarcharBoolExp_1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: reference + dataConnectorScalarType: varchar + representation: Varchar + graphql: + comparisonExpressionTypeName: VarcharComparisonExp_1 + +--- +kind: ScalarType +version: v1 +definition: + name: Text + graphql: + typeName: Text_1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TextBoolExp + operand: + scalar: + type: Text + comparisonOperators: + - name: _eq + argumentType: Text! + - name: _gt + argumentType: Text! + - name: _gte + argumentType: Text! + - name: _ilike + argumentType: Text! + - name: _in + argumentType: "[Text!]!" + - name: _iregex + argumentType: Text! + - name: _like + argumentType: Text! + - name: _lt + argumentType: Text! + - name: _lte + argumentType: Text! + - name: _neq + argumentType: Text! + - name: _nilike + argumentType: Text! + - name: _niregex + argumentType: Text! + - name: _nlike + argumentType: Text! + - name: _nregex + argumentType: Text! + - name: _regex + argumentType: Text! + - name: starts_with + argumentType: Text! + - name: ts_match_tt + argumentType: Text! + dataConnectorOperatorMapping: + - dataConnectorName: reference + dataConnectorScalarType: text + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TextBoolExp_1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: reference + dataConnectorScalarType: text + representation: Text + graphql: + comparisonExpressionTypeName: TextComparisonExp_1 + +--- +kind: AggregateExpression +version: v1 +definition: + name: VarcharAggExp + operand: + scalar: + aggregatedType: Varchar + aggregationFunctions: + - name: max + returnType: Text + - name: min + returnType: Text + dataConnectorAggregationFunctionMapping: + - dataConnectorName: reference + dataConnectorScalarType: varchar + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: VarcharAggExp_1 + +--- +kind: OrderByExpression +version: v1 +definition: + name: VarcharOrderByExp + operand: + scalar: + orderedType: Varchar + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: VarcharOrderByExp_1 + +--- +kind: ScalarType +version: v1 +definition: + name: Int4 + graphql: + typeName: Int4_1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: Int4BoolExp + operand: + scalar: + type: Int4 + comparisonOperators: + - name: _eq + argumentType: Int4! + - name: _gt + argumentType: Int4! + - name: _gte + argumentType: Int4! + - name: _in + argumentType: "[Int4!]!" + - name: _lt + argumentType: Int4! + - name: _lte + argumentType: Int4! + - name: _neq + argumentType: Int4! + dataConnectorOperatorMapping: + - dataConnectorName: reference + dataConnectorScalarType: int4 + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: Int4BoolExp_1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: reference + dataConnectorScalarType: int4 + representation: Int4 + graphql: + comparisonExpressionTypeName: Int4ComparisonExp_1 + +--- +kind: ScalarType +version: v1 +definition: + name: Numeric + graphql: + typeName: Numeric_1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: NumericBoolExp + operand: + scalar: + type: Numeric + comparisonOperators: + - name: _eq + argumentType: Numeric! + - name: _gt + argumentType: Numeric! + - name: _gte + argumentType: Numeric! + - name: _in + argumentType: "[Numeric!]!" + - name: _lt + argumentType: Numeric! + - name: _lte + argumentType: Numeric! + - name: _neq + argumentType: Numeric! + dataConnectorOperatorMapping: + - dataConnectorName: reference + dataConnectorScalarType: numeric + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: NumericBoolExp_1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: reference + dataConnectorScalarType: numeric + representation: Numeric + graphql: + comparisonExpressionTypeName: NumericComparisonExp_1 + +--- +kind: ScalarType +version: v1 +definition: + name: Int8 + graphql: + typeName: Int8_1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: Int8BoolExp + operand: + scalar: + type: Int8 + comparisonOperators: + - name: _eq + argumentType: Int8! + - name: _gt + argumentType: Int8! + - name: _gte + argumentType: Int8! + - name: _in + argumentType: "[Int8!]!" + - name: _lt + argumentType: Int8! + - name: _lte + argumentType: Int8! + - name: _neq + argumentType: Int8! + dataConnectorOperatorMapping: + - dataConnectorName: reference + dataConnectorScalarType: int8 + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: Int8BoolExp_1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: reference + dataConnectorScalarType: int8 + representation: Int8 + graphql: + comparisonExpressionTypeName: Int8ComparisonExp_1 + +--- +kind: AggregateExpression +version: v1 +definition: + name: Int4AggExp + operand: + scalar: + aggregatedType: Int4 + aggregationFunctions: + - name: avg + returnType: Numeric + - name: bit_and + returnType: Int4 + - name: bit_or + returnType: Int4 + - name: bit_xor + returnType: Int4 + - name: max + returnType: Int4 + - name: min + returnType: Int4 + - name: stddev + returnType: Numeric + - name: stddev_pop + returnType: Numeric + - name: stddev_samp + returnType: Numeric + - name: sum + returnType: Int8 + - name: var_pop + returnType: Numeric + - name: var_samp + returnType: Numeric + - name: variance + returnType: Numeric + dataConnectorAggregationFunctionMapping: + - dataConnectorName: reference + dataConnectorScalarType: int4 + functionMapping: + avg: + name: avg + bit_and: + name: bit_and + bit_or: + name: bit_or + bit_xor: + name: bit_xor + max: + name: max + min: + name: min + stddev: + name: stddev + stddev_pop: + name: stddev_pop + stddev_samp: + name: stddev_samp + sum: + name: sum + var_pop: + name: var_pop + var_samp: + name: var_samp + variance: + name: variance + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: Int4AggExp_1 + +--- +kind: AggregateExpression +version: v1 +definition: + name: TextAggExp + operand: + scalar: + aggregatedType: Text + aggregationFunctions: + - name: max + returnType: Text + - name: min + returnType: Text + dataConnectorAggregationFunctionMapping: + - dataConnectorName: reference + dataConnectorScalarType: text + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: TextAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: Int4OrderByExp + operand: + scalar: + orderedType: Int4 + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: Int4OrderByExp_1 + +--- +kind: OrderByExpression +version: v1 +definition: + name: TextOrderByExp + operand: + scalar: + orderedType: Text + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: TextOrderByExp + diff --git a/hasura/industry/healthcare/reference/metadata/reference.hml b/hasura/industry/healthcare/reference/metadata/reference.hml new file mode 100644 index 00000000..2e1c8ac6 --- /dev/null +++ b/hasura/industry/healthcare/reference/metadata/reference.hml @@ -0,0 +1,1365 @@ +kind: DataConnectorLink +version: v1 +definition: + name: reference + url: + readWriteUrls: + read: + valueFromEnv: REFERENCE_REFERENCE_READ_URL + write: + valueFromEnv: REFERENCE_REFERENCE_WRITE_URL + headers: + Authorization: + valueFromEnv: REFERENCE_REFERENCE_AUTHORIZATION_HEADER + schema: + version: v0.1 + schema: + scalar_types: + int4: + representation: + type: int32 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + bit_and: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + bit_or: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + bit_xor: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + max: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + min: + result_type: + type: nullable + underlying_type: + type: named + name: int4 + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: int4 + _gte: + type: custom + argument_type: + type: named + name: int4 + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: int4 + _lte: + type: custom + argument_type: + type: named + name: int4 + _neq: + type: custom + argument_type: + type: named + name: int4 + int8: + representation: + type: int64 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + bit_and: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + bit_or: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + bit_xor: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + max: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + min: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: int8 + _gte: + type: custom + argument_type: + type: named + name: int8 + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: int8 + _lte: + type: custom + argument_type: + type: named + name: int8 + _neq: + type: custom + argument_type: + type: named + name: int8 + numeric: + representation: + type: bigdecimal + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + max: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + min: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: numeric + _gte: + type: custom + argument_type: + type: named + name: numeric + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: numeric + _lte: + type: custom + argument_type: + type: named + name: numeric + _neq: + type: custom + argument_type: + type: named + name: numeric + text: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: text + _gte: + type: custom + argument_type: + type: named + name: text + _ilike: + type: custom + argument_type: + type: named + name: text + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: text + _like: + type: custom + argument_type: + type: named + name: text + _lt: + type: custom + argument_type: + type: named + name: text + _lte: + type: custom + argument_type: + type: named + name: text + _neq: + type: custom + argument_type: + type: named + name: text + _nilike: + type: custom + argument_type: + type: named + name: text + _niregex: + type: custom + argument_type: + type: named + name: text + _nlike: + type: custom + argument_type: + type: named + name: text + _nregex: + type: custom + argument_type: + type: named + name: text + _regex: + type: custom + argument_type: + type: named + name: text + starts_with: + type: custom + argument_type: + type: named + name: text + ts_match_tt: + type: custom + argument_type: + type: named + name: text + varchar: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: varchar + _gte: + type: custom + argument_type: + type: named + name: varchar + _ilike: + type: custom + argument_type: + type: named + name: varchar + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: varchar + _like: + type: custom + argument_type: + type: named + name: varchar + _lt: + type: custom + argument_type: + type: named + name: varchar + _lte: + type: custom + argument_type: + type: named + name: varchar + _neq: + type: custom + argument_type: + type: named + name: varchar + _nilike: + type: custom + argument_type: + type: named + name: varchar + _niregex: + type: custom + argument_type: + type: named + name: varchar + _nlike: + type: custom + argument_type: + type: named + name: varchar + _nregex: + type: custom + argument_type: + type: named + name: varchar + _regex: + type: custom + argument_type: + type: named + name: varchar + starts_with: + type: custom + argument_type: + type: named + name: varchar + ts_match_tt: + type: custom + argument_type: + type: named + name: varchar + object_types: + delete_drug_packaging_by_ndc_package_code_response: + description: Responses from the 'delete_drug_packaging_by_ndc_package_code' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: drug_packaging + delete_drug_reference_by_product_ndc_response: + description: Responses from the 'delete_drug_reference_by_product_ndc' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: drug_reference + delete_procedure_codes_by_hcpc_response: + description: Responses from the 'delete_procedure_codes_by_hcpc' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: procedure_codes + drug_packaging: + fields: + ndc_package_code: + type: + type: named + name: varchar + package_description: + type: + type: nullable + underlying_type: + type: named + name: varchar + product_ndc: + type: + type: nullable + underlying_type: + type: named + name: varchar + drug_reference: + fields: + active_ingredients_info: + type: + type: nullable + underlying_type: + type: named + name: varchar + dosage_form_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + labeler_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + nonproprietary_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + product_ndc: + type: + type: named + name: varchar + proprietary_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + route_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + substance_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_drug_packaging_object: + fields: + ndc_package_code: + type: + type: named + name: varchar + package_description: + type: + type: nullable + underlying_type: + type: named + name: varchar + product_ndc: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_drug_packaging_response: + description: Responses from the 'insert_drug_packaging' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: drug_packaging + insert_drug_reference_object: + fields: + active_ingredients_info: + type: + type: nullable + underlying_type: + type: named + name: varchar + dosage_form_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + labeler_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + nonproprietary_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + product_ndc: + type: + type: named + name: varchar + proprietary_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + route_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + substance_name: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_drug_reference_response: + description: Responses from the 'insert_drug_reference' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: drug_reference + insert_procedure_codes_object: + fields: + avg_duration_minutes: + type: + type: nullable + underlying_type: + type: named + name: int4 + category: + type: + type: nullable + underlying_type: + type: named + name: varchar + hcpc: + type: + type: named + name: varchar + long_description: + type: + type: named + name: text + short_description: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_procedure_codes_response: + description: Responses from the 'insert_procedure_codes' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: procedure_codes + procedure_codes: + fields: + avg_duration_minutes: + type: + type: nullable + underlying_type: + type: named + name: int4 + category: + type: + type: nullable + underlying_type: + type: named + name: varchar + hcpc: + type: + type: named + name: varchar + long_description: + type: + type: named + name: text + short_description: + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_packaging_ndc_package_code: + description: Update the 'ndc_package_code' column in the 'drug_packaging' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_drug_packaging_package_description: + description: Update the 'package_description' column in the 'drug_packaging' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_packaging_product_ndc: + description: Update the 'product_ndc' column in the 'drug_packaging' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_active_ingredients_info: + description: Update the 'active_ingredients_info' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_dosage_form_name: + description: Update the 'dosage_form_name' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_labeler_name: + description: Update the 'labeler_name' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_nonproprietary_name: + description: Update the 'nonproprietary_name' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_product_ndc: + description: Update the 'product_ndc' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_drug_reference_proprietary_name: + description: Update the 'proprietary_name' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_route_name: + description: Update the 'route_name' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_drug_reference_substance_name: + description: Update the 'substance_name' column in the 'drug_reference' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_procedure_codes_avg_duration_minutes: + description: Update the 'avg_duration_minutes' column in the 'procedure_codes' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: int4 + update_column_procedure_codes_category: + description: Update the 'category' column in the 'procedure_codes' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_procedure_codes_hcpc: + description: Update the 'hcpc' column in the 'procedure_codes' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_procedure_codes_long_description: + description: Update the 'long_description' column in the 'procedure_codes' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: text + update_column_procedure_codes_short_description: + description: Update the 'short_description' column in the 'procedure_codes' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_drug_packaging_by_ndc_package_code_response: + description: Responses from the 'update_drug_packaging_by_ndc_package_code' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: drug_packaging + update_drug_packaging_by_ndc_package_code_update_columns: + description: Update the columns of the 'drug_packaging' collection + fields: + ndc_package_code: + description: Update the 'ndc_package_code' column in the 'drug_packaging' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_packaging_ndc_package_code + package_description: + description: Update the 'package_description' column in the 'drug_packaging' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_packaging_package_description + product_ndc: + description: Update the 'product_ndc' column in the 'drug_packaging' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_packaging_product_ndc + update_drug_reference_by_product_ndc_response: + description: Responses from the 'update_drug_reference_by_product_ndc' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: drug_reference + update_drug_reference_by_product_ndc_update_columns: + description: Update the columns of the 'drug_reference' collection + fields: + active_ingredients_info: + description: Update the 'active_ingredients_info' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_active_ingredients_info + dosage_form_name: + description: Update the 'dosage_form_name' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_dosage_form_name + labeler_name: + description: Update the 'labeler_name' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_labeler_name + nonproprietary_name: + description: Update the 'nonproprietary_name' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_nonproprietary_name + product_ndc: + description: Update the 'product_ndc' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_product_ndc + proprietary_name: + description: Update the 'proprietary_name' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_proprietary_name + route_name: + description: Update the 'route_name' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_route_name + substance_name: + description: Update the 'substance_name' column in the 'drug_reference' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_drug_reference_substance_name + update_procedure_codes_by_hcpc_response: + description: Responses from the 'update_procedure_codes_by_hcpc' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: procedure_codes + update_procedure_codes_by_hcpc_update_columns: + description: Update the columns of the 'procedure_codes' collection + fields: + avg_duration_minutes: + description: Update the 'avg_duration_minutes' column in the 'procedure_codes' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_procedure_codes_avg_duration_minutes + category: + description: Update the 'category' column in the 'procedure_codes' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_procedure_codes_category + hcpc: + description: Update the 'hcpc' column in the 'procedure_codes' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_procedure_codes_hcpc + long_description: + description: Update the 'long_description' column in the 'procedure_codes' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_procedure_codes_long_description + short_description: + description: Update the 'short_description' column in the 'procedure_codes' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_procedure_codes_short_description + collections: + - name: drug_packaging + arguments: {} + type: drug_packaging + uniqueness_constraints: + drug_packaging_pkey: + unique_columns: + - ndc_package_code + foreign_keys: + drug_packaging_product_ndc_fkey: + column_mapping: + product_ndc: product_ndc + foreign_collection: drug_reference + - name: drug_reference + arguments: {} + type: drug_reference + uniqueness_constraints: + drug_reference_pkey: + unique_columns: + - product_ndc + foreign_keys: {} + - name: procedure_codes + arguments: {} + type: procedure_codes + uniqueness_constraints: + procedure_codes_pkey: + unique_columns: + - hcpc + foreign_keys: {} + functions: [] + procedures: + - name: delete_drug_packaging_by_ndc_package_code + description: Delete any row on the 'drug_packaging' collection using the 'ndc_package_code' key + arguments: + key_ndc_package_code: + type: + type: named + name: varchar + pre_check: + description: Delete permission predicate over the 'drug_packaging' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_packaging + result_type: + type: named + name: delete_drug_packaging_by_ndc_package_code_response + - name: delete_drug_reference_by_product_ndc + description: Delete any row on the 'drug_reference' collection using the 'product_ndc' key + arguments: + key_product_ndc: + type: + type: named + name: varchar + pre_check: + description: Delete permission predicate over the 'drug_reference' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_reference + result_type: + type: named + name: delete_drug_reference_by_product_ndc_response + - name: delete_procedure_codes_by_hcpc + description: Delete any row on the 'procedure_codes' collection using the 'hcpc' key + arguments: + key_hcpc: + type: + type: named + name: varchar + pre_check: + description: Delete permission predicate over the 'procedure_codes' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: procedure_codes + result_type: + type: named + name: delete_procedure_codes_by_hcpc_response + - name: insert_drug_packaging + description: Insert into the drug_packaging table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_drug_packaging_object + post_check: + description: Insert permission predicate over the 'drug_packaging' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_packaging + result_type: + type: named + name: insert_drug_packaging_response + - name: insert_drug_reference + description: Insert into the drug_reference table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_drug_reference_object + post_check: + description: Insert permission predicate over the 'drug_reference' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_reference + result_type: + type: named + name: insert_drug_reference_response + - name: insert_procedure_codes + description: Insert into the procedure_codes table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_procedure_codes_object + post_check: + description: Insert permission predicate over the 'procedure_codes' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: procedure_codes + result_type: + type: named + name: insert_procedure_codes_response + - name: update_drug_packaging_by_ndc_package_code + description: Update any row on the 'drug_packaging' collection using the 'ndc_package_code' key + arguments: + key_ndc_package_code: + type: + type: named + name: varchar + post_check: + description: Update permission post-condition predicate over the 'drug_packaging' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_packaging + pre_check: + description: Update permission pre-condition predicate over the 'drug_packaging' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_packaging + update_columns: + type: + type: named + name: update_drug_packaging_by_ndc_package_code_update_columns + result_type: + type: named + name: update_drug_packaging_by_ndc_package_code_response + - name: update_drug_reference_by_product_ndc + description: Update any row on the 'drug_reference' collection using the 'product_ndc' key + arguments: + key_product_ndc: + type: + type: named + name: varchar + post_check: + description: Update permission post-condition predicate over the 'drug_reference' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_reference + pre_check: + description: Update permission pre-condition predicate over the 'drug_reference' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: drug_reference + update_columns: + type: + type: named + name: update_drug_reference_by_product_ndc_update_columns + result_type: + type: named + name: update_drug_reference_by_product_ndc_response + - name: update_procedure_codes_by_hcpc + description: Update any row on the 'procedure_codes' collection using the 'hcpc' key + arguments: + key_hcpc: + type: + type: named + name: varchar + post_check: + description: Update permission post-condition predicate over the 'procedure_codes' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: procedure_codes + pre_check: + description: Update permission pre-condition predicate over the 'procedure_codes' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: procedure_codes + update_columns: + type: + type: named + name: update_procedure_codes_by_hcpc_update_columns + result_type: + type: named + name: update_procedure_codes_by_hcpc_response + capabilities: + version: 0.1.6 + capabilities: + query: + aggregates: {} + variables: {} + explain: {} + nested_fields: + filter_by: {} + order_by: {} + exists: + nested_collections: {} + mutation: + transactional: {} + explain: {} + relationships: + relation_comparisons: {} + order_by_aggregate: {} diff --git a/hasura/industry/healthcare/reference/subgraph.yaml b/hasura/industry/healthcare/reference/subgraph.yaml new file mode 100644 index 00000000..31ae4149 --- /dev/null +++ b/hasura/industry/healthcare/reference/subgraph.yaml @@ -0,0 +1,19 @@ +kind: Subgraph +version: v2 +definition: + name: reference + generator: + rootPath: . + namingConvention: graphql + includePaths: + - metadata + envMapping: + REFERENCE_REFERENCE_AUTHORIZATION_HEADER: + fromEnv: REFERENCE_REFERENCE_AUTHORIZATION_HEADER + REFERENCE_REFERENCE_READ_URL: + fromEnv: REFERENCE_REFERENCE_READ_URL + REFERENCE_REFERENCE_WRITE_URL: + fromEnv: REFERENCE_REFERENCE_WRITE_URL + connectors: + - path: connector/reference/connector.yaml + connectorLinkName: reference diff --git a/hasura/supergraph-config/healthcare/1-supergraph.yaml b/hasura/supergraph-config/healthcare/1-supergraph.yaml new file mode 100644 index 00000000..58b6ab88 --- /dev/null +++ b/hasura/supergraph-config/healthcare/1-supergraph.yaml @@ -0,0 +1,8 @@ +kind: Supergraph +version: v2 +definition: + subgraphs: + - ../../globals/subgraph-basic.yaml + - ../../industry/healthcare/patient_ops/subgraph.yaml + - ../../industry/healthcare/reference/subgraph.yaml + diff --git a/hasura/supergraph-config/healthcare/2-supergraph.yaml b/hasura/supergraph-config/healthcare/2-supergraph.yaml new file mode 100644 index 00000000..141b2f31 --- /dev/null +++ b/hasura/supergraph-config/healthcare/2-supergraph.yaml @@ -0,0 +1,8 @@ +kind: Supergraph +version: v2 +definition: + subgraphs: + - ../../globals/subgraph.yaml + - ../../industry/healthcare/patient_ops/subgraph.yaml + - ../../industry/healthcare/reference/subgraph.yaml + diff --git a/infra/ansible/template.env b/infra/ansible/template.env index 7732fbf1..22d0482d 100644 --- a/infra/ansible/template.env +++ b/infra/ansible/template.env @@ -4,3 +4,4 @@ POSTGRES_PASSWORD: password123 CLICKHOUSE_PASSWORD: password123 CACHING_PLUGIN_SECRET: password123 CACHING_PLUGIN_REDIS_URL: redis://local.hasura.dev:6379 +RESTIFIED_PLUGIN_SECRET: password123 \ No newline at end of file