{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", "dbt_version": "1.11.7", "generated_at": "2026-04-08T04:10:18.484089Z", "invocation_id": "94a1ee58-02e2-4795-9580-4386414f7114", "invocation_started_at": "2026-04-08T04:10:18.156247Z", "env": {}, "project_name": "tamanu", "project_id": "c15f1d5cd4125ea249acc2d27915e18c", "user_id": "f8a416ef-b65a-45ef-b57e-d61cc73d47a6", "send_anonymous_usage_stats": true, "adapter_type": "postgres", "quoting": {"database": true, "schema": true, "identifier": true, "column": null}, "run_started_at": "2026-04-08T04:10:18.156489+00:00"}, "nodes": {"test.tamanu.source_unique_fhir__tamanu_specimens_id.7d00fb0248": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_specimens_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_specimens_id.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_specimens_id.7d00fb0248", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_specimens_id"], "alias": "source_unique_fhir__tamanu_specimens_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2470646, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_unique_fhir__tamanu_specimens_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"specimens\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_specimens_id.7098c20560": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_specimens_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_specimens_id.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_specimens_id.7098c20560", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_specimens_id"], "alias": "source_not_null_fhir__tamanu_specimens_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2586174, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_not_null_fhir__tamanu_specimens_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"specimens\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_specimens_version_id.a13ea95e5c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_specimens_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_specimens_version_id.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_specimens_version_id.a13ea95e5c", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_specimens_version_id"], "alias": "source_not_null_fhir__tamanu_specimens_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2606397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_not_null_fhir__tamanu_specimens_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"specimens\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_specimens_upstream_id.f9565a425c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_specimens_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_specimens_upstream_id.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_specimens_upstream_id.f9565a425c", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_specimens_upstream_id"], "alias": "source_not_null_fhir__tamanu_specimens_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.262525, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_not_null_fhir__tamanu_specimens_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"specimens\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_specimens_last_updated.6f9a98122d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_specimens_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_specimens_last_updated.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_specimens_last_updated.6f9a98122d", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_specimens_last_updated"], "alias": "source_not_null_fhir__tamanu_specimens_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.264363, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_not_null_fhir__tamanu_specimens_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"specimens\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_specimens_is_live.99d3cadd54": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_specimens_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_specimens_is_live.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_specimens_is_live.99d3cadd54", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_specimens_is_live"], "alias": "source_not_null_fhir__tamanu_specimens_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.266203, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_not_null_fhir__tamanu_specimens_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"specimens\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_specimens_resolved.80b78d06fe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_specimens_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_specimens_resolved.sql", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_specimens_resolved.80b78d06fe", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_specimens_resolved"], "alias": "source_not_null_fhir__tamanu_specimens_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2681136, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "specimens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.specimens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/specimens.yml/source_not_null_fhir__tamanu_specimens_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"specimens\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'specimens')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_non_fhir_medici_report_id.0e2dad7c7b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_non_fhir_medici_report_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_non_fhir_medici_report_id.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_non_fhir_medici_report_id.0e2dad7c7b", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_non_fhir_medici_report_id"], "alias": "source_unique_fhir__tamanu_non_fhir_medici_report_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2941766, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_unique_fhir__tamanu_non_fhir_medici_report_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_id.ed54e5fea6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_id.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_id.ed54e5fea6", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_id"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2961373, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.adc82d8370": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.adc82d8370", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_version_id"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2981627, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.68db39c9c1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.68db39c9c1", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.2999818, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated.ab705926fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_n_85c8f7f0c4b7de257e3c1ea2e24c0f1c.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated.ab705926fd", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated"], "alias": "source_not_null_fhir__tamanu_n_85c8f7f0c4b7de257e3c1ea2e24c0f1c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_fhir__tamanu_n_85c8f7f0c4b7de257e3c1ea2e24c0f1c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_fhir__tamanu_n_85c8f7f0c4b7de257e3c1ea2e24c0f1c"}, "created_at": 1775621420.3017585, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_fhir__tamanu_n_85c8f7f0c4b7de257e3c1ea2e24c0f1c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_n_85c8f7f0c4b7de257e3c1ea2e24c0f1c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.3bb8a03bae": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.3bb8a03bae", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3035383, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.21865513be": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_first_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.21865513be", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_first_name"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_first_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3052945, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect first_name\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere first_name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "first_name", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "first_name", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.cb5b40a829": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_last_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.cb5b40a829", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_last_name"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_last_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3070388, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_name\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere last_name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_name", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_name", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_sex.dfa61ee459": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_sex", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_sex.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_sex.dfa61ee459", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_sex"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_sex", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.308925, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_sex.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect sex\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere sex is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "sex", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "sex", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id.5521fce097": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_n_a037f545c0d16abdedb1ec873a895012.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id.5521fce097", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id"], "alias": "source_not_null_fhir__tamanu_n_a037f545c0d16abdedb1ec873a895012", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_fhir__tamanu_n_a037f545c0d16abdedb1ec873a895012", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_fhir__tamanu_n_a037f545c0d16abdedb1ec873a895012"}, "created_at": 1775621420.3106844, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_fhir__tamanu_n_a037f545c0d16abdedb1ec873a895012\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_n_a037f545c0d16abdedb1ec873a895012.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date.4142e92001": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_n_550ca2d2ad0c1cdae90d3980d8f1fd44.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date.4142e92001", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date"], "alias": "source_not_null_fhir__tamanu_n_550ca2d2ad0c1cdae90d3980d8f1fd44", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_fhir__tamanu_n_550ca2d2ad0c1cdae90d3980d8f1fd44", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_fhir__tamanu_n_550ca2d2ad0c1cdae90d3980d8f1fd44"}, "created_at": 1775621420.3124151, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_fhir__tamanu_n_550ca2d2ad0c1cdae90d3980d8f1fd44\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_n_550ca2d2ad0c1cdae90d3980d8f1fd44.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_start_date\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere encounter_start_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_start_date", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_start_date", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.ee7f06020a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.ee7f06020a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3141577, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visit_type\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere visit_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visit_type", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visit_type", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.8f4e5b7426": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.8f4e5b7426", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_is_live"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.315901, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.592feba481": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_non_fhir_medici_report_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.sql", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.592feba481", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_non_fhir_medici_report_resolved"], "alias": "source_not_null_fhir__tamanu_non_fhir_medici_report_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3177762, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "non_fhir_medici_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/non_fhir_medici_report.yml/source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"non_fhir_medici_report\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'non_fhir_medici_report')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_encounters_id.bdda44ec81": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_encounters_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_encounters_id.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_encounters_id.bdda44ec81", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_encounters_id"], "alias": "source_unique_fhir__tamanu_encounters_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3202806, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_unique_fhir__tamanu_encounters_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"encounters\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_id.5459be3bbc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_id.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_id.5459be3bbc", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_id"], "alias": "source_not_null_fhir__tamanu_encounters_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3220377, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"encounters\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_version_id.8f4dcb3a64": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_version_id.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_version_id.8f4dcb3a64", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_version_id"], "alias": "source_not_null_fhir__tamanu_encounters_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3253317, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"encounters\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_upstream_id.9257212a57": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_upstream_id.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_upstream_id.9257212a57", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_upstream_id"], "alias": "source_not_null_fhir__tamanu_encounters_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3271444, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"encounters\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_last_updated.199565a5e7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_last_updated.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_last_updated.199565a5e7", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_last_updated"], "alias": "source_not_null_fhir__tamanu_encounters_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3288617, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"encounters\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_status.7255ffba7d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_status.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_status.7255ffba7d", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_status"], "alias": "source_not_null_fhir__tamanu_encounters_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.330586, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"fhir\".\"encounters\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged.ea2dd4dc2a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_fhir__t_548812817b21223dd4fcfeab6e54fa4e.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged.ea2dd4dc2a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged"], "alias": "source_accepted_values_fhir__t_548812817b21223dd4fcfeab6e54fa4e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_fhir__t_548812817b21223dd4fcfeab6e54fa4e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_fhir__t_548812817b21223dd4fcfeab6e54fa4e"}, "created_at": 1775621420.3323317, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_fhir__t_548812817b21223dd4fcfeab6e54fa4e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_accepted_values_fhir__t_548812817b21223dd4fcfeab6e54fa4e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"fhir\".\"encounters\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'in-progress','discharged'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["in-progress", "discharged"], "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_is_live.c401845261": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_is_live.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_is_live.c401845261", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_is_live"], "alias": "source_not_null_fhir__tamanu_encounters_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3521304, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"encounters\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_encounters_resolved.8217d372c8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_encounters_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_encounters_resolved.sql", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_encounters_resolved.8217d372c8", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_encounters_resolved"], "alias": "source_not_null_fhir__tamanu_encounters_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3539956, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/encounters.yml/source_not_null_fhir__tamanu_encounters_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"encounters\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_patients_id.85cfe6c3ea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_patients_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_patients_id.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_patients_id.85cfe6c3ea", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_patients_id"], "alias": "source_unique_fhir__tamanu_patients_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3568301, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_unique_fhir__tamanu_patients_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"patients\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_id.0c43d4a03e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_id.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_id.0c43d4a03e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_id"], "alias": "source_not_null_fhir__tamanu_patients_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3586962, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"patients\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_version_id.6f3ced7026": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_version_id.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_version_id.6f3ced7026", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_version_id"], "alias": "source_not_null_fhir__tamanu_patients_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.360638, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"patients\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_upstream_id.dc466caaf3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_upstream_id.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_upstream_id.dc466caaf3", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_upstream_id"], "alias": "source_not_null_fhir__tamanu_patients_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3624713, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"patients\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_last_updated.65b7545398": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_last_updated.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_last_updated.65b7545398", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_last_updated"], "alias": "source_not_null_fhir__tamanu_patients_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.364258, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"patients\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_identifier.96f86bad18": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_identifier", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_identifier.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_identifier.96f86bad18", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_identifier"], "alias": "source_not_null_fhir__tamanu_patients_identifier", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3660195, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_identifier.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect identifier\nfrom \"central\".\"fhir\".\"patients\"\nwhere identifier is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "identifier", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "identifier", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_active.922409a478": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_active", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_active.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_active.922409a478", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_active"], "alias": "source_not_null_fhir__tamanu_patients_active", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3677537, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_active.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect active\nfrom \"central\".\"fhir\".\"patients\"\nwhere active is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "active", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "active", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_name.0e7b5767d3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_name.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_name.0e7b5767d3", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_name"], "alias": "source_not_null_fhir__tamanu_patients_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3696232, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"fhir\".\"patients\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_telecom.9515617b10": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_telecom", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_telecom.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_telecom.9515617b10", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_telecom"], "alias": "source_not_null_fhir__tamanu_patients_telecom", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3713849, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_telecom.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect telecom\nfrom \"central\".\"fhir\".\"patients\"\nwhere telecom is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "telecom", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "telecom", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_gender.a288fa3d46": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_gender", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_gender.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_gender.a288fa3d46", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_gender"], "alias": "source_not_null_fhir__tamanu_patients_gender", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.373134, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_gender.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect gender\nfrom \"central\".\"fhir\".\"patients\"\nwhere gender is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "gender", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gender", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_address.1e80038399": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_address", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_address.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_address.1e80038399", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_address"], "alias": "source_not_null_fhir__tamanu_patients_address", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3748643, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_address.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect address\nfrom \"central\".\"fhir\".\"patients\"\nwhere address is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "address", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "address", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_extension.e3b05cb34a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_extension", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_extension.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_extension.e3b05cb34a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_extension"], "alias": "source_not_null_fhir__tamanu_patients_extension", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3766072, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_extension.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect extension\nfrom \"central\".\"fhir\".\"patients\"\nwhere extension is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "extension", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "extension", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_is_live.f6662d2722": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_is_live.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_is_live.f6662d2722", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_is_live"], "alias": "source_not_null_fhir__tamanu_patients_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3784423, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"patients\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_patients_resolved.f5739ac9ca": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_patients_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_patients_resolved.sql", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_patients_resolved.f5739ac9ca", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_patients_resolved"], "alias": "source_not_null_fhir__tamanu_patients_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.380201, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/patients.yml/source_not_null_fhir__tamanu_patients_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"patients\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_medication_requests_id.538c5993b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_medication_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_medication_requests_id.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_medication_requests_id.538c5993b6", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_medication_requests_id"], "alias": "source_unique_fhir__tamanu_medication_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.382654, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_unique_fhir__tamanu_medication_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_id.7fa1f94c15": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_id.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_id.7fa1f94c15", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_id"], "alias": "source_not_null_fhir__tamanu_medication_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3844173, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_version_id.21066cfc57": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_version_id.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_version_id.21066cfc57", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_version_id"], "alias": "source_not_null_fhir__tamanu_medication_requests_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3861234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_medication_requests_upstream_id.73906b5380": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_medication_requests_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_medication_requests_upstream_id.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_medication_requests_upstream_id.73906b5380", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_medication_requests_upstream_id"], "alias": "source_unique_fhir__tamanu_medication_requests_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3879719, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_unique_fhir__tamanu_medication_requests_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    upstream_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere upstream_id is not null\ngroup by upstream_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_upstream_id.354715d4f3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_upstream_id.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_upstream_id.354715d4f3", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_upstream_id"], "alias": "source_not_null_fhir__tamanu_medication_requests_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3897448, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_last_updated.26ce392978": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_last_updated.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_last_updated.26ce392978", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_last_updated"], "alias": "source_not_null_fhir__tamanu_medication_requests_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3914742, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_status.24aa06df0c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_status.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_status.24aa06df0c", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_status"], "alias": "source_not_null_fhir__tamanu_medication_requests_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3932037, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_intent.063b6ce234": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_intent", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_intent.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_intent.063b6ce234", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_intent"], "alias": "source_not_null_fhir__tamanu_medication_requests_intent", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3949046, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_intent.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect intent\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere intent is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "intent", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "intent", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_resolved.d4ecb04fda": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_resolved.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_resolved.d4ecb04fda", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_resolved"], "alias": "source_not_null_fhir__tamanu_medication_requests_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3967786, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_medication_requests_is_live.d31095549d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_medication_requests_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_medication_requests_is_live.sql", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_medication_requests_is_live.d31095549d", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_medication_requests_is_live"], "alias": "source_not_null_fhir__tamanu_medication_requests_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.3985014, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "medication_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.medication_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/medication_requests.yml/source_not_null_fhir__tamanu_medication_requests_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"medication_requests\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'medication_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_service_requests_id.e6a309054d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_service_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_service_requests_id.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_service_requests_id.e6a309054d", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_service_requests_id"], "alias": "source_unique_fhir__tamanu_service_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4008856, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_unique_fhir__tamanu_service_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_id.a59c3d7e06": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_id.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_id.a59c3d7e06", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_id"], "alias": "source_not_null_fhir__tamanu_service_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.402617, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_version_id.136a4ee810": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_version_id.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_version_id.136a4ee810", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_version_id"], "alias": "source_not_null_fhir__tamanu_service_requests_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4044633, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_upstream_id.81cbc8acb4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_upstream_id.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_upstream_id.81cbc8acb4", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_upstream_id"], "alias": "source_not_null_fhir__tamanu_service_requests_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4061959, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_last_updated.e3657976a4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_last_updated.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_last_updated.e3657976a4", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_last_updated"], "alias": "source_not_null_fhir__tamanu_service_requests_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4079256, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_identifier.73b3472574": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_identifier", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_identifier.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_identifier.73b3472574", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_identifier"], "alias": "source_not_null_fhir__tamanu_service_requests_identifier", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4096406, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_identifier.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect identifier\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere identifier is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "identifier", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "identifier", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown.08fbf0e1e4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_fhir__t_627622db49f850bc37feda5939b72d0c.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown.08fbf0e1e4", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown"], "alias": "source_accepted_values_fhir__t_627622db49f850bc37feda5939b72d0c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_fhir__t_627622db49f850bc37feda5939b72d0c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_fhir__t_627622db49f850bc37feda5939b72d0c"}, "created_at": 1775621420.4113936, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_fhir__t_627622db49f850bc37feda5939b72d0c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_accepted_values_fhir__t_627622db49f850bc37feda5939b72d0c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"fhir\".\"service_requests\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'draft','active','on-hold','revoked','completed','entered-in-error','unknown'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["draft", "active", "on-hold", "revoked", "completed", "entered-in-error", "unknown"], "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_intent__order.a25886f00a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_fhir__tamanu_service_requests_intent__order", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_fhir__t_379ea2e81ce03257af2eed2d01e3192e.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_intent__order.a25886f00a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_accepted_values_fhir__tamanu_service_requests_intent__order"], "alias": "source_accepted_values_fhir__t_379ea2e81ce03257af2eed2d01e3192e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_fhir__t_379ea2e81ce03257af2eed2d01e3192e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_fhir__t_379ea2e81ce03257af2eed2d01e3192e"}, "created_at": 1775621420.417919, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_fhir__t_379ea2e81ce03257af2eed2d01e3192e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_accepted_values_fhir__t_379ea2e81ce03257af2eed2d01e3192e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        intent as value_field,\n        count(*) as n_records\n\n    from \"central\".\"fhir\".\"service_requests\"\n    group by intent\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'order'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "intent", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "intent", "values": ["order"], "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_category.af95957557": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_category", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_category.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_category.af95957557", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_category"], "alias": "source_not_null_fhir__tamanu_service_requests_category", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4226098, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_category.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect category\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere category is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "category", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "category", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat.abe483e472": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_fhir__t_5a1fef8688fe2a1a6a90370537de9983.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat.abe483e472", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat"], "alias": "source_accepted_values_fhir__t_5a1fef8688fe2a1a6a90370537de9983", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_fhir__t_5a1fef8688fe2a1a6a90370537de9983", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_fhir__t_5a1fef8688fe2a1a6a90370537de9983"}, "created_at": 1775621420.4243865, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_fhir__t_5a1fef8688fe2a1a6a90370537de9983\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_accepted_values_fhir__t_5a1fef8688fe2a1a6a90370537de9983.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        priority as value_field,\n        count(*) as n_records\n\n    from \"central\".\"fhir\".\"service_requests\"\n    group by priority\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'routine','urgent','asap','stat'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "priority", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "priority", "values": ["routine", "urgent", "asap", "stat"], "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_order_detail.be8e9124fc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_order_detail", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_order_detail.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_order_detail.be8e9124fc", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_order_detail"], "alias": "source_not_null_fhir__tamanu_service_requests_order_detail", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4299355, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_order_detail.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect order_detail\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere order_detail is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "order_detail", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "order_detail", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_location_code.c8c33ef722": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_location_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_location_code.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_location_code.c8c33ef722", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_location_code"], "alias": "source_not_null_fhir__tamanu_service_requests_location_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4316795, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_location_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect location_code\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere location_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_code", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "location_code", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_is_live.0922cb4130": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_is_live.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_is_live.0922cb4130", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_is_live"], "alias": "source_not_null_fhir__tamanu_service_requests_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4334095, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_service_requests_resolved.92e4b8bf48": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_service_requests_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_service_requests_resolved.sql", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_service_requests_resolved.92e4b8bf48", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_service_requests_resolved"], "alias": "source_not_null_fhir__tamanu_service_requests_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4351287, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "service_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.service_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/service_requests.yml/source_not_null_fhir__tamanu_service_requests_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"service_requests\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'service_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_jobs_id.96f908c26e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_jobs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_jobs_id.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_jobs_id.96f908c26e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_jobs_id"], "alias": "source_unique_fhir__tamanu_jobs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4382963, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_unique_fhir__tamanu_jobs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"jobs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_id.51acd6ac1e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_id.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_id.51acd6ac1e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_id"], "alias": "source_not_null_fhir__tamanu_jobs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4400458, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"jobs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_created_at.6a7f288177": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_created_at.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_created_at.6a7f288177", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_created_at"], "alias": "source_not_null_fhir__tamanu_jobs_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4417944, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"fhir\".\"jobs\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_updated_at.90a980bdc8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_updated_at.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_updated_at.90a980bdc8", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_updated_at"], "alias": "source_not_null_fhir__tamanu_jobs_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4435072, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"fhir\".\"jobs\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_priority.2313d9b744": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_priority", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_priority.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_priority.2313d9b744", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_priority"], "alias": "source_not_null_fhir__tamanu_jobs_priority", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4453464, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_priority.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect priority\nfrom \"central\".\"fhir\".\"jobs\"\nwhere priority is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "priority", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "priority", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_status.efd7e342aa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_status.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_status.efd7e342aa", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_status"], "alias": "source_not_null_fhir__tamanu_jobs_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4470823, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"fhir\".\"jobs\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored.42189fdf8f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_fhir__t_15a088123d34218f67068b3e8ffdc2b6.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored.42189fdf8f", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored"], "alias": "source_accepted_values_fhir__t_15a088123d34218f67068b3e8ffdc2b6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_fhir__t_15a088123d34218f67068b3e8ffdc2b6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_fhir__t_15a088123d34218f67068b3e8ffdc2b6"}, "created_at": 1775621420.4488297, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_fhir__t_15a088123d34218f67068b3e8ffdc2b6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_accepted_values_fhir__t_15a088123d34218f67068b3e8ffdc2b6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"fhir\".\"jobs\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Queued','Grabbed','Started','Errored'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["Queued", "Grabbed", "Started", "Errored"], "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_topic.98c2f9b4b2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_topic", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_topic.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_topic.98c2f9b4b2", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_topic"], "alias": "source_not_null_fhir__tamanu_jobs_topic", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4548063, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_topic.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect topic\nfrom \"central\".\"fhir\".\"jobs\"\nwhere topic is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "topic", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "topic", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_jobs_discriminant.22b1361683": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_jobs_discriminant", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_jobs_discriminant.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_jobs_discriminant.22b1361683", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_jobs_discriminant"], "alias": "source_unique_fhir__tamanu_jobs_discriminant", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.45656, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_unique_fhir__tamanu_jobs_discriminant.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    discriminant as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"jobs\"\nwhere discriminant is not null\ngroup by discriminant\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "discriminant", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "discriminant", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_discriminant.5c7d80ea70": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_discriminant", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_discriminant.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_discriminant.5c7d80ea70", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_discriminant"], "alias": "source_not_null_fhir__tamanu_jobs_discriminant", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4582758, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_discriminant.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect discriminant\nfrom \"central\".\"fhir\".\"jobs\"\nwhere discriminant is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "discriminant", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "discriminant", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_jobs_payload.20e661456f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_jobs_payload", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_jobs_payload.sql", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_jobs_payload.20e661456f", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_jobs_payload"], "alias": "source_not_null_fhir__tamanu_jobs_payload", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4599912, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "jobs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.jobs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/jobs.yml/source_not_null_fhir__tamanu_jobs_payload.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect payload\nfrom \"central\".\"fhir\".\"jobs\"\nwhere payload is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "payload", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "payload", "model": "{{ get_where_subquery(source('fhir__tamanu', 'jobs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_job_workers_id.dee0269c4e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_job_workers_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_job_workers_id.sql", "original_file_path": "../../database/model/fhir/job_workers.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_job_workers_id.dee0269c4e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_job_workers_id"], "alias": "source_unique_fhir__tamanu_job_workers_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.462479, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "job_workers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.job_workers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/job_workers.yml/source_unique_fhir__tamanu_job_workers_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"job_workers\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'job_workers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_job_workers_id.c3476b3eb9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_job_workers_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_job_workers_id.sql", "original_file_path": "../../database/model/fhir/job_workers.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_job_workers_id.c3476b3eb9", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_job_workers_id"], "alias": "source_not_null_fhir__tamanu_job_workers_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.46421, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "job_workers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.job_workers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/job_workers.yml/source_not_null_fhir__tamanu_job_workers_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"job_workers\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'job_workers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_job_workers_created_at.860a644fd1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_job_workers_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_job_workers_created_at.sql", "original_file_path": "../../database/model/fhir/job_workers.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_job_workers_created_at.860a644fd1", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_job_workers_created_at"], "alias": "source_not_null_fhir__tamanu_job_workers_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4659395, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "job_workers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.job_workers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/job_workers.yml/source_not_null_fhir__tamanu_job_workers_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"fhir\".\"job_workers\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('fhir__tamanu', 'job_workers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_job_workers_updated_at.0fe62e1558": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_job_workers_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_job_workers_updated_at.sql", "original_file_path": "../../database/model/fhir/job_workers.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_job_workers_updated_at.0fe62e1558", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_job_workers_updated_at"], "alias": "source_not_null_fhir__tamanu_job_workers_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4676528, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "job_workers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.job_workers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/job_workers.yml/source_not_null_fhir__tamanu_job_workers_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"fhir\".\"job_workers\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('fhir__tamanu', 'job_workers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_job_workers_metadata.e61a2ced27": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_job_workers_metadata", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_job_workers_metadata.sql", "original_file_path": "../../database/model/fhir/job_workers.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_job_workers_metadata.e61a2ced27", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_job_workers_metadata"], "alias": "source_not_null_fhir__tamanu_job_workers_metadata", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.469342, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "job_workers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.job_workers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/job_workers.yml/source_not_null_fhir__tamanu_job_workers_metadata.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect metadata\nfrom \"central\".\"fhir\".\"job_workers\"\nwhere metadata is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "metadata", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "metadata", "model": "{{ get_where_subquery(source('fhir__tamanu', 'job_workers')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_immunizations_id.596d017734": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_immunizations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_immunizations_id.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_immunizations_id.596d017734", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_immunizations_id"], "alias": "source_unique_fhir__tamanu_immunizations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4717555, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_unique_fhir__tamanu_immunizations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_id.7f90c3dd59": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_id.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_id.7f90c3dd59", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_id"], "alias": "source_not_null_fhir__tamanu_immunizations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4734979, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_version_id.f3bbf1cc3b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_version_id.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_version_id.f3bbf1cc3b", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_version_id"], "alias": "source_not_null_fhir__tamanu_immunizations_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4752119, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_upstream_id.5882d9e14e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_upstream_id.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_upstream_id.5882d9e14e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_upstream_id"], "alias": "source_not_null_fhir__tamanu_immunizations_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4769144, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_last_updated.62a54529c6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_last_updated.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_last_updated.62a54529c6", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_last_updated"], "alias": "source_not_null_fhir__tamanu_immunizations_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4787104, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_status.4ce41d1f44": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_status.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_status.4ce41d1f44", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_status"], "alias": "source_not_null_fhir__tamanu_immunizations_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4804053, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done.38601d1fe7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_fhir__t_7b19793966b233428ebf149d93be4fa6.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done.38601d1fe7", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done"], "alias": "source_accepted_values_fhir__t_7b19793966b233428ebf149d93be4fa6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_fhir__t_7b19793966b233428ebf149d93be4fa6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_fhir__t_7b19793966b233428ebf149d93be4fa6"}, "created_at": 1775621420.4821734, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_fhir__t_7b19793966b233428ebf149d93be4fa6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_accepted_values_fhir__t_7b19793966b233428ebf149d93be4fa6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"fhir\".\"immunizations\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'completed','entered-in-error','not-done'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["completed", "entered-in-error", "not-done"], "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_vaccine_code.ed1ac8c537": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_vaccine_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_vaccine_code.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_vaccine_code.ed1ac8c537", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_vaccine_code"], "alias": "source_not_null_fhir__tamanu_immunizations_vaccine_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.487428, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_vaccine_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect vaccine_code\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere vaccine_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "vaccine_code", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "vaccine_code", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_patient.8dcba1e0e1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_patient", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_patient.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_patient.8dcba1e0e1", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_patient"], "alias": "source_not_null_fhir__tamanu_immunizations_patient", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4892817, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_patient.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere patient is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_site.b1fa3dddbb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_site", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_site.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_site.b1fa3dddbb", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_site"], "alias": "source_not_null_fhir__tamanu_immunizations_site", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4910324, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_site.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect site\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere site is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "site", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "site", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_performer.29b3a99986": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_performer", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_performer.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_performer.29b3a99986", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_performer"], "alias": "source_not_null_fhir__tamanu_immunizations_performer", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4927552, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_performer.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect performer\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere performer is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "performer", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "performer", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_protocol_applied.563e648d14": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_protocol_applied", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_protocol_applied.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_protocol_applied.563e648d14", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_protocol_applied"], "alias": "source_not_null_fhir__tamanu_immunizations_protocol_applied", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4944518, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_protocol_applied.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect protocol_applied\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere protocol_applied is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "protocol_applied", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "protocol_applied", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_is_live.f8992f894b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_is_live.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_is_live.f8992f894b", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_is_live"], "alias": "source_not_null_fhir__tamanu_immunizations_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4962785, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_immunizations_resolved.ff096f7b43": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_immunizations_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_immunizations_resolved.sql", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_immunizations_resolved.ff096f7b43", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_immunizations_resolved"], "alias": "source_not_null_fhir__tamanu_immunizations_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.4979959, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "immunizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.immunizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/immunizations.yml/source_not_null_fhir__tamanu_immunizations_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"immunizations\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'immunizations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_organizations_id.e211eaf17e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_organizations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_organizations_id.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_organizations_id.e211eaf17e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_organizations_id"], "alias": "source_unique_fhir__tamanu_organizations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.500277, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_unique_fhir__tamanu_organizations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"organizations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_id.ac18b655d1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_id.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_id.ac18b655d1", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_id"], "alias": "source_not_null_fhir__tamanu_organizations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5019987, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"organizations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_version_id.f0fa91055e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_version_id.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_version_id.f0fa91055e", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_version_id"], "alias": "source_not_null_fhir__tamanu_organizations_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5038905, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"organizations\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_upstream_id.3c212df269": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_upstream_id.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_upstream_id.3c212df269", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_upstream_id"], "alias": "source_not_null_fhir__tamanu_organizations_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.505615, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"organizations\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_last_updated.c79b2ea09a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_last_updated.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_last_updated.c79b2ea09a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_last_updated"], "alias": "source_not_null_fhir__tamanu_organizations_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5073073, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"organizations\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_name.9dbf1f951c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_name.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_name.9dbf1f951c", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_name"], "alias": "source_not_null_fhir__tamanu_organizations_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5090215, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"fhir\".\"organizations\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_is_live.edc801380a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_is_live.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_is_live.edc801380a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_is_live"], "alias": "source_not_null_fhir__tamanu_organizations_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.510738, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"organizations\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_organizations_resolved.813365ad2b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_organizations_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_organizations_resolved.sql", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_organizations_resolved.813365ad2b", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_organizations_resolved"], "alias": "source_not_null_fhir__tamanu_organizations_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.512453, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "organizations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.organizations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/organizations.yml/source_not_null_fhir__tamanu_organizations_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"organizations\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'organizations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_fhir__tamanu_practitioners_id.a2b4a981a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_fhir__tamanu_practitioners_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_fhir__tamanu_practitioners_id.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_unique_fhir__tamanu_practitioners_id.a2b4a981a6", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_unique_fhir__tamanu_practitioners_id"], "alias": "source_unique_fhir__tamanu_practitioners_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5148375, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_unique_fhir__tamanu_practitioners_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_practitioners_id.296f73c09b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_practitioners_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_practitioners_id.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_practitioners_id.296f73c09b", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_practitioners_id"], "alias": "source_not_null_fhir__tamanu_practitioners_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5165493, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_not_null_fhir__tamanu_practitioners_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_practitioners_version_id.42684fbfa8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_practitioners_version_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_practitioners_version_id.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_practitioners_version_id.42684fbfa8", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_practitioners_version_id"], "alias": "source_not_null_fhir__tamanu_practitioners_version_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5182471, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_not_null_fhir__tamanu_practitioners_version_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_id\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere version_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_practitioners_upstream_id.3446e5bb3c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_practitioners_upstream_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_practitioners_upstream_id.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_practitioners_upstream_id.3446e5bb3c", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_practitioners_upstream_id"], "alias": "source_not_null_fhir__tamanu_practitioners_upstream_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.519948, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_not_null_fhir__tamanu_practitioners_upstream_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect upstream_id\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere upstream_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "upstream_id", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "upstream_id", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_practitioners_last_updated.324d60604b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_practitioners_last_updated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_practitioners_last_updated.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_practitioners_last_updated.324d60604b", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_practitioners_last_updated"], "alias": "source_not_null_fhir__tamanu_practitioners_last_updated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5217783, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_not_null_fhir__tamanu_practitioners_last_updated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_updated\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere last_updated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_updated", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_updated", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_practitioners_is_live.f0077a943a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_practitioners_is_live", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_practitioners_is_live.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_practitioners_is_live.f0077a943a", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_practitioners_is_live"], "alias": "source_not_null_fhir__tamanu_practitioners_is_live", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5234728, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_not_null_fhir__tamanu_practitioners_is_live.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_live\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere is_live is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_live", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_live", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_fhir__tamanu_practitioners_resolved.18050ffab2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_fhir__tamanu_practitioners_resolved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_fhir__tamanu_practitioners_resolved.sql", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "test.tamanu.source_not_null_fhir__tamanu_practitioners_resolved.18050ffab2", "fqn": ["tamanu", "..", "database", "model", "fhir", "source_not_null_fhir__tamanu_practitioners_resolved"], "alias": "source_not_null_fhir__tamanu_practitioners_resolved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5251822, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["fhir__tamanu", "practitioners"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.fhir__tamanu.practitioners"]}, "compiled_path": "target/compiled/tamanu/../../database/model/fhir/practitioners.yml/source_not_null_fhir__tamanu_practitioners_resolved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect resolved\nfrom \"central\".\"fhir\".\"practitioners\"\nwhere resolved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "resolved", "file_key_name": "sources.fhir__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "resolved", "model": "{{ get_where_subquery(source('fhir__tamanu', 'practitioners')) }}"}, "namespace": null}}, "test.tamanu.source_unique_logs__tamanu_migrations_id.12ea87b61e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_logs__tamanu_migrations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_logs__tamanu_migrations_id.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_unique_logs__tamanu_migrations_id.12ea87b61e", "fqn": ["tamanu", "..", "database", "model", "logs", "source_unique_logs__tamanu_migrations_id"], "alias": "source_unique_logs__tamanu_migrations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.527454, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_unique_logs__tamanu_migrations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"logs\".\"migrations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_id.5638ece336": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_id.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_id.5638ece336", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_id"], "alias": "source_not_null_logs__tamanu_migrations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5291824, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"logs\".\"migrations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_logged_at.9b591e2016": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_logged_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_logged_at.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_logged_at.9b591e2016", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_logged_at"], "alias": "source_not_null_logs__tamanu_migrations_logged_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5310037, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_logged_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect logged_at\nfrom \"central\".\"logs\".\"migrations\"\nwhere logged_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "logged_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "logged_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_record_sync_tick.ddbd48d1c1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_record_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_record_sync_tick.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_record_sync_tick.ddbd48d1c1", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_record_sync_tick"], "alias": "source_not_null_logs__tamanu_migrations_record_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5327077, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_record_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_sync_tick\nfrom \"central\".\"logs\".\"migrations\"\nwhere record_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_sync_tick", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_sync_tick", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_device_id.30a569c46c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_device_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_device_id.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_device_id.30a569c46c", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_device_id"], "alias": "source_not_null_logs__tamanu_migrations_device_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5343904, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_device_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect device_id\nfrom \"central\".\"logs\".\"migrations\"\nwhere device_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "device_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_version.ad4fd97571": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_version", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_version.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_version.ad4fd97571", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_version"], "alias": "source_not_null_logs__tamanu_migrations_version", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5360847, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_version.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version\nfrom \"central\".\"logs\".\"migrations\"\nwhere version is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_direction.c83fad8f7e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_direction", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_direction.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_direction.c83fad8f7e", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_direction"], "alias": "source_not_null_logs__tamanu_migrations_direction", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5377634, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_direction.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect direction\nfrom \"central\".\"logs\".\"migrations\"\nwhere direction is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "direction", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "direction", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_migrations.bf597438c3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_migrations", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_migrations.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_migrations.bf597438c3", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_migrations"], "alias": "source_not_null_logs__tamanu_migrations_migrations", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5400658, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_migrations.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect migrations\nfrom \"central\".\"logs\".\"migrations\"\nwhere migrations is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "migrations", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "migrations", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_migrations_updated_at_sync_tick.2ee4244e54": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_migrations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_migrations_updated_at_sync_tick.sql", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_migrations_updated_at_sync_tick.2ee4244e54", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_migrations_updated_at_sync_tick"], "alias": "source_not_null_logs__tamanu_migrations_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5417914, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "migrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.migrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/migrations.yml/source_not_null_logs__tamanu_migrations_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"logs\".\"migrations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('logs__tamanu', 'migrations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_logs__tamanu_changes_id.dd0bf715d9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_logs__tamanu_changes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_logs__tamanu_changes_id.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_unique_logs__tamanu_changes_id.dd0bf715d9", "fqn": ["tamanu", "..", "database", "model", "logs", "source_unique_logs__tamanu_changes_id"], "alias": "source_unique_logs__tamanu_changes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.544079, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_unique_logs__tamanu_changes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"logs\".\"changes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_id.866e117189": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_id.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_id.866e117189", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_id"], "alias": "source_not_null_logs__tamanu_changes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5458293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"logs\".\"changes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_table_oid.b9844b50e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_table_oid", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_table_oid.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_table_oid.b9844b50e8", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_table_oid"], "alias": "source_not_null_logs__tamanu_changes_table_oid", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5475502, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_table_oid.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect table_oid\nfrom \"central\".\"logs\".\"changes\"\nwhere table_oid is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "table_oid", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "table_oid", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_table_schema.3e59c96f61": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_table_schema", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_table_schema.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_table_schema.3e59c96f61", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_table_schema"], "alias": "source_not_null_logs__tamanu_changes_table_schema", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5494397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_table_schema.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect table_schema\nfrom \"central\".\"logs\".\"changes\"\nwhere table_schema is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "table_schema", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "table_schema", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_table_name.0b42537bc6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_table_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_table_name.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_table_name.0b42537bc6", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_table_name"], "alias": "source_not_null_logs__tamanu_changes_table_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5511594, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_table_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect table_name\nfrom \"central\".\"logs\".\"changes\"\nwhere table_name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "table_name", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "table_name", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_logged_at.1def9d3088": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_logged_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_logged_at.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_logged_at.1def9d3088", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_logged_at"], "alias": "source_not_null_logs__tamanu_changes_logged_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5529046, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_logged_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect logged_at\nfrom \"central\".\"logs\".\"changes\"\nwhere logged_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "logged_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "logged_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_created_at.3b82d26023": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_created_at.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_created_at.3b82d26023", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_created_at"], "alias": "source_not_null_logs__tamanu_changes_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5545998, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"logs\".\"changes\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_updated_by_user_id.82cb04062b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_updated_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_updated_by_user_id.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_updated_by_user_id.82cb04062b", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_updated_by_user_id"], "alias": "source_not_null_logs__tamanu_changes_updated_by_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5564256, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_updated_by_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_by_user_id\nfrom \"central\".\"logs\".\"changes\"\nwhere updated_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_by_user_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_by_user_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_.7c9053d465": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_logs__tam_661a762c3da1c9a0b72c7de93aeb2e7a.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_.7c9053d465", "fqn": ["tamanu", "..", "database", "model", "logs", "source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_"], "alias": "source_relationships_logs__tam_661a762c3da1c9a0b72c7de93aeb2e7a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_logs__tam_661a762c3da1c9a0b72c7de93aeb2e7a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_logs__tam_661a762c3da1c9a0b72c7de93aeb2e7a"}, "created_at": 1775621420.558347, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_logs__tam_661a762c3da1c9a0b72c7de93aeb2e7a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_relationships_logs__tam_661a762c3da1c9a0b72c7de93aeb2e7a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select updated_by_user_id as from_field\n    from \"central\".\"logs\".\"changes\"\n    where updated_by_user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_by_user_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "updated_by_user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_device_id.e56e90ec9d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_device_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_device_id.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_device_id.e56e90ec9d", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_device_id"], "alias": "source_not_null_logs__tamanu_changes_device_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.566195, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_device_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect device_id\nfrom \"central\".\"logs\".\"changes\"\nwhere device_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "device_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_version.9d511c5658": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_version", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_version.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_version.9d511c5658", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_version"], "alias": "source_not_null_logs__tamanu_changes_version", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5682127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_version.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version\nfrom \"central\".\"logs\".\"changes\"\nwhere version is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_record_id.782318322c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_record_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_record_id.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_record_id.782318322c", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_record_id"], "alias": "source_not_null_logs__tamanu_changes_record_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5699542, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_record_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_id\nfrom \"central\".\"logs\".\"changes\"\nwhere record_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_record_created_at.d09f0598ea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_record_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_record_created_at.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_record_created_at.d09f0598ea", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_record_created_at"], "alias": "source_not_null_logs__tamanu_changes_record_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.571693, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_record_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_created_at\nfrom \"central\".\"logs\".\"changes\"\nwhere record_created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_created_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_created_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_record_updated_at.7ba7742260": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_record_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_record_updated_at.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_record_updated_at.7ba7742260", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_record_updated_at"], "alias": "source_not_null_logs__tamanu_changes_record_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5734131, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_record_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_updated_at\nfrom \"central\".\"logs\".\"changes\"\nwhere record_updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_updated_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_updated_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_record_data.83bbd4bbf6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_record_data", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_record_data.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_record_data.83bbd4bbf6", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_record_data"], "alias": "source_not_null_logs__tamanu_changes_record_data", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.575132, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_record_data.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_data\nfrom \"central\".\"logs\".\"changes\"\nwhere record_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_data", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_data", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_changes_updated_at_sync_tick.c1c5731de8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_changes_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_changes_updated_at_sync_tick.sql", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_changes_updated_at_sync_tick.c1c5731de8", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_changes_updated_at_sync_tick"], "alias": "source_not_null_logs__tamanu_changes_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5769863, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "changes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.changes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/changes.yml/source_not_null_logs__tamanu_changes_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"logs\".\"changes\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('logs__tamanu', 'changes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_logs__tamanu_dhis2_pushes_id.0da5ddfd43": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_logs__tamanu_dhis2_pushes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_logs__tamanu_dhis2_pushes_id.sql", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "test.tamanu.source_unique_logs__tamanu_dhis2_pushes_id.0da5ddfd43", "fqn": ["tamanu", "..", "database", "model", "logs", "source_unique_logs__tamanu_dhis2_pushes_id"], "alias": "source_unique_logs__tamanu_dhis2_pushes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5793972, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "dhis2_pushes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.dhis2_pushes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/dhis2_pushes.yml/source_unique_logs__tamanu_dhis2_pushes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"logs\".\"dhis2_pushes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'dhis2_pushes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_id.5b06029985": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_dhis2_pushes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_dhis2_pushes_id.sql", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_id.5b06029985", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_dhis2_pushes_id"], "alias": "source_not_null_logs__tamanu_dhis2_pushes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.581147, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "dhis2_pushes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.dhis2_pushes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/dhis2_pushes.yml/source_not_null_logs__tamanu_dhis2_pushes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"logs\".\"dhis2_pushes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'dhis2_pushes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_created_at.53c44d382b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_dhis2_pushes_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_dhis2_pushes_created_at.sql", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_created_at.53c44d382b", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_dhis2_pushes_created_at"], "alias": "source_not_null_logs__tamanu_dhis2_pushes_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5828643, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "dhis2_pushes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.dhis2_pushes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/dhis2_pushes.yml/source_not_null_logs__tamanu_dhis2_pushes_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"logs\".\"dhis2_pushes\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'dhis2_pushes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_report_id.5a861460f0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_dhis2_pushes_report_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_dhis2_pushes_report_id.sql", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_report_id.5a861460f0", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_dhis2_pushes_report_id"], "alias": "source_not_null_logs__tamanu_dhis2_pushes_report_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5847037, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "dhis2_pushes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.dhis2_pushes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/dhis2_pushes.yml/source_not_null_logs__tamanu_dhis2_pushes_report_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect report_id\nfrom \"central\".\"logs\".\"dhis2_pushes\"\nwhere report_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "report_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "report_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'dhis2_pushes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_status.b440e65629": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_dhis2_pushes_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_dhis2_pushes_status.sql", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_status.b440e65629", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_dhis2_pushes_status"], "alias": "source_not_null_logs__tamanu_dhis2_pushes_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.586427, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "dhis2_pushes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.dhis2_pushes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/dhis2_pushes.yml/source_not_null_logs__tamanu_dhis2_pushes_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"logs\".\"dhis2_pushes\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('logs__tamanu', 'dhis2_pushes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_updated_at.46346dc2f0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_dhis2_pushes_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_dhis2_pushes_updated_at.sql", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_updated_at.46346dc2f0", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_dhis2_pushes_updated_at"], "alias": "source_not_null_logs__tamanu_dhis2_pushes_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5881395, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "dhis2_pushes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.dhis2_pushes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/dhis2_pushes.yml/source_not_null_logs__tamanu_dhis2_pushes_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"logs\".\"dhis2_pushes\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'dhis2_pushes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_logs__tamanu_debug_logs_id.a03e8469cd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_logs__tamanu_debug_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_logs__tamanu_debug_logs_id.sql", "original_file_path": "../../database/model/logs/debug_logs.yml", "unique_id": "test.tamanu.source_unique_logs__tamanu_debug_logs_id.a03e8469cd", "fqn": ["tamanu", "..", "database", "model", "logs", "source_unique_logs__tamanu_debug_logs_id"], "alias": "source_unique_logs__tamanu_debug_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5904286, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "debug_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.debug_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/debug_logs.yml/source_unique_logs__tamanu_debug_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"logs\".\"debug_logs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'debug_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_debug_logs_id.2cd56785d4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_debug_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_debug_logs_id.sql", "original_file_path": "../../database/model/logs/debug_logs.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_debug_logs_id.2cd56785d4", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_debug_logs_id"], "alias": "source_not_null_logs__tamanu_debug_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.5921702, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "debug_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.debug_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/debug_logs.yml/source_not_null_logs__tamanu_debug_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"logs\".\"debug_logs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'debug_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_debug_logs_type.78622a3567": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_debug_logs_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_debug_logs_type.sql", "original_file_path": "../../database/model/logs/debug_logs.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_debug_logs_type.78622a3567", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_debug_logs_type"], "alias": "source_not_null_logs__tamanu_debug_logs_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.594002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "debug_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.debug_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/debug_logs.yml/source_not_null_logs__tamanu_debug_logs_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"logs\".\"debug_logs\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('logs__tamanu', 'debug_logs')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate.827ca373d0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_logs__t_a6089bed013dc2009483697663c0eadf.sql", "original_file_path": "../../database/model/logs/debug_logs.yml", "unique_id": "test.tamanu.source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate.827ca373d0", "fqn": ["tamanu", "..", "database", "model", "logs", "source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate"], "alias": "source_accepted_values_logs__t_a6089bed013dc2009483697663c0eadf", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_logs__t_a6089bed013dc2009483697663c0eadf", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_logs__t_a6089bed013dc2009483697663c0eadf"}, "created_at": 1775621420.5957189, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_logs__t_a6089bed013dc2009483697663c0eadf\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "debug_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.debug_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/debug_logs.yml/source_accepted_values_logs__t_a6089bed013dc2009483697663c0eadf.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"logs\".\"debug_logs\"\n    group by type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'syncLookupUpdate'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "type", "values": ["syncLookupUpdate"], "model": "{{ get_where_subquery(source('logs__tamanu', 'debug_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_debug_logs_info.5cb0ccb1a0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_debug_logs_info", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_debug_logs_info.sql", "original_file_path": "../../database/model/logs/debug_logs.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_debug_logs_info.5cb0ccb1a0", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_debug_logs_info"], "alias": "source_not_null_logs__tamanu_debug_logs_info", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6009493, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "debug_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.debug_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/debug_logs.yml/source_not_null_logs__tamanu_debug_logs_info.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect info\nfrom \"central\".\"logs\".\"debug_logs\"\nwhere info is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "info", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "info", "model": "{{ get_where_subquery(source('logs__tamanu', 'debug_logs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_logs__tamanu_accesses_id.58775d956a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_logs__tamanu_accesses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_logs__tamanu_accesses_id.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_unique_logs__tamanu_accesses_id.58775d956a", "fqn": ["tamanu", "..", "database", "model", "logs", "source_unique_logs__tamanu_accesses_id"], "alias": "source_unique_logs__tamanu_accesses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6032271, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_unique_logs__tamanu_accesses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"logs\".\"accesses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_id.47650015e9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_id.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_id.47650015e9", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_id"], "alias": "source_not_null_logs__tamanu_accesses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6049771, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"logs\".\"accesses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_created_at.c559af59c4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_created_at.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_created_at.c559af59c4", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_created_at"], "alias": "source_not_null_logs__tamanu_accesses_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6067226, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"logs\".\"accesses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at.d68343154e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_updated_at.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at.d68343154e", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_updated_at"], "alias": "source_not_null_logs__tamanu_accesses_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.608441, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"logs\".\"accesses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_user_id.4731fc507d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_user_id.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_user_id.4731fc507d", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_user_id"], "alias": "source_not_null_logs__tamanu_accesses_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.610288, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"logs\".\"accesses\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_record_id.c49d0f4d84": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_record_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_record_id.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_record_id.c49d0f4d84", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_record_id"], "alias": "source_not_null_logs__tamanu_accesses_record_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6119976, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_record_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_id\nfrom \"central\".\"logs\".\"accesses\"\nwhere record_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_record_type.b59437e552": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_record_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_record_type.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_record_type.b59437e552", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_record_type"], "alias": "source_not_null_logs__tamanu_accesses_record_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6136873, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_record_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_type\nfrom \"central\".\"logs\".\"accesses\"\nwhere record_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_type", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_type", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_session_id.3968767d39": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_session_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_session_id.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_session_id.3968767d39", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_session_id"], "alias": "source_not_null_logs__tamanu_accesses_session_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6153927, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_session_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect session_id\nfrom \"central\".\"logs\".\"accesses\"\nwhere session_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "session_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "session_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_device_id.277d95b364": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_device_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_device_id.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_device_id.277d95b364", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_device_id"], "alias": "source_not_null_logs__tamanu_accesses_device_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6171193, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_device_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect device_id\nfrom \"central\".\"logs\".\"accesses\"\nwhere device_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "device_id", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_logged_at.aee8df31c7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_logged_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_logged_at.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_logged_at.aee8df31c7", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_logged_at"], "alias": "source_not_null_logs__tamanu_accesses_logged_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6189833, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_logged_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect logged_at\nfrom \"central\".\"logs\".\"accesses\"\nwhere logged_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "logged_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "logged_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_front_end_context.aeef6880f0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_front_end_context", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_front_end_context.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_front_end_context.aeef6880f0", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_front_end_context"], "alias": "source_not_null_logs__tamanu_accesses_front_end_context", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6207066, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_front_end_context.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect front_end_context\nfrom \"central\".\"logs\".\"accesses\"\nwhere front_end_context is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "front_end_context", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "front_end_context", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_back_end_context.c461ef5b10": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_back_end_context", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_back_end_context.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_back_end_context.c461ef5b10", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_back_end_context"], "alias": "source_not_null_logs__tamanu_accesses_back_end_context", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6224265, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_back_end_context.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect back_end_context\nfrom \"central\".\"logs\".\"accesses\"\nwhere back_end_context is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "back_end_context", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "back_end_context", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_is_mobile.87cbc52937": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_is_mobile", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_is_mobile.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_is_mobile.87cbc52937", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_is_mobile"], "alias": "source_not_null_logs__tamanu_accesses_is_mobile", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6241403, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_is_mobile.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_mobile\nfrom \"central\".\"logs\".\"accesses\"\nwhere is_mobile is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_mobile", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_mobile", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_version.92cc727c2e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_version", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_version.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_version.92cc727c2e", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_version"], "alias": "source_not_null_logs__tamanu_accesses_version", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6258585, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_version.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version\nfrom \"central\".\"logs\".\"accesses\"\nwhere version is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at_sync_tick.82731184f9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_accesses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_accesses_updated_at_sync_tick.sql", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at_sync_tick.82731184f9", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_accesses_updated_at_sync_tick"], "alias": "source_not_null_logs__tamanu_accesses_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6276712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "accesses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.accesses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/accesses.yml/source_not_null_logs__tamanu_accesses_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"logs\".\"accesses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('logs__tamanu', 'accesses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_logs__tamanu_fhir_writes_id.8353be29e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_logs__tamanu_fhir_writes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_logs__tamanu_fhir_writes_id.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_unique_logs__tamanu_fhir_writes_id.8353be29e8", "fqn": ["tamanu", "..", "database", "model", "logs", "source_unique_logs__tamanu_fhir_writes_id"], "alias": "source_unique_logs__tamanu_fhir_writes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.630031, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_unique_logs__tamanu_fhir_writes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_fhir_writes_id.82c7762d53": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_fhir_writes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_fhir_writes_id.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_fhir_writes_id.82c7762d53", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_fhir_writes_id"], "alias": "source_not_null_logs__tamanu_fhir_writes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6317859, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_not_null_logs__tamanu_fhir_writes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_fhir_writes_created_at.6a5dde6c84": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_fhir_writes_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_fhir_writes_created_at.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_fhir_writes_created_at.6a5dde6c84", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_fhir_writes_created_at"], "alias": "source_not_null_logs__tamanu_fhir_writes_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.633472, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_not_null_logs__tamanu_fhir_writes_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_fhir_writes_verb.2b0319d883": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_fhir_writes_verb", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_fhir_writes_verb.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_fhir_writes_verb.2b0319d883", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_fhir_writes_verb"], "alias": "source_not_null_logs__tamanu_fhir_writes_verb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6351712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_not_null_logs__tamanu_fhir_writes_verb.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect verb\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere verb is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "verb", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "verb", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_fhir_writes_url.1acf607faf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_fhir_writes_url", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_fhir_writes_url.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_fhir_writes_url.1acf607faf", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_fhir_writes_url"], "alias": "source_not_null_logs__tamanu_fhir_writes_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.637006, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_not_null_logs__tamanu_fhir_writes_url.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect url\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "url", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "url", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_fhir_writes_body.face3433a2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_fhir_writes_body", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_fhir_writes_body.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_fhir_writes_body.face3433a2", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_fhir_writes_body"], "alias": "source_not_null_logs__tamanu_fhir_writes_body", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.638695, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_not_null_logs__tamanu_fhir_writes_body.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect body\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere body is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "body", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "body", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_logs__tamanu_fhir_writes_headers.d9c7e90be8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_logs__tamanu_fhir_writes_headers", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_logs__tamanu_fhir_writes_headers.sql", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "test.tamanu.source_not_null_logs__tamanu_fhir_writes_headers.d9c7e90be8", "fqn": ["tamanu", "..", "database", "model", "logs", "source_not_null_logs__tamanu_fhir_writes_headers"], "alias": "source_not_null_logs__tamanu_fhir_writes_headers", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6403937, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["logs__tamanu", "fhir_writes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.logs__tamanu.fhir_writes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/logs/fhir_writes.yml/source_not_null_logs__tamanu_fhir_writes_headers.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect headers\nfrom \"central\".\"logs\".\"fhir_writes\"\nwhere headers is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "headers", "file_key_name": "sources.logs__tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "headers", "model": "{{ get_where_subquery(source('logs__tamanu', 'fhir_writes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_allergies_id.898e40bfbb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_allergies_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_allergies_id.sql", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_allergies_id.898e40bfbb", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_allergies_id"], "alias": "source_unique_tamanu_patient_allergies_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6427124, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_allergies"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_allergies"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_allergies.yml/source_unique_tamanu_patient_allergies_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_allergies\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_allergies')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_allergies_id.f1126d18a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_allergies_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_allergies_id.sql", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_allergies_id.f1126d18a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_allergies_id"], "alias": "source_not_null_tamanu_patient_allergies_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6450636, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_allergies"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_allergies"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_allergies.yml/source_not_null_tamanu_patient_allergies_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_allergies\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_allergies')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_allergies_created_at.59905c68e2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_allergies_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_allergies_created_at.sql", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_allergies_created_at.59905c68e2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_allergies_created_at"], "alias": "source_not_null_tamanu_patient_allergies_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6468186, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_allergies"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_allergies"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_allergies.yml/source_not_null_tamanu_patient_allergies_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_allergies\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_allergies')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at.048547273e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_allergies_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_allergies_updated_at.sql", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at.048547273e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_allergies_updated_at"], "alias": "source_not_null_tamanu_patient_allergies_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6485403, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_allergies"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_allergies"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_allergies.yml/source_not_null_tamanu_patient_allergies_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_allergies\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_allergies')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_allergies_recorded_date.de31b171cd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_allergies_recorded_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_allergies_recorded_date.sql", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_allergies_recorded_date.de31b171cd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_allergies_recorded_date"], "alias": "source_not_null_tamanu_patient_allergies_recorded_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.65027, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_allergies"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_allergies"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_allergies.yml/source_not_null_tamanu_patient_allergies_recorded_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect recorded_date\nfrom \"central\".\"public\".\"patient_allergies\"\nwhere recorded_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recorded_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "recorded_date", "model": "{{ get_where_subquery(source('tamanu', 'patient_allergies')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at_sync_tick.14fb342ab8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_allergies_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_allergies_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at_sync_tick.14fb342ab8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_allergies_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_allergies_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6519878, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_allergies"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_allergies"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_allergies.yml/source_not_null_tamanu_patient_allergies_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_allergies\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_allergies')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_triages_id.86b3cfdd35": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_triages_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_triages_id.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_unique_tamanu_triages_id.86b3cfdd35", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_triages_id"], "alias": "source_unique_tamanu_triages_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6543672, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_unique_tamanu_triages_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"triages\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_triages_id.8276269bfd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_triages_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_triages_id.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_triages_id.8276269bfd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_triages_id"], "alias": "source_not_null_tamanu_triages_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.656109, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_not_null_tamanu_triages_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"triages\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_triages_created_at.9d4e7381d6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_triages_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_triages_created_at.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_triages_created_at.9d4e7381d6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_triages_created_at"], "alias": "source_not_null_tamanu_triages_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6578398, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_not_null_tamanu_triages_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"triages\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_triages_updated_at.3cd54f2d9b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_triages_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_triages_updated_at.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_triages_updated_at.3cd54f2d9b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_triages_updated_at"], "alias": "source_not_null_tamanu_triages_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.659693, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_not_null_tamanu_triages_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"triages\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_.3903adeec0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_tr_d4f8a89b29ce7ab15207638339c985f2.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_.3903adeec0", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_tr_d4f8a89b29ce7ab15207638339c985f2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_tr_d4f8a89b29ce7ab15207638339c985f2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_tr_d4f8a89b29ce7ab15207638339c985f2"}, "created_at": 1775621420.6614676, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_tr_d4f8a89b29ce7ab15207638339c985f2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_relationships_tamanu_tr_d4f8a89b29ce7ab15207638339c985f2.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"triages\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_.9341ff1138": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_tr_5d680b56abdb98eb519629e224abc16c.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_.9341ff1138", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_tr_5d680b56abdb98eb519629e224abc16c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_tr_5d680b56abdb98eb519629e224abc16c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_tr_5d680b56abdb98eb519629e224abc16c"}, "created_at": 1775621420.6669886, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_tr_5d680b56abdb98eb519629e224abc16c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_relationships_tamanu_tr_5d680b56abdb98eb519629e224abc16c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select practitioner_id as from_field\n    from \"central\".\"public\".\"triages\"\n    where practitioner_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "practitioner_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "practitioner_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_.3203451a40": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_278ee1dc4ae6a66423b03d53f829725e.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_.3203451a40", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_"], "alias": "dbt_utils_source_relationships_278ee1dc4ae6a66423b03d53f829725e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_278ee1dc4ae6a66423b03d53f829725e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_278ee1dc4ae6a66423b03d53f829725e"}, "created_at": 1775621420.6722505, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_278ee1dc4ae6a66423b03d53f829725e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/dbt_utils_source_relationships_278ee1dc4ae6a66423b03d53f829725e.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    chief_complaint_id as id\n\n  from \"central\".\"public\".\"triages\"\n\n  where chief_complaint_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'triageReason'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "chief_complaint_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "chief_complaint_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'triageReason'", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_.8c9e664e44": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_851a099daef9562b55902648307bd9c9.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_.8c9e664e44", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_"], "alias": "dbt_utils_source_relationships_851a099daef9562b55902648307bd9c9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_851a099daef9562b55902648307bd9c9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_851a099daef9562b55902648307bd9c9"}, "created_at": 1775621420.6808271, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_851a099daef9562b55902648307bd9c9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/dbt_utils_source_relationships_851a099daef9562b55902648307bd9c9.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    secondary_complaint_id as id\n\n  from \"central\".\"public\".\"triages\"\n\n  where secondary_complaint_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'triageReason'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "secondary_complaint_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "secondary_complaint_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'triageReason'", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_.26a3871e3a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_dfe40a15b3657684b208d652fc8a09ea.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_.26a3871e3a", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_"], "alias": "dbt_utils_source_relationships_dfe40a15b3657684b208d652fc8a09ea", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_dfe40a15b3657684b208d652fc8a09ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_dfe40a15b3657684b208d652fc8a09ea"}, "created_at": 1775621420.6859055, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_dfe40a15b3657684b208d652fc8a09ea\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/dbt_utils_source_relationships_dfe40a15b3657684b208d652fc8a09ea.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    arrival_mode_id as id\n\n  from \"central\".\"public\".\"triages\"\n\n  where arrival_mode_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'arrivalMode'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "arrival_mode_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "arrival_mode_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'arrivalMode'", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_triages_updated_at_sync_tick.38a343c27f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_triages_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_triages_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_triages_updated_at_sync_tick.38a343c27f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_triages_updated_at_sync_tick"], "alias": "source_not_null_tamanu_triages_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6913888, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "triages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.triages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/triages.yml/source_not_null_tamanu_triages_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"triages\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'triages')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_imaging_area_external_codes_id.ac26885b2b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_imaging_area_external_codes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_imaging_area_external_codes_id.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_unique_tamanu_imaging_area_external_codes_id.ac26885b2b", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_imaging_area_external_codes_id"], "alias": "source_unique_tamanu_imaging_area_external_codes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6938374, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_unique_tamanu_imaging_area_external_codes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_id.fe52d7eda4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_area_external_codes_id.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_id.fe52d7eda4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_id"], "alias": "source_not_null_tamanu_imaging_area_external_codes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.695776, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_area_external_codes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_created_at.5a8be2828e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_area_external_codes_created_at.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_created_at.5a8be2828e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_created_at"], "alias": "source_not_null_tamanu_imaging_area_external_codes_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6974623, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_area_external_codes_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at.fde1da72e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_area_external_codes_updated_at.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at.fde1da72e8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_updated_at"], "alias": "source_not_null_tamanu_imaging_area_external_codes_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.6992047, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_area_external_codes_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_visibility_status.83963919d0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_2c80c936835ef2b87ae341b8ce337f65.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_visibility_status.83963919d0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_visibility_status"], "alias": "source_not_null_tamanu_imaging_2c80c936835ef2b87ae341b8ce337f65", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_imaging_2c80c936835ef2b87ae341b8ce337f65", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_imaging_2c80c936835ef2b87ae341b8ce337f65"}, "created_at": 1775621420.700936, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_imaging_2c80c936835ef2b87ae341b8ce337f65\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_2c80c936835ef2b87ae341b8ce337f65.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_imaging_area_external_codes_area_id.050349fa98": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_imaging_area_external_codes_area_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_imaging_area_external_codes_area_id.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_unique_tamanu_imaging_area_external_codes_area_id.050349fa98", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_imaging_area_external_codes_area_id"], "alias": "source_unique_tamanu_imaging_area_external_codes_area_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7026587, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_unique_tamanu_imaging_area_external_codes_area_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    area_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere area_id is not null\ngroup by area_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "area_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "area_id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_area_id.b59576cea8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_area_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_area_external_codes_area_id.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_area_id.b59576cea8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_area_id"], "alias": "source_not_null_tamanu_imaging_area_external_codes_area_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7044733, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_area_external_codes_area_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect area_id\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere area_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "area_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "area_id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_.32280d3e7c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_8f9ba5858d5ba292092dc613bafcdc4a.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_.32280d3e7c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_"], "alias": "source_relationships_tamanu_im_8f9ba5858d5ba292092dc613bafcdc4a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_8f9ba5858d5ba292092dc613bafcdc4a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_8f9ba5858d5ba292092dc613bafcdc4a"}, "created_at": 1775621420.706214, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_8f9ba5858d5ba292092dc613bafcdc4a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_relationships_tamanu_im_8f9ba5858d5ba292092dc613bafcdc4a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select area_id as from_field\n    from \"central\".\"public\".\"imaging_area_external_codes\"\n    where area_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"reference_data\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "area_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "area_id", "to": "source('tamanu', 'reference_data')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_code.af72562338": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_area_external_codes_code.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_code.af72562338", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_code"], "alias": "source_not_null_tamanu_imaging_area_external_codes_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.711489, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_area_external_codes_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick.1bfbc765fb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_093823420e8e7b4e6fc17405c6e01eab.sql", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick.1bfbc765fb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick"], "alias": "source_not_null_tamanu_imaging_093823420e8e7b4e6fc17405c6e01eab", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_imaging_093823420e8e7b4e6fc17405c6e01eab", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_imaging_093823420e8e7b4e6fc17405c6e01eab"}, "created_at": 1775621420.713281, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_imaging_093823420e8e7b4e6fc17405c6e01eab\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_area_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_area_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_area_external_codes.yml/source_not_null_tamanu_imaging_093823420e8e7b4e6fc17405c6e01eab.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"imaging_area_external_codes\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'imaging_area_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_socket_io_attachments_id.919f1a7156": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_socket_io_attachments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_socket_io_attachments_id.sql", "original_file_path": "../../database/model/public/socket_io_attachments.yml", "unique_id": "test.tamanu.source_unique_tamanu_socket_io_attachments_id.919f1a7156", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_socket_io_attachments_id"], "alias": "source_unique_tamanu_socket_io_attachments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7155445, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "socket_io_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.socket_io_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/socket_io_attachments.yml/source_unique_tamanu_socket_io_attachments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"socket_io_attachments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'socket_io_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_socket_io_attachments_id.acd275c6dc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_socket_io_attachments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_socket_io_attachments_id.sql", "original_file_path": "../../database/model/public/socket_io_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_socket_io_attachments_id.acd275c6dc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_socket_io_attachments_id"], "alias": "source_not_null_tamanu_socket_io_attachments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.717251, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "socket_io_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.socket_io_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/socket_io_attachments.yml/source_not_null_tamanu_socket_io_attachments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"socket_io_attachments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'socket_io_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick.8169c97d48": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_socket__a4f1d603af05f714ad5168498e4b89c9.sql", "original_file_path": "../../database/model/public/socket_io_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick.8169c97d48", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_socket__a4f1d603af05f714ad5168498e4b89c9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_socket__a4f1d603af05f714ad5168498e4b89c9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_socket__a4f1d603af05f714ad5168498e4b89c9"}, "created_at": 1775621420.719224, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_socket__a4f1d603af05f714ad5168498e4b89c9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "socket_io_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.socket_io_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/socket_io_attachments.yml/source_not_null_tamanu_socket__a4f1d603af05f714ad5168498e4b89c9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"socket_io_attachments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'socket_io_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_report_definitions_id.26898ce7eb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_report_definitions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_report_definitions_id.sql", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "test.tamanu.source_unique_tamanu_report_definitions_id.26898ce7eb", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_report_definitions_id"], "alias": "source_unique_tamanu_report_definitions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7215872, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definitions.yml/source_unique_tamanu_report_definitions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"report_definitions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definitions_id.b8bb2a951d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definitions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definitions_id.sql", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definitions_id.b8bb2a951d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definitions_id"], "alias": "source_not_null_tamanu_report_definitions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7233133, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definitions.yml/source_not_null_tamanu_report_definitions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"report_definitions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_report_definitions_name.2f942767b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_report_definitions_name", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_report_definitions_name.sql", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "test.tamanu.source_unique_tamanu_report_definitions_name.2f942767b6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_report_definitions_name"], "alias": "source_unique_tamanu_report_definitions_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7250292, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definitions.yml/source_unique_tamanu_report_definitions_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    name as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"report_definitions\"\nwhere name is not null\ngroup by name\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'report_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definitions_name.a630c1f799": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definitions_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definitions_name.sql", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definitions_name.a630c1f799", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definitions_name"], "alias": "source_not_null_tamanu_report_definitions_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7267354, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definitions.yml/source_not_null_tamanu_report_definitions_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"report_definitions\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'report_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definitions_updated_at_sync_tick.3d8f13be51": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definitions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definitions_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definitions_updated_at_sync_tick.3d8f13be51", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definitions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_report_definitions_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.728437, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definitions.yml/source_not_null_tamanu_report_definitions_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"report_definitions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'report_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definitions_db_schema.f939e6dfa3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definitions_db_schema", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definitions_db_schema.sql", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definitions_db_schema.f939e6dfa3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definitions_db_schema"], "alias": "source_not_null_tamanu_report_definitions_db_schema", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7302628, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definitions.yml/source_not_null_tamanu_report_definitions_db_schema.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect db_schema\nfrom \"central\".\"public\".\"report_definitions\"\nwhere db_schema is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "db_schema", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "db_schema", "model": "{{ get_where_subquery(source('tamanu', 'report_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_one_time_logins_id.b1d11d6c3f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_one_time_logins_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_one_time_logins_id.sql", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "test.tamanu.source_unique_tamanu_one_time_logins_id.b1d11d6c3f", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_one_time_logins_id"], "alias": "source_unique_tamanu_one_time_logins_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7325084, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "one_time_logins"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.one_time_logins"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/one_time_logins.yml/source_unique_tamanu_one_time_logins_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"one_time_logins\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'one_time_logins')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_one_time_logins_id.6318f1fc0d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_one_time_logins_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_one_time_logins_id.sql", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "test.tamanu.source_not_null_tamanu_one_time_logins_id.6318f1fc0d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_one_time_logins_id"], "alias": "source_not_null_tamanu_one_time_logins_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7342448, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "one_time_logins"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.one_time_logins"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/one_time_logins.yml/source_not_null_tamanu_one_time_logins_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"one_time_logins\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'one_time_logins')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_one_time_logins_user_id.ebe1f826af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_one_time_logins_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_one_time_logins_user_id.sql", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "test.tamanu.source_not_null_tamanu_one_time_logins_user_id.ebe1f826af", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_one_time_logins_user_id"], "alias": "source_not_null_tamanu_one_time_logins_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7359407, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "one_time_logins"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.one_time_logins"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/one_time_logins.yml/source_not_null_tamanu_one_time_logins_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"one_time_logins\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'one_time_logins')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_.93741528ac": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_on_f8aa3385c0789f9fb0c838d1ca0c0eb2.sql", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "test.tamanu.source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_.93741528ac", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_on_f8aa3385c0789f9fb0c838d1ca0c0eb2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_on_f8aa3385c0789f9fb0c838d1ca0c0eb2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_on_f8aa3385c0789f9fb0c838d1ca0c0eb2"}, "created_at": 1775621420.737824, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_on_f8aa3385c0789f9fb0c838d1ca0c0eb2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "one_time_logins"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.one_time_logins"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/one_time_logins.yml/source_relationships_tamanu_on_f8aa3385c0789f9fb0c838d1ca0c0eb2.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select user_id as from_field\n    from \"central\".\"public\".\"one_time_logins\"\n    where user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'one_time_logins')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_one_time_logins_token.6b7dbabb08": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_one_time_logins_token", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_one_time_logins_token.sql", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "test.tamanu.source_not_null_tamanu_one_time_logins_token.6b7dbabb08", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_one_time_logins_token"], "alias": "source_not_null_tamanu_one_time_logins_token", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7430441, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "one_time_logins"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.one_time_logins"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/one_time_logins.yml/source_not_null_tamanu_one_time_logins_token.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect token\nfrom \"central\".\"public\".\"one_time_logins\"\nwhere token is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "token", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "token", "model": "{{ get_where_subquery(source('tamanu', 'one_time_logins')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_one_time_logins_expires_at.0051cd2e03": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_one_time_logins_expires_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_one_time_logins_expires_at.sql", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "test.tamanu.source_not_null_tamanu_one_time_logins_expires_at.0051cd2e03", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_one_time_logins_expires_at"], "alias": "source_not_null_tamanu_one_time_logins_expires_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7447977, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "one_time_logins"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.one_time_logins"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/one_time_logins.yml/source_not_null_tamanu_one_time_logins_expires_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect expires_at\nfrom \"central\".\"public\".\"one_time_logins\"\nwhere expires_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "expires_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "expires_at", "model": "{{ get_where_subquery(source('tamanu', 'one_time_logins')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_price_lists_id.92912c617f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_price_lists_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_price_lists_id.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_price_lists_id.92912c617f", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_price_lists_id"], "alias": "source_unique_tamanu_invoice_price_lists_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.747832, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_unique_tamanu_invoice_price_lists_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_lists_id.dc8853229e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_lists_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_lists_id.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_lists_id.dc8853229e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_lists_id"], "alias": "source_not_null_tamanu_invoice_price_lists_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7495832, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_not_null_tamanu_invoice_price_lists_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_lists_created_at.84fe51b659": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_lists_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_lists_created_at.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_lists_created_at.84fe51b659", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_lists_created_at"], "alias": "source_not_null_tamanu_invoice_price_lists_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.751287, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_not_null_tamanu_invoice_price_lists_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at.75781a813a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_lists_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_lists_updated_at.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at.75781a813a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_lists_updated_at"], "alias": "source_not_null_tamanu_invoice_price_lists_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7530158, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_not_null_tamanu_invoice_price_lists_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.ff56fc27cb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.ff56fc27cb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7547266, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_lists_code.741a3b08ab": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_lists_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_lists_code.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_lists_code.741a3b08ab", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_lists_code"], "alias": "source_not_null_tamanu_invoice_price_lists_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7565243, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_not_null_tamanu_invoice_price_lists_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_lists_visibility_status.a2ae9351b7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_lists_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_lists_visibility_status.sql", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_lists_visibility_status.a2ae9351b7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_lists_visibility_status"], "alias": "source_not_null_tamanu_invoice_price_lists_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7582219, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_lists"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_lists"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_lists.yml/source_not_null_tamanu_invoice_price_lists_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"invoice_price_lists\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_lists')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_contacts_id.3c41111688": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_contacts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_contacts_id.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_contacts_id.3c41111688", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_contacts_id"], "alias": "source_unique_tamanu_patient_contacts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7605288, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_unique_tamanu_patient_contacts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_id.9e63606ba7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_id.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_id.9e63606ba7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_id"], "alias": "source_not_null_tamanu_patient_contacts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.762271, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_created_at.29d447b596": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_created_at.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_created_at.29d447b596", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_created_at"], "alias": "source_not_null_tamanu_patient_contacts_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7641068, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at.e81c827845": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_updated_at.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at.e81c827845", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_updated_at"], "alias": "source_not_null_tamanu_patient_contacts_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.765835, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_name.2a5f2c99f9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_name.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_name.2a5f2c99f9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_name"], "alias": "source_not_null_tamanu_patient_contacts_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7675328, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_method.37c9585829": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_method", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_method.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_method.37c9585829", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_method"], "alias": "source_not_null_tamanu_patient_contacts_method", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.769234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_method.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect method\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere method is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "method", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "method", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram.8c6857119c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__3337f38cefaf418fde78cd55d60f3516.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram.8c6857119c", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram"], "alias": "source_accepted_values_tamanu__3337f38cefaf418fde78cd55d60f3516", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__3337f38cefaf418fde78cd55d60f3516", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__3337f38cefaf418fde78cd55d60f3516"}, "created_at": 1775621420.7709732, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__3337f38cefaf418fde78cd55d60f3516\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_accepted_values_tamanu__3337f38cefaf418fde78cd55d60f3516.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        method as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_contacts\"\n    group by method\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Email','Sms','WhatsApp','Telegram'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "method", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "method", "values": ["Email", "Sms", "WhatsApp", "Telegram"], "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_patient_id.58de0a1f28": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_patient_id.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_patient_id.58de0a1f28", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_patient_id"], "alias": "source_not_null_tamanu_patient_contacts_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.777048, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_.606993d615": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_79a4e729edd5633efa02e869cd4e6735.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_.606993d615", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_79a4e729edd5633efa02e869cd4e6735", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_79a4e729edd5633efa02e869cd4e6735", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_79a4e729edd5633efa02e869cd4e6735"}, "created_at": 1775621420.7788322, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_79a4e729edd5633efa02e869cd4e6735\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_relationships_tamanu_pa_79a4e729edd5633efa02e869cd4e6735.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_contacts\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_contacts_relationship_id.20abe6c3b2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_relationship_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_relationship_id.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_relationship_id.20abe6c3b2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_relationship_id"], "alias": "source_not_null_tamanu_patient_contacts_relationship_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.783991, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_relationship_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect relationship_id\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere relationship_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "relationship_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "relationship_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_.98d8247d27": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_f66de343c00c540b973d5747882b48c6.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_.98d8247d27", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_"], "alias": "dbt_utils_source_relationships_f66de343c00c540b973d5747882b48c6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_f66de343c00c540b973d5747882b48c6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_f66de343c00c540b973d5747882b48c6"}, "created_at": 1775621420.7857957, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_f66de343c00c540b973d5747882b48c6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/dbt_utils_source_relationships_f66de343c00c540b973d5747882b48c6.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    relationship_id as id\n\n  from \"central\".\"public\".\"patient_contacts\"\n\n  where relationship_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'contactRelationship'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "relationship_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "relationship_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'contactRelationship'", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at_sync_tick.3d648b4683": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_contacts_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_contacts_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at_sync_tick.3d648b4683", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_contacts_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_contacts_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7913353, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_contacts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_contacts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_contacts.yml/source_not_null_tamanu_patient_contacts_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_contacts\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_contacts')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_certificate_notifications_id.71e705665b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_certificate_notifications_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_certificate_notifications_id.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_unique_tamanu_certificate_notifications_id.71e705665b", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_certificate_notifications_id"], "alias": "source_unique_tamanu_certificate_notifications_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7936945, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_unique_tamanu_certificate_notifications_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"certificate_notifications\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certificate_notifications_id.7757b0046d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certificate_notifications_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certificate_notifications_id.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certificate_notifications_id.7757b0046d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certificate_notifications_id"], "alias": "source_not_null_tamanu_certificate_notifications_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7954051, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_not_null_tamanu_certificate_notifications_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"certificate_notifications\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certificate_notifications_type.a7491c4721": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certificate_notifications_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certificate_notifications_type.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certificate_notifications_type.a7491c4721", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certificate_notifications_type"], "alias": "source_not_null_tamanu_certificate_notifications_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.7972763, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_not_null_tamanu_certificate_notifications_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"certificate_notifications\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc.ca722e42a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__1910f6b17643ddcd64235ac94f4f11e8.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc.ca722e42a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc"], "alias": "source_accepted_values_tamanu__1910f6b17643ddcd64235ac94f4f11e8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__1910f6b17643ddcd64235ac94f4f11e8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__1910f6b17643ddcd64235ac94f4f11e8"}, "created_at": 1775621420.7990322, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__1910f6b17643ddcd64235ac94f4f11e8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_accepted_values_tamanu__1910f6b17643ddcd64235ac94f4f11e8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"certificate_notifications\"\n    group by type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'covid_19_clearance','vaccination_certificate','icao.test','icao.vacc'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "type", "values": ["covid_19_clearance", "vaccination_certificate", "icao.test", "icao.vacc"], "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_.445dca3a7a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ce_824713c8e33f184ec25af7ac6ebee94b.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_.445dca3a7a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_ce_824713c8e33f184ec25af7ac6ebee94b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ce_824713c8e33f184ec25af7ac6ebee94b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ce_824713c8e33f184ec25af7ac6ebee94b"}, "created_at": 1775621420.8048584, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ce_824713c8e33f184ec25af7ac6ebee94b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_relationships_tamanu_ce_824713c8e33f184ec25af7ac6ebee94b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"certificate_notifications\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_.7bacb605d5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ce_dfc1ba9c1b82fadbe1b635468aed77af.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_.7bacb605d5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_"], "alias": "source_relationships_tamanu_ce_dfc1ba9c1b82fadbe1b635468aed77af", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ce_dfc1ba9c1b82fadbe1b635468aed77af", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ce_dfc1ba9c1b82fadbe1b635468aed77af"}, "created_at": 1775621420.8097923, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ce_dfc1ba9c1b82fadbe1b635468aed77af\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"], ["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests", "source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_relationships_tamanu_ce_dfc1ba9c1b82fadbe1b635468aed77af.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_test_id as from_field\n    from \"central\".\"public\".\"certificate_notifications\"\n    where lab_test_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_tests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_test_id", "to": "source('tamanu', 'lab_tests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certificate_notifications_status.561750c1e5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certificate_notifications_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certificate_notifications_status.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certificate_notifications_status.561750c1e5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certificate_notifications_status"], "alias": "source_not_null_tamanu_certificate_notifications_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8148828, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_not_null_tamanu_certificate_notifications_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"certificate_notifications\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore.3450abc93a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__8c94030779fe9afff0d475e06b61a9c4.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore.3450abc93a", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore"], "alias": "source_accepted_values_tamanu__8c94030779fe9afff0d475e06b61a9c4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__8c94030779fe9afff0d475e06b61a9c4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__8c94030779fe9afff0d475e06b61a9c4"}, "created_at": 1775621420.8166633, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__8c94030779fe9afff0d475e06b61a9c4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_accepted_values_tamanu__8c94030779fe9afff0d475e06b61a9c4.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"certificate_notifications\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Queued','Processed','Error','Ignore'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["Queued", "Processed", "Error", "Ignore"], "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_.3cf536fdbe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ce_87cffd1d01ff6a56948080ca13e27961.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_.3cf536fdbe", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_"], "alias": "source_relationships_tamanu_ce_87cffd1d01ff6a56948080ca13e27961", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ce_87cffd1d01ff6a56948080ca13e27961", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ce_87cffd1d01ff6a56948080ca13e27961"}, "created_at": 1775621420.8221953, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ce_87cffd1d01ff6a56948080ca13e27961\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"], ["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_relationships_tamanu_ce_87cffd1d01ff6a56948080ca13e27961.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_request_id as from_field\n    from \"central\".\"public\".\"certificate_notifications\"\n    where lab_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_request_id", "to": "source('tamanu', 'lab_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certificate_notifications_updated_at_sync_tick.7cb5b88cb7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certificate_notifications_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifi_6e82400cb3082e91a13c6d38ca58a8e4.sql", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certificate_notifications_updated_at_sync_tick.7cb5b88cb7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certificate_notifications_updated_at_sync_tick"], "alias": "source_not_null_tamanu_certifi_6e82400cb3082e91a13c6d38ca58a8e4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_certifi_6e82400cb3082e91a13c6d38ca58a8e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_certifi_6e82400cb3082e91a13c6d38ca58a8e4"}, "created_at": 1775621420.8275263, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_certifi_6e82400cb3082e91a13c6d38ca58a8e4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certificate_notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certificate_notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certificate_notifications.yml/source_not_null_tamanu_certifi_6e82400cb3082e91a13c6d38ca58a8e4.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"certificate_notifications\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'certificate_notifications')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_medication_administration_records_id.90c6de3c48": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_medication_administration_records_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_medication_administration_records_id.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_unique_tamanu_medication_administration_records_id.90c6de3c48", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_medication_administration_records_id"], "alias": "source_unique_tamanu_medication_administration_records_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8298995, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_unique_tamanu_medication_administration_records_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_id.052d1d08f9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_administration_records_id.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_id.052d1d08f9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_id"], "alias": "source_not_null_tamanu_medication_administration_records_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8316784, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medication_administration_records_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN.5e232a0448": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__6e466a47f54e5f94522707203935e9a7.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN.5e232a0448", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN"], "alias": "source_accepted_values_tamanu__6e466a47f54e5f94522707203935e9a7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__6e466a47f54e5f94522707203935e9a7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__6e466a47f54e5f94522707203935e9a7"}, "created_at": 1775621420.8334174, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__6e466a47f54e5f94522707203935e9a7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_accepted_values_tamanu__6e466a47f54e5f94522707203935e9a7.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"medication_administration_records\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'GIVEN','NOT_GIVEN'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["GIVEN", "NOT_GIVEN"], "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_due_at.448f2c2000": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_due_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_administration_records_due_at.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_due_at.448f2c2000", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_due_at"], "alias": "source_not_null_tamanu_medication_administration_records_due_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8385038, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medication_administration_records_due_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect due_at\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere due_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "due_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "due_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_is_auto_generated.092ff3874d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_is_auto_generated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_27cf3f9832e5480a994a3e479cdad31f.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_is_auto_generated.092ff3874d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_is_auto_generated"], "alias": "source_not_null_tamanu_medicat_27cf3f9832e5480a994a3e479cdad31f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_27cf3f9832e5480a994a3e479cdad31f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_27cf3f9832e5480a994a3e479cdad31f"}, "created_at": 1775621420.8402784, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_27cf3f9832e5480a994a3e479cdad31f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medicat_27cf3f9832e5480a994a3e479cdad31f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_auto_generated\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere is_auto_generated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_auto_generated", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_auto_generated", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_created_at.9f08841aa3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_a51da974204f1451b738f5ecf933e8a5.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_created_at.9f08841aa3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_created_at"], "alias": "source_not_null_tamanu_medicat_a51da974204f1451b738f5ecf933e8a5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_a51da974204f1451b738f5ecf933e8a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_a51da974204f1451b738f5ecf933e8a5"}, "created_at": 1775621420.8420184, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_a51da974204f1451b738f5ecf933e8a5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medicat_a51da974204f1451b738f5ecf933e8a5.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at.f0bd0e1339": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_caaf5139b8e843a5d91ae7cc15c14909.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at.f0bd0e1339", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_updated_at"], "alias": "source_not_null_tamanu_medicat_caaf5139b8e843a5d91ae7cc15c14909", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_caaf5139b8e843a5d91ae7cc15c14909", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_caaf5139b8e843a5d91ae7cc15c14909"}, "created_at": 1775621420.8445554, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_caaf5139b8e843a5d91ae7cc15c14909\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medicat_caaf5139b8e843a5d91ae7cc15c14909.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at_sync_tick.59617cf32f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_859c89a72cccfaff11899d18cbfb0ff0.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at_sync_tick.59617cf32f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_updated_at_sync_tick"], "alias": "source_not_null_tamanu_medicat_859c89a72cccfaff11899d18cbfb0ff0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_859c89a72cccfaff11899d18cbfb0ff0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_859c89a72cccfaff11899d18cbfb0ff0"}, "created_at": 1775621420.8463342, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_859c89a72cccfaff11899d18cbfb0ff0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medicat_859c89a72cccfaff11899d18cbfb0ff0.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_records_is_edited.178286708a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_records_is_edited", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_ddbe436211f6ce360ecf7d2c4489e394.sql", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_records_is_edited.178286708a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_records_is_edited"], "alias": "source_not_null_tamanu_medicat_ddbe436211f6ce360ecf7d2c4489e394", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_ddbe436211f6ce360ecf7d2c4489e394", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_ddbe436211f6ce360ecf7d2c4489e394"}, "created_at": 1775621420.8480418, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_ddbe436211f6ce360ecf7d2c4489e394\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_records"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_records"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_records.yml/source_not_null_tamanu_medicat_ddbe436211f6ce360ecf7d2c4489e394.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_edited\nfrom \"central\".\"public\".\"medication_administration_records\"\nwhere is_edited is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_edited", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_edited", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_records')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_templates_id.2cf6e18998": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_templates_id.sql", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "test.tamanu.source_unique_tamanu_templates_id.2cf6e18998", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_templates_id"], "alias": "source_unique_tamanu_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8502967, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/templates.yml/source_unique_tamanu_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"templates\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_templates_id.4e582a2692": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_templates_id.sql", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_templates_id.4e582a2692", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_templates_id"], "alias": "source_not_null_tamanu_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8521228, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/templates.yml/source_not_null_tamanu_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"templates\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_templates_name.5251789780": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_templates_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_templates_name.sql", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_templates_name.5251789780", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_templates_name"], "alias": "source_not_null_tamanu_templates_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8538647, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/templates.yml/source_not_null_tamanu_templates_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"templates\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'templates')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_.e25012c12c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_te_605b603aafe2e4884982637acd6344c3.sql", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "test.tamanu.source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_.e25012c12c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_te_605b603aafe2e4884982637acd6344c3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_te_605b603aafe2e4884982637acd6344c3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_te_605b603aafe2e4884982637acd6344c3"}, "created_at": 1775621420.8556275, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_te_605b603aafe2e4884982637acd6344c3\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/templates.yml/source_relationships_tamanu_te_605b603aafe2e4884982637acd6344c3.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select created_by_id as from_field\n    from \"central\".\"public\".\"templates\"\n    where created_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "created_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_templates_updated_at_sync_tick.68f02a36e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_templates_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_templates_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_templates_updated_at_sync_tick.68f02a36e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_templates_updated_at_sync_tick"], "alias": "source_not_null_tamanu_templates_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8608596, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/templates.yml/source_not_null_tamanu_templates_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"templates\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_templates_type.6083b4eb5c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_templates_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_templates_type.sql", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_templates_type.6083b4eb5c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_templates_type"], "alias": "source_not_null_tamanu_templates_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.862628, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/templates.yml/source_not_null_tamanu_templates_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"templates\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'templates')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registry_condition_categories_id.18374f5f6e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registry_condition_categories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registry_condition_categories_id.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registry_condition_categories_id.18374f5f6e", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registry_condition_categories_id"], "alias": "source_unique_tamanu_program_registry_condition_categories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8649058, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_unique_tamanu_program_registry_condition_categories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_id.a5fda78261": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_condition_categories_id.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_id.a5fda78261", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_id"], "alias": "source_not_null_tamanu_program_registry_condition_categories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.866653, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_registry_condition_categories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_created_at.a0f967234b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_49b83e6819cdb65b5af03964d270d341.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_created_at.a0f967234b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_created_at"], "alias": "source_not_null_tamanu_program_49b83e6819cdb65b5af03964d270d341", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_49b83e6819cdb65b5af03964d270d341", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_49b83e6819cdb65b5af03964d270d341"}, "created_at": 1775621420.868345, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_49b83e6819cdb65b5af03964d270d341\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_49b83e6819cdb65b5af03964d270d341.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at.704b596025": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_c558f15ea68c0b2926626de892f4b8a7.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at.704b596025", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_updated_at"], "alias": "source_not_null_tamanu_program_c558f15ea68c0b2926626de892f4b8a7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_c558f15ea68c0b2926626de892f4b8a7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_c558f15ea68c0b2926626de892f4b8a7"}, "created_at": 1775621420.87019, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_c558f15ea68c0b2926626de892f4b8a7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_c558f15ea68c0b2926626de892f4b8a7.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_code.a8f2bb54d7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_3df82a5fd0bf0039a439f1b57ed6ca0f.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_code.a8f2bb54d7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_code"], "alias": "source_not_null_tamanu_program_3df82a5fd0bf0039a439f1b57ed6ca0f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_3df82a5fd0bf0039a439f1b57ed6ca0f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_3df82a5fd0bf0039a439f1b57ed6ca0f"}, "created_at": 1775621420.8719232, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_3df82a5fd0bf0039a439f1b57ed6ca0f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_3df82a5fd0bf0039a439f1b57ed6ca0f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_name.e875bc9167": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_ddcf7dd809d0edb5fc642fc4ae841e1c.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_name.e875bc9167", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_name"], "alias": "source_not_null_tamanu_program_ddcf7dd809d0edb5fc642fc4ae841e1c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_ddcf7dd809d0edb5fc642fc4ae841e1c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_ddcf7dd809d0edb5fc642fc4ae841e1c"}, "created_at": 1775621420.8736396, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_ddcf7dd809d0edb5fc642fc4ae841e1c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_ddcf7dd809d0edb5fc642fc4ae841e1c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_program_registry_id.bef6922940": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_program_registry_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_11e682f5529ac54e7843dc0808ae0a8c.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_program_registry_id.bef6922940", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_program_registry_id"], "alias": "source_not_null_tamanu_program_11e682f5529ac54e7843dc0808ae0a8c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_11e682f5529ac54e7843dc0808ae0a8c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_11e682f5529ac54e7843dc0808ae0a8c"}, "created_at": 1775621420.8753383, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_11e682f5529ac54e7843dc0808ae0a8c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_11e682f5529ac54e7843dc0808ae0a8c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect program_registry_id\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere program_registry_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "program_registry_id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick.62ea28ae95": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_315fe0a3cfa9a2e63766846cfbce2528.sql", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick.62ea28ae95", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick"], "alias": "source_not_null_tamanu_program_315fe0a3cfa9a2e63766846cfbce2528", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_315fe0a3cfa9a2e63766846cfbce2528", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_315fe0a3cfa9a2e63766846cfbce2528"}, "created_at": 1775621420.8770583, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_315fe0a3cfa9a2e63766846cfbce2528\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_condition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_condition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_condition_categories.yml/source_not_null_tamanu_program_315fe0a3cfa9a2e63766846cfbce2528.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"program_registry_condition_categories\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_condition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_procedure_survey_responses_id.f04f0f3841": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_procedure_survey_responses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_procedure_survey_responses_id.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_unique_tamanu_procedure_survey_responses_id.f04f0f3841", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_procedure_survey_responses_id"], "alias": "source_unique_tamanu_procedure_survey_responses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.879447, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_unique_tamanu_procedure_survey_responses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_survey_responses_id.a4c8f21301": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_survey_responses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_survey_responses_id.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_survey_responses_id.a4c8f21301", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_survey_responses_id"], "alias": "source_not_null_tamanu_procedure_survey_responses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8812082, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_not_null_tamanu_procedure_survey_responses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_survey_responses_procedure_id.d49cf97456": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_survey_responses_procedure_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_survey_responses_procedure_id.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_survey_responses_procedure_id.d49cf97456", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_survey_responses_procedure_id"], "alias": "source_not_null_tamanu_procedure_survey_responses_procedure_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.88294, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_not_null_tamanu_procedure_survey_responses_procedure_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect procedure_id\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere procedure_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "procedure_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "procedure_id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_survey_responses_survey_response_id.08df151a05": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_survey_responses_survey_response_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_2867eed558117f5250d3f5a750993222.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_survey_responses_survey_response_id.08df151a05", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_survey_responses_survey_response_id"], "alias": "source_not_null_tamanu_procedu_2867eed558117f5250d3f5a750993222", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_2867eed558117f5250d3f5a750993222", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_2867eed558117f5250d3f5a750993222"}, "created_at": 1775621420.8846695, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_2867eed558117f5250d3f5a750993222\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_not_null_tamanu_procedu_2867eed558117f5250d3f5a750993222.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect survey_response_id\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere survey_response_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "survey_response_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "survey_response_id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_survey_responses_created_at.8143f338d9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_survey_responses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_survey_responses_created_at.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_survey_responses_created_at.8143f338d9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_survey_responses_created_at"], "alias": "source_not_null_tamanu_procedure_survey_responses_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.8864563, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_not_null_tamanu_procedure_survey_responses_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at.d9d19cd3aa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_survey_responses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_survey_responses_updated_at.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at.d9d19cd3aa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_survey_responses_updated_at"], "alias": "source_not_null_tamanu_procedure_survey_responses_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.888223, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_not_null_tamanu_procedure_survey_responses_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick.7ee597b2e3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_0fbbffc1b278fd8d4f89765e240396cc.sql", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick.7ee597b2e3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick"], "alias": "source_not_null_tamanu_procedu_0fbbffc1b278fd8d4f89765e240396cc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_0fbbffc1b278fd8d4f89765e240396cc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_0fbbffc1b278fd8d4f89765e240396cc"}, "created_at": 1775621420.8899307, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_0fbbffc1b278fd8d4f89765e240396cc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_survey_responses.yml/source_not_null_tamanu_procedu_0fbbffc1b278fd8d4f89765e240396cc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"procedure_survey_responses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'procedure_survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_pharmacy_order_prescriptions_id.03a99815d2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_pharmacy_order_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_pharmacy_order_prescriptions_id.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_unique_tamanu_pharmacy_order_prescriptions_id.03a99815d2", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_pharmacy_order_prescriptions_id"], "alias": "source_unique_tamanu_pharmacy_order_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.892178, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_unique_tamanu_pharmacy_order_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_id.fd53b388c3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_order_prescriptions_id.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_id.fd53b388c3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_id"], "alias": "source_not_null_tamanu_pharmacy_order_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.89394, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmacy_order_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id.00d2c5b906": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmac_e74cd5f61aa3c2ce395f97934c38b5ff.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id.00d2c5b906", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id"], "alias": "source_not_null_tamanu_pharmac_e74cd5f61aa3c2ce395f97934c38b5ff", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_pharmac_e74cd5f61aa3c2ce395f97934c38b5ff", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_pharmac_e74cd5f61aa3c2ce395f97934c38b5ff"}, "created_at": 1775621420.8958132, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_pharmac_e74cd5f61aa3c2ce395f97934c38b5ff\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmac_e74cd5f61aa3c2ce395f97934c38b5ff.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect pharmacy_order_id\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere pharmacy_order_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pharmacy_order_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pharmacy_order_id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id.5a6d9c2855": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmac_5f66059351abcdf0ef677a75f5e0df38.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id.5a6d9c2855", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id"], "alias": "source_not_null_tamanu_pharmac_5f66059351abcdf0ef677a75f5e0df38", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_pharmac_5f66059351abcdf0ef677a75f5e0df38", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_pharmac_5f66059351abcdf0ef677a75f5e0df38"}, "created_at": 1775621420.8975248, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_pharmac_5f66059351abcdf0ef677a75f5e0df38\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmac_5f66059351abcdf0ef677a75f5e0df38.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect prescription_id\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere prescription_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "prescription_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "prescription_id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_quantity.02521782a2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_quantity", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_order_prescriptions_quantity.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_quantity.02521782a2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_quantity"], "alias": "source_not_null_tamanu_pharmacy_order_prescriptions_quantity", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.899217, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmacy_order_prescriptions_quantity.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect quantity\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere quantity is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "quantity", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "quantity", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_created_at.f3e852be35": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_order_prescriptions_created_at.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_created_at.f3e852be35", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_created_at"], "alias": "source_not_null_tamanu_pharmacy_order_prescriptions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9009225, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmacy_order_prescriptions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.4e7669a584": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.4e7669a584", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_updated_at"], "alias": "source_not_null_tamanu_pharmacy_order_prescriptions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9026353, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_is_completed.d0fc6c67a0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_is_completed", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmac_ac2df8cceeb6f072c941becedeafef77.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_is_completed.d0fc6c67a0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_is_completed"], "alias": "source_not_null_tamanu_pharmac_ac2df8cceeb6f072c941becedeafef77", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_pharmac_ac2df8cceeb6f072c941becedeafef77", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_pharmac_ac2df8cceeb6f072c941becedeafef77"}, "created_at": 1775621420.9044712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_pharmac_ac2df8cceeb6f072c941becedeafef77\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmac_ac2df8cceeb6f072c941becedeafef77.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_completed\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere is_completed is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_completed", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_completed", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick.eb82a5ba2b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmac_d23681af90564acf93d6e1ee8c7f61a0.sql", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick.eb82a5ba2b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_pharmac_d23681af90564acf93d6e1ee8c7f61a0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_pharmac_d23681af90564acf93d6e1ee8c7f61a0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_pharmac_d23681af90564acf93d6e1ee8c7f61a0"}, "created_at": 1775621420.9061947, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_pharmac_d23681af90564acf93d6e1ee8c7f61a0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_order_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_order_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_order_prescriptions.yml/source_not_null_tamanu_pharmac_d23681af90564acf93d6e1ee8c7f61a0.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"pharmacy_order_prescriptions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_order_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_location_groups_id.92f4a5e856": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_location_groups_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_location_groups_id.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_unique_tamanu_location_groups_id.92f4a5e856", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_location_groups_id"], "alias": "source_unique_tamanu_location_groups_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.908456, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_unique_tamanu_location_groups_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"location_groups\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_id.00f301e9d3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_id.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_id.00f301e9d3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_id"], "alias": "source_not_null_tamanu_location_groups_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9101968, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"location_groups\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_created_at.b199e250ad": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_created_at.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_created_at.b199e250ad", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_created_at"], "alias": "source_not_null_tamanu_location_groups_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.911908, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"location_groups\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_updated_at.4a9b84a719": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_updated_at.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_updated_at.4a9b84a719", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_updated_at"], "alias": "source_not_null_tamanu_location_groups_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9137437, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"location_groups\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_location_groups_visibility_status__current__historical.5756cd0b4b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_location_groups_visibility_status__current__historical", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__74b57dc647618ecdc6dad5f890620980.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_location_groups_visibility_status__current__historical.5756cd0b4b", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_location_groups_visibility_status__current__historical"], "alias": "source_accepted_values_tamanu__74b57dc647618ecdc6dad5f890620980", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__74b57dc647618ecdc6dad5f890620980", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__74b57dc647618ecdc6dad5f890620980"}, "created_at": 1775621420.915465, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__74b57dc647618ecdc6dad5f890620980\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_accepted_values_tamanu__74b57dc647618ecdc6dad5f890620980.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        visibility_status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"location_groups\"\n    group by visibility_status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'current','historical'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "visibility_status", "values": ["current", "historical"], "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_name.983b6df532": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_name.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_name.983b6df532", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_name"], "alias": "source_not_null_tamanu_location_groups_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9210157, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"location_groups\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_code.c2bcc0bf4f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_code.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_code.c2bcc0bf4f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_code"], "alias": "source_not_null_tamanu_location_groups_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9227648, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"location_groups\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_facility_id.d062db3ac7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_facility_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_facility_id.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_facility_id.d062db3ac7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_facility_id"], "alias": "source_not_null_tamanu_location_groups_facility_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9244728, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_facility_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect facility_id\nfrom \"central\".\"public\".\"location_groups\"\nwhere facility_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "facility_id", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_.ecb02b7330": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_lo_e5e4eeaedf59ada3b625f989fffb21f8.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_.ecb02b7330", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_lo_e5e4eeaedf59ada3b625f989fffb21f8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_lo_e5e4eeaedf59ada3b625f989fffb21f8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_lo_e5e4eeaedf59ada3b625f989fffb21f8"}, "created_at": 1775621420.926206, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_lo_e5e4eeaedf59ada3b625f989fffb21f8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_relationships_tamanu_lo_e5e4eeaedf59ada3b625f989fffb21f8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"location_groups\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_updated_at_sync_tick.b75e499255": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_updated_at_sync_tick.b75e499255", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_updated_at_sync_tick"], "alias": "source_not_null_tamanu_location_groups_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9314132, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"location_groups\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_groups_is_bookable.c3c0909cd0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_groups_is_bookable", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_groups_is_bookable.sql", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_groups_is_bookable.c3c0909cd0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_groups_is_bookable"], "alias": "source_not_null_tamanu_location_groups_is_bookable", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9331522, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_groups.yml/source_not_null_tamanu_location_groups_is_bookable.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_bookable\nfrom \"central\".\"public\".\"location_groups\"\nwhere is_bookable is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_bookable", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_bookable", "model": "{{ get_where_subquery(source('tamanu', 'location_groups')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_products_id.abc4b55436": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_products_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_products_id.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_products_id.abc4b55436", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_products_id"], "alias": "source_unique_tamanu_invoice_products_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.935468, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_unique_tamanu_invoice_products_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_products\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_products_id.9b98c43ede": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_products_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_products_id.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_products_id.9b98c43ede", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_products_id"], "alias": "source_not_null_tamanu_invoice_products_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.937367, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_not_null_tamanu_invoice_products_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_products\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_products_name.c01b81d553": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_products_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_products_name.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_products_name.c01b81d553", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_products_name"], "alias": "source_not_null_tamanu_invoice_products_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9390996, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_not_null_tamanu_invoice_products_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"invoice_products\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_products_insurable.94732ef307": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_products_insurable", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_products_insurable.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_products_insurable.94732ef307", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_products_insurable"], "alias": "source_not_null_tamanu_invoice_products_insurable", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9408805, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_not_null_tamanu_invoice_products_insurable.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect insurable\nfrom \"central\".\"public\".\"invoice_products\"\nwhere insurable is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "insurable", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "insurable", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_products_created_at.815791ae0e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_products_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_products_created_at.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_products_created_at.815791ae0e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_products_created_at"], "alias": "source_not_null_tamanu_invoice_products_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.942608, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_not_null_tamanu_invoice_products_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_products\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_products_visibility_status.a7dd9ecfa0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_products_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_products_visibility_status.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_products_visibility_status.a7dd9ecfa0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_products_visibility_status"], "alias": "source_not_null_tamanu_invoice_products_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9443388, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_not_null_tamanu_invoice_products_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"invoice_products\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_products_updated_at_sync_tick.510c557616": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_products_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_products_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_products_updated_at_sync_tick.510c557616", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_products_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_products_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.946074, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_products.yml/source_not_null_tamanu_invoice_products_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_products\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_products')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_certifiable_vaccines_id.f0a184f1a0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_certifiable_vaccines_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_certifiable_vaccines_id.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_unique_tamanu_certifiable_vaccines_id.f0a184f1a0", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_certifiable_vaccines_id"], "alias": "source_unique_tamanu_certifiable_vaccines_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9489915, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_unique_tamanu_certifiable_vaccines_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_id.b73eb6daff": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_id.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_id.b73eb6daff", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_id"], "alias": "source_not_null_tamanu_certifiable_vaccines_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.950779, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_created_at.ed08316054": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_created_at.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_created_at.ed08316054", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_created_at"], "alias": "source_not_null_tamanu_certifiable_vaccines_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9525065, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at.57aee6fafd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_updated_at.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at.57aee6fafd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_updated_at"], "alias": "source_not_null_tamanu_certifiable_vaccines_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9542327, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_certifiable_vaccines_vaccine_id.ab754e124f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_certifiable_vaccines_vaccine_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_certifiable_vaccines_vaccine_id.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_unique_tamanu_certifiable_vaccines_vaccine_id.ab754e124f", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_certifiable_vaccines_vaccine_id"], "alias": "source_unique_tamanu_certifiable_vaccines_vaccine_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9561026, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_unique_tamanu_certifiable_vaccines_vaccine_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    vaccine_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere vaccine_id is not null\ngroup by vaccine_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "vaccine_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "vaccine_id", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_id.836f9ff4fb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_vaccine_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_vaccine_id.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_id.836f9ff4fb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_vaccine_id"], "alias": "source_not_null_tamanu_certifiable_vaccines_vaccine_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.957827, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_vaccine_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect vaccine_id\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere vaccine_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "vaccine_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "vaccine_id", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_.2a45c16791": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_9500d91ae0467de747470c74facd17fa.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_.2a45c16791", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_"], "alias": "dbt_utils_source_relationships_9500d91ae0467de747470c74facd17fa", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_9500d91ae0467de747470c74facd17fa", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_9500d91ae0467de747470c74facd17fa"}, "created_at": 1775621420.9595633, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_9500d91ae0467de747470c74facd17fa\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/dbt_utils_source_relationships_9500d91ae0467de747470c74facd17fa.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    vaccine_id as id\n\n  from \"central\".\"public\".\"certifiable_vaccines\"\n\n  where vaccine_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'vaccine'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "vaccine_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "vaccine_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'vaccine'", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_.7fbca1adbc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_ad1c2893ecdf9c785413816b55008824.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_.7fbca1adbc", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_"], "alias": "dbt_utils_source_relationships_ad1c2893ecdf9c785413816b55008824", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_ad1c2893ecdf9c785413816b55008824", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_ad1c2893ecdf9c785413816b55008824"}, "created_at": 1775621420.9653733, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_ad1c2893ecdf9c785413816b55008824\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/dbt_utils_source_relationships_ad1c2893ecdf9c785413816b55008824.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    manufacturer_id as id\n\n  from \"central\".\"public\".\"certifiable_vaccines\"\n\n  where manufacturer_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'manufacturer'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "manufacturer_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "manufacturer_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'manufacturer'", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.e0022050d1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_icd11_drug_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.e0022050d1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_icd11_drug_code"], "alias": "source_not_null_tamanu_certifiable_vaccines_icd11_drug_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9706762, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect icd11_drug_code\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere icd11_drug_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "icd11_drug_code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "icd11_drug_code", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.c672804493": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_icd11_disease_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.c672804493", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_icd11_disease_code"], "alias": "source_not_null_tamanu_certifiable_vaccines_icd11_disease_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9726765, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect icd11_disease_code\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere icd11_disease_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "icd11_disease_code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "icd11_disease_code", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_code.6c9677a1ed": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_vaccine_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_vaccine_code.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_code.6c9677a1ed", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_vaccine_code"], "alias": "source_not_null_tamanu_certifiable_vaccines_vaccine_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9744098, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_vaccine_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect vaccine_code\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere vaccine_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "vaccine_code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "vaccine_code", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_maximum_dosage.ab28eb0766": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_maximum_dosage", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifiable_vaccines_maximum_dosage.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_maximum_dosage.ab28eb0766", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_maximum_dosage"], "alias": "source_not_null_tamanu_certifiable_vaccines_maximum_dosage", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9761357, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifiable_vaccines_maximum_dosage.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect maximum_dosage\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere maximum_dosage is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "maximum_dosage", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "maximum_dosage", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick.ce5ff28250": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_certifi_ca807df7c843b63429f7ff00e5ef9ee9.sql", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick.ce5ff28250", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick"], "alias": "source_not_null_tamanu_certifi_ca807df7c843b63429f7ff00e5ef9ee9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_certifi_ca807df7c843b63429f7ff00e5ef9ee9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_certifi_ca807df7c843b63429f7ff00e5ef9ee9"}, "created_at": 1775621420.9778666, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_certifi_ca807df7c843b63429f7ff00e5ef9ee9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "certifiable_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.certifiable_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/certifiable_vaccines.yml/source_not_null_tamanu_certifi_ca807df7c843b63429f7ff00e5ef9ee9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"certifiable_vaccines\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'certifiable_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_task_designations_id.adf46ec6db": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_task_designations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_task_designations_id.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_unique_tamanu_task_designations_id.adf46ec6db", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_task_designations_id"], "alias": "source_unique_tamanu_task_designations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9802914, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_unique_tamanu_task_designations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"task_designations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_designations_id.2c04a11c88": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_designations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_designations_id.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_designations_id.2c04a11c88", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_designations_id"], "alias": "source_not_null_tamanu_task_designations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.982029, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_not_null_tamanu_task_designations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"task_designations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_designations_task_id.d0e443e977": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_designations_task_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_designations_task_id.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_designations_task_id.d0e443e977", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_designations_task_id"], "alias": "source_not_null_tamanu_task_designations_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9837766, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_not_null_tamanu_task_designations_task_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect task_id\nfrom \"central\".\"public\".\"task_designations\"\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "task_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_designations_designation_id.dc0adb2396": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_designations_designation_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_designations_designation_id.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_designations_designation_id.dc0adb2396", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_designations_designation_id"], "alias": "source_not_null_tamanu_task_designations_designation_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9855018, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_not_null_tamanu_task_designations_designation_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect designation_id\nfrom \"central\".\"public\".\"task_designations\"\nwhere designation_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "designation_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "designation_id", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_designations_created_at.60f756cdb6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_designations_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_designations_created_at.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_designations_created_at.60f756cdb6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_designations_created_at"], "alias": "source_not_null_tamanu_task_designations_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.987238, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_not_null_tamanu_task_designations_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"task_designations\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_designations_updated_at.14c7cc7b2e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_designations_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_designations_updated_at.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_designations_updated_at.14c7cc7b2e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_designations_updated_at"], "alias": "source_not_null_tamanu_task_designations_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9890797, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_not_null_tamanu_task_designations_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"task_designations\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_designations_updated_at_sync_tick.6da15a7273": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_designations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_designations_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_designations_updated_at_sync_tick.6da15a7273", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_designations_updated_at_sync_tick"], "alias": "source_not_null_tamanu_task_designations_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9908986, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_designations.yml/source_not_null_tamanu_task_designations_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"task_designations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'task_designations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_appointment_schedules_id.0a8d801e6f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_appointment_schedules_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_appointment_schedules_id.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_unique_tamanu_appointment_schedules_id.0a8d801e6f", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_appointment_schedules_id"], "alias": "source_unique_tamanu_appointment_schedules_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9931858, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_unique_tamanu_appointment_schedules_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_id.61a1963563": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_schedules_id.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_id.61a1963563", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_id"], "alias": "source_not_null_tamanu_appointment_schedules_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9949293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appointment_schedules_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_interval.09395917c8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_interval", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_schedules_interval.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_interval.09395917c8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_interval"], "alias": "source_not_null_tamanu_appointment_schedules_interval", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.996654, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appointment_schedules_interval.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect interval\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere interval is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "interval", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "interval", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_frequency.1a456b5d85": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_frequency", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_schedules_frequency.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_frequency.1a456b5d85", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_frequency"], "alias": "source_not_null_tamanu_appointment_schedules_frequency", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621420.9984715, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appointment_schedules_frequency.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect frequency\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere frequency is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "frequency", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "frequency", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_created_at.51ddaf1fe0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_schedules_created_at.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_created_at.51ddaf1fe0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_created_at"], "alias": "source_not_null_tamanu_appointment_schedules_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0001705, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appointment_schedules_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at.ceb401c90c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_schedules_updated_at.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at.ceb401c90c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_updated_at"], "alias": "source_not_null_tamanu_appointment_schedules_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0018775, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appointment_schedules_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at_sync_tick.3902446442": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appoint_122320333d395d375f76621d2d639d2c.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at_sync_tick.3902446442", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_updated_at_sync_tick"], "alias": "source_not_null_tamanu_appoint_122320333d395d375f76621d2d639d2c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_appoint_122320333d395d375f76621d2d639d2c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_appoint_122320333d395d375f76621d2d639d2c"}, "created_at": 1775621421.003608, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_appoint_122320333d395d375f76621d2d639d2c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appoint_122320333d395d375f76621d2d639d2c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_schedules_is_fully_generated.fd5b4e8ebf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_schedules_is_fully_generated", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_schedules_is_fully_generated.sql", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_schedules_is_fully_generated.fd5b4e8ebf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_schedules_is_fully_generated"], "alias": "source_not_null_tamanu_appointment_schedules_is_fully_generated", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.005309, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_schedules"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_schedules"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_schedules.yml/source_not_null_tamanu_appointment_schedules_is_fully_generated.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_fully_generated\nfrom \"central\".\"public\".\"appointment_schedules\"\nwhere is_fully_generated is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_fully_generated", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_fully_generated", "model": "{{ get_where_subquery(source('tamanu', 'appointment_schedules')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_scheduled_vaccines_id.2034f06a45": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_scheduled_vaccines_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_scheduled_vaccines_id.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_unique_tamanu_scheduled_vaccines_id.2034f06a45", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_scheduled_vaccines_id"], "alias": "source_unique_tamanu_scheduled_vaccines_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0077057, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_unique_tamanu_scheduled_vaccines_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_scheduled_vaccines_id.5f527b2c7d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_scheduled_vaccines_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_scheduled_vaccines_id.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_scheduled_vaccines_id.5f527b2c7d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_scheduled_vaccines_id"], "alias": "source_not_null_tamanu_scheduled_vaccines_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.00941, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_not_null_tamanu_scheduled_vaccines_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_scheduled_vaccines_created_at.af5ea94ddb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_scheduled_vaccines_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_scheduled_vaccines_created_at.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_scheduled_vaccines_created_at.af5ea94ddb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_scheduled_vaccines_created_at"], "alias": "source_not_null_tamanu_scheduled_vaccines_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0110981, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_not_null_tamanu_scheduled_vaccines_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at.bbfa85d08b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_scheduled_vaccines_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_scheduled_vaccines_updated_at.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at.bbfa85d08b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_scheduled_vaccines_updated_at"], "alias": "source_not_null_tamanu_scheduled_vaccines_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0128205, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_not_null_tamanu_scheduled_vaccines_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine.c38ebd4174": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__c3e1fa228e8e0d7fa4dc9c39cd9bd7e7.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine.c38ebd4174", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine"], "alias": "source_accepted_values_tamanu__c3e1fa228e8e0d7fa4dc9c39cd9bd7e7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__c3e1fa228e8e0d7fa4dc9c39cd9bd7e7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__c3e1fa228e8e0d7fa4dc9c39cd9bd7e7"}, "created_at": 1775621421.0145473, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__c3e1fa228e8e0d7fa4dc9c39cd9bd7e7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_accepted_values_tamanu__c3e1fa228e8e0d7fa4dc9c39cd9bd7e7.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        category as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"scheduled_vaccines\"\n    group by category\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Campaign','Catchup','Other','Routine'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "category", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "category", "values": ["Campaign", "Catchup", "Other", "Routine"], "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.b312aecb83": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.b312aecb83", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick"], "alias": "source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0205567, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.69f1da7070": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_scheduled_vaccines_hide_from_certificate", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.69f1da7070", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_scheduled_vaccines_hide_from_certificate"], "alias": "source_not_null_tamanu_scheduled_vaccines_hide_from_certificate", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0223062, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect hide_from_certificate\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere hide_from_certificate is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "hide_from_certificate", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "hide_from_certificate", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_scheduled_vaccines_sort_index.b8dba8349e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_scheduled_vaccines_sort_index", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_scheduled_vaccines_sort_index.sql", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_scheduled_vaccines_sort_index.b8dba8349e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_scheduled_vaccines_sort_index"], "alias": "source_not_null_tamanu_scheduled_vaccines_sort_index", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0242693, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/scheduled_vaccines.yml/source_not_null_tamanu_scheduled_vaccines_sort_index.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect sort_index\nfrom \"central\".\"public\".\"scheduled_vaccines\"\nwhere sort_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "sort_index", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "sort_index", "model": "{{ get_where_subquery(source('tamanu', 'scheduled_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_localisation_caches_id.32edbc1226": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_localisation_caches_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_localisation_caches_id.sql", "original_file_path": "../../database/model/public/user_localisation_caches.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_localisation_caches_id.32edbc1226", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_localisation_caches_id"], "alias": "source_unique_tamanu_user_localisation_caches_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0265985, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_localisation_caches"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_localisation_caches"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_localisation_caches.yml/source_unique_tamanu_user_localisation_caches_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_localisation_caches\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_localisation_caches')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_localisation_caches_id.31e4c40fbd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_localisation_caches_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_localisation_caches_id.sql", "original_file_path": "../../database/model/public/user_localisation_caches.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_localisation_caches_id.31e4c40fbd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_localisation_caches_id"], "alias": "source_not_null_tamanu_user_localisation_caches_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.028334, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_localisation_caches"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_localisation_caches"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_localisation_caches.yml/source_not_null_tamanu_user_localisation_caches_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_localisation_caches\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_localisation_caches')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_localisation_caches_localisation.6988ef3ae3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_localisation_caches_localisation", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_localisation_caches_localisation.sql", "original_file_path": "../../database/model/public/user_localisation_caches.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_localisation_caches_localisation.6988ef3ae3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_localisation_caches_localisation"], "alias": "source_not_null_tamanu_user_localisation_caches_localisation", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0300546, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_localisation_caches"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_localisation_caches"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_localisation_caches.yml/source_not_null_tamanu_user_localisation_caches_localisation.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect localisation\nfrom \"central\".\"public\".\"user_localisation_caches\"\nwhere localisation is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "localisation", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "localisation", "model": "{{ get_where_subquery(source('tamanu', 'user_localisation_caches')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_item_discounts_id.171e1a5e94": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_item_discounts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_item_discounts_id.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_item_discounts_id.171e1a5e94", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_item_discounts_id"], "alias": "source_unique_tamanu_invoice_item_discounts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0324087, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_unique_tamanu_invoice_item_discounts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_discounts_id.bcff96eb2f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_discounts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_item_discounts_id.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_discounts_id.bcff96eb2f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_discounts_id"], "alias": "source_not_null_tamanu_invoice_item_discounts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.034136, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_not_null_tamanu_invoice_item_discounts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_discounts_invoice_item_id.3398752f5b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_discounts_invoice_item_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_item_discounts_invoice_item_id.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_discounts_invoice_item_id.3398752f5b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_discounts_invoice_item_id"], "alias": "source_not_null_tamanu_invoice_item_discounts_invoice_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0358415, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_not_null_tamanu_invoice_item_discounts_invoice_item_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_item_id\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere invoice_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_item_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_item_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_.18c0b3db45": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_f0981d8d8855f4c026e5bea8008e7937.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_.18c0b3db45", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_"], "alias": "source_relationships_tamanu_in_f0981d8d8855f4c026e5bea8008e7937", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_f0981d8d8855f4c026e5bea8008e7937", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_f0981d8d8855f4c026e5bea8008e7937"}, "created_at": 1775621421.0375445, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_f0981d8d8855f4c026e5bea8008e7937\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"], ["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items", "source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_relationships_tamanu_in_f0981d8d8855f4c026e5bea8008e7937.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select invoice_item_id as from_field\n    from \"central\".\"public\".\"invoice_item_discounts\"\n    where invoice_item_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoice_items\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_item_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "invoice_item_id", "to": "source('tamanu', 'invoice_items')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_discounts_amount.0e8480cee8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_discounts_amount", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_item_discounts_amount.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_discounts_amount.0e8480cee8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_discounts_amount"], "alias": "source_not_null_tamanu_invoice_item_discounts_amount", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0427327, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_not_null_tamanu_invoice_item_discounts_amount.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect amount\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere amount is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "amount", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "amount", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_discounts_created_at.664f2faa45": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_discounts_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_item_discounts_created_at.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_discounts_created_at.664f2faa45", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_discounts_created_at"], "alias": "source_not_null_tamanu_invoice_item_discounts_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0444927, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_not_null_tamanu_invoice_item_discounts_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick.15b4636f1b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_85f684f1cd1756ed7eb800b2c37208bc.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick.15b4636f1b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_85f684f1cd1756ed7eb800b2c37208bc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_85f684f1cd1756ed7eb800b2c37208bc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_85f684f1cd1756ed7eb800b2c37208bc"}, "created_at": 1775621421.0462341, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_85f684f1cd1756ed7eb800b2c37208bc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_not_null_tamanu_invoice_85f684f1cd1756ed7eb800b2c37208bc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_discounts_type.f759ed12f3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_discounts_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_item_discounts_type.sql", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_discounts_type.f759ed12f3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_discounts_type"], "alias": "source_not_null_tamanu_invoice_item_discounts_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.047953, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_discounts.yml/source_not_null_tamanu_invoice_item_discounts_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"invoice_item_discounts\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_portal_one_time_tokens_id.84f65f30bf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_portal_one_time_tokens_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_portal_one_time_tokens_id.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_unique_tamanu_portal_one_time_tokens_id.84f65f30bf", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_portal_one_time_tokens_id"], "alias": "source_unique_tamanu_portal_one_time_tokens_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0508735, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_unique_tamanu_portal_one_time_tokens_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_id.ab6f761724": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_id.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_id.ab6f761724", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_id"], "alias": "source_not_null_tamanu_portal_one_time_tokens_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.052624, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_created_at.1c1279979b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_created_at.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_created_at.1c1279979b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_created_at"], "alias": "source_not_null_tamanu_portal_one_time_tokens_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.054321, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_updated_at.b077921d8b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_updated_at.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_updated_at.b077921d8b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_updated_at"], "alias": "source_not_null_tamanu_portal_one_time_tokens_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0561097, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_portal_user_id.5159527428": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_portal_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_portal_user_id.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_portal_user_id.5159527428", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_portal_user_id"], "alias": "source_not_null_tamanu_portal_one_time_tokens_portal_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.057966, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_portal_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect portal_user_id\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere portal_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "portal_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "portal_user_id", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_type.5c33a4037d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_type.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_type.5c33a4037d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_type"], "alias": "source_not_null_tamanu_portal_one_time_tokens_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0603983, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_token.8afdc93478": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_token", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_token.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_token.8afdc93478", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_token"], "alias": "source_not_null_tamanu_portal_one_time_tokens_token", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0627196, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_token.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect token\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere token is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "token", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "token", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_expires_at.e45d1c82d9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_one_time_tokens_expires_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_one_time_tokens_expires_at.sql", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_expires_at.e45d1c82d9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_one_time_tokens_expires_at"], "alias": "source_not_null_tamanu_portal_one_time_tokens_expires_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0650864, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_one_time_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_one_time_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_one_time_tokens.yml/source_not_null_tamanu_portal_one_time_tokens_expires_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect expires_at\nfrom \"central\".\"public\".\"portal_one_time_tokens\"\nwhere expires_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "expires_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "expires_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_one_time_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_discounts_id.90b9b4d8a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_discounts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_discounts_id.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_discounts_id.90b9b4d8a6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_discounts_id"], "alias": "source_unique_tamanu_invoice_discounts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0674834, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_unique_tamanu_invoice_discounts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_id.e5dd8872f8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_id.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_id.e5dd8872f8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_id"], "alias": "source_not_null_tamanu_invoice_discounts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0693853, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_invoice_id.e692b8ae47": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_invoice_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_invoice_id.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_invoice_id.e692b8ae47", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_invoice_id"], "alias": "source_not_null_tamanu_invoice_discounts_invoice_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0710955, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_invoice_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_id\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere invoice_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_.93879e6aa1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_187ceacf5902dc903aa82cf304fcb06b.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_.93879e6aa1", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_"], "alias": "source_relationships_tamanu_in_187ceacf5902dc903aa82cf304fcb06b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_187ceacf5902dc903aa82cf304fcb06b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_187ceacf5902dc903aa82cf304fcb06b"}, "created_at": 1775621421.0728636, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_187ceacf5902dc903aa82cf304fcb06b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"], ["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices", "source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_relationships_tamanu_in_187ceacf5902dc903aa82cf304fcb06b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select invoice_id as from_field\n    from \"central\".\"public\".\"invoice_discounts\"\n    where invoice_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoices\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "invoice_id", "to": "source('tamanu', 'invoices')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_percentage.eeb4864a35": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_percentage", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_percentage.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_percentage.eeb4864a35", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_percentage"], "alias": "source_not_null_tamanu_invoice_discounts_percentage", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.078296, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_percentage.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect percentage\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere percentage is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "percentage", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "percentage", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_is_manual.e5a0d85a43": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_is_manual", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_is_manual.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_is_manual.e5a0d85a43", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_is_manual"], "alias": "source_not_null_tamanu_invoice_discounts_is_manual", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0800822, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_is_manual.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_manual\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere is_manual is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_manual", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_manual", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_by_user_id.eacadbca1c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_applied_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_applied_by_user_id.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_by_user_id.eacadbca1c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_applied_by_user_id"], "alias": "source_not_null_tamanu_invoice_discounts_applied_by_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0818136, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_applied_by_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect applied_by_user_id\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere applied_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "applied_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "applied_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_.4ec462b6c3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_3c1a8b81c61e8d514506e3c15765bb9e.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_.4ec462b6c3", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_in_3c1a8b81c61e8d514506e3c15765bb9e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_3c1a8b81c61e8d514506e3c15765bb9e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_3c1a8b81c61e8d514506e3c15765bb9e"}, "created_at": 1775621421.083585, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_3c1a8b81c61e8d514506e3c15765bb9e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_relationships_tamanu_in_3c1a8b81c61e8d514506e3c15765bb9e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select applied_by_user_id as from_field\n    from \"central\".\"public\".\"invoice_discounts\"\n    where applied_by_user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "applied_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "applied_by_user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_time.de2863c9b1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_applied_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_applied_time.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_time.de2863c9b1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_applied_time"], "alias": "source_not_null_tamanu_invoice_discounts_applied_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0887141, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_applied_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect applied_time\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere applied_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "applied_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "applied_time", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_created_at.2a4d9814f4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_created_at.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_created_at.2a4d9814f4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_created_at"], "alias": "source_not_null_tamanu_invoice_discounts_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.090451, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.96efd53160": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_discounts_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.96efd53160", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_discounts_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_discounts_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.092179, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_discounts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_discounts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_discounts.yml/source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_discounts\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_discounts')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registry_conditions_id.8aed9112e7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registry_conditions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registry_conditions_id.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registry_conditions_id.8aed9112e7", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registry_conditions_id"], "alias": "source_unique_tamanu_program_registry_conditions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0946107, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_unique_tamanu_program_registry_conditions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_id.96669373a2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_conditions_id.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_id.96669373a2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_id"], "alias": "source_not_null_tamanu_program_registry_conditions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0963476, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_registry_conditions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_created_at.f1a67190af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_conditions_created_at.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_created_at.f1a67190af", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_created_at"], "alias": "source_not_null_tamanu_program_registry_conditions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0980442, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_registry_conditions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at.2f0d7717b7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_conditions_updated_at.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at.2f0d7717b7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_updated_at"], "alias": "source_not_null_tamanu_program_registry_conditions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.0997512, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_registry_conditions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registry_conditions_code.9e9e23890c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registry_conditions_code", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registry_conditions_code.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registry_conditions_code.9e9e23890c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registry_conditions_code"], "alias": "source_unique_tamanu_program_registry_conditions_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.101439, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_unique_tamanu_program_registry_conditions_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    code as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere code is not null\ngroup by code\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_code.6e0f8d91fe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_conditions_code.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_code.6e0f8d91fe", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_code"], "alias": "source_not_null_tamanu_program_registry_conditions_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.103276, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_registry_conditions_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_name.fb44ee2d53": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_conditions_name.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_name.fb44ee2d53", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_name"], "alias": "source_not_null_tamanu_program_registry_conditions_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1049771, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_registry_conditions_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_program_registry_id.8b4085a6a4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_program_registry_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_0864f103a6e5eecc1e4a60e212d1c5d5.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_program_registry_id.8b4085a6a4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_program_registry_id"], "alias": "source_not_null_tamanu_program_0864f103a6e5eecc1e4a60e212d1c5d5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_0864f103a6e5eecc1e4a60e212d1c5d5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_0864f103a6e5eecc1e4a60e212d1c5d5"}, "created_at": 1775621421.1066809, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_0864f103a6e5eecc1e4a60e212d1c5d5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_0864f103a6e5eecc1e4a60e212d1c5d5.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect program_registry_id\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere program_registry_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "program_registry_id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_.4b46b0e413": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pr_9774d75a909ed3789fa933885f18167e.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_.4b46b0e413", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_"], "alias": "source_relationships_tamanu_pr_9774d75a909ed3789fa933885f18167e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pr_9774d75a909ed3789fa933885f18167e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pr_9774d75a909ed3789fa933885f18167e"}, "created_at": 1775621421.108417, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pr_9774d75a909ed3789fa933885f18167e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"], ["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries", "source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_relationships_tamanu_pr_9774d75a909ed3789fa933885f18167e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select program_registry_id as from_field\n    from \"central\".\"public\".\"program_registry_conditions\"\n    where program_registry_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"program_registries\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "program_registry_id", "to": "source('tamanu', 'program_registries')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick.81caed205f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_f33a74dbb7ba897c04e964927bd9171b.sql", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick.81caed205f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_program_f33a74dbb7ba897c04e964927bd9171b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_f33a74dbb7ba897c04e964927bd9171b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_f33a74dbb7ba897c04e964927bd9171b"}, "created_at": 1775621421.113682, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_f33a74dbb7ba897c04e964927bd9171b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_conditions.yml/source_not_null_tamanu_program_f33a74dbb7ba897c04e964927bd9171b.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"program_registry_conditions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_payments_id.0aeb9e30d1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_payments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_payments_id.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_payments_id.0aeb9e30d1", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_payments_id"], "alias": "source_unique_tamanu_invoice_payments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1159732, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_unique_tamanu_invoice_payments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_id.3dad87d906": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_id.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_id.3dad87d906", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_id"], "alias": "source_not_null_tamanu_invoice_payments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1177342, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_invoice_id.f83a526a9f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_invoice_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_invoice_id.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_invoice_id.f83a526a9f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_invoice_id"], "alias": "source_not_null_tamanu_invoice_payments_invoice_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1195917, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_invoice_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_id\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere invoice_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_.d07f617060": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_a2c3183cac3f41a62a0a036f80237a03.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_.d07f617060", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_"], "alias": "source_relationships_tamanu_in_a2c3183cac3f41a62a0a036f80237a03", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_a2c3183cac3f41a62a0a036f80237a03", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_a2c3183cac3f41a62a0a036f80237a03"}, "created_at": 1775621421.121353, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_a2c3183cac3f41a62a0a036f80237a03\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"], ["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices", "source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_relationships_tamanu_in_a2c3183cac3f41a62a0a036f80237a03.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select invoice_id as from_field\n    from \"central\".\"public\".\"invoice_payments\"\n    where invoice_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoices\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "invoice_id", "to": "source('tamanu', 'invoices')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_date.7761ae0a7d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_date.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_date.7761ae0a7d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_date"], "alias": "source_not_null_tamanu_invoice_payments_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1264415, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_receipt_number.bd93ab85a8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_receipt_number", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_receipt_number.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_receipt_number.bd93ab85a8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_receipt_number"], "alias": "source_not_null_tamanu_invoice_payments_receipt_number", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1284144, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_receipt_number.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect receipt_number\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere receipt_number is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "receipt_number", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "receipt_number", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_amount.ce266dd7a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_amount", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_amount.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_amount.ce266dd7a6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_amount"], "alias": "source_not_null_tamanu_invoice_payments_amount", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1301622, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_amount.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect amount\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere amount is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "amount", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "amount", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_created_at.a163e272e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_created_at.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_created_at.a163e272e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_created_at"], "alias": "source_not_null_tamanu_invoice_payments_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.131895, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_.11aa785c7b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_40646841267129a2f1cd0a86ec591187.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_.11aa785c7b", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_in_40646841267129a2f1cd0a86ec591187", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_40646841267129a2f1cd0a86ec591187", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_40646841267129a2f1cd0a86ec591187"}, "created_at": 1775621421.1336498, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_40646841267129a2f1cd0a86ec591187\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_relationships_tamanu_in_40646841267129a2f1cd0a86ec591187.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select updated_by_user_id as from_field\n    from \"central\".\"public\".\"invoice_payments\"\n    where updated_by_user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "updated_by_user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_payments_original_payment_id.76c596c1fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_payments_original_payment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_payments_original_payment_id.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_payments_original_payment_id.76c596c1fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_payments_original_payment_id"], "alias": "source_unique_tamanu_invoice_payments_original_payment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.138779, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_unique_tamanu_invoice_payments_original_payment_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    original_payment_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere original_payment_id is not null\ngroup by original_payment_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "original_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "original_payment_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_payments_updated_at_sync_tick.011299b145": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_payments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_payments_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_payments_updated_at_sync_tick.011299b145", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_payments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_payments_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1405156, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_payments.yml/source_not_null_tamanu_invoice_payments_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_payments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_payments')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown.663d1d9b1c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__453a4f088e798b80cd07239fd94a7448.sql", "original_file_path": "../../database/model/public/patient_additional_data.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown.663d1d9b1c", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown"], "alias": "source_accepted_values_tamanu__453a4f088e798b80cd07239fd94a7448", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__453a4f088e798b80cd07239fd94a7448", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__453a4f088e798b80cd07239fd94a7448"}, "created_at": 1775621421.1429188, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__453a4f088e798b80cd07239fd94a7448\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_additional_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_additional_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_additional_data.yml/source_accepted_values_tamanu__453a4f088e798b80cd07239fd94a7448.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        marital_status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_additional_data\"\n    group by marital_status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Defacto','Married','Single','Widow','Divorced','Separated','Unknown'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "marital_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "marital_status", "values": ["Defacto", "Married", "Single", "Widow", "Divorced", "Separated", "Unknown"], "model": "{{ get_where_subquery(source('tamanu', 'patient_additional_data')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_.d16028f9e4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__712c12f6b76c8390b819628267fb46fb.sql", "original_file_path": "../../database/model/public/patient_additional_data.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_.d16028f9e4", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_"], "alias": "source_accepted_values_tamanu__712c12f6b76c8390b819628267fb46fb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__712c12f6b76c8390b819628267fb46fb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__712c12f6b76c8390b819628267fb46fb"}, "created_at": 1775621421.1496565, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__712c12f6b76c8390b819628267fb46fb\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_additional_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_additional_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_additional_data.yml/source_accepted_values_tamanu__712c12f6b76c8390b819628267fb46fb.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        blood_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_additional_data\"\n    group by blood_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'A+','A-','AB-','AB+','B+','B-','O+','O-'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "blood_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "blood_type", "values": ["A+", "A-", "AB-", "AB+", "B+", "B-", "O+", "O-"], "model": "{{ get_where_subquery(source('tamanu', 'patient_additional_data')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_additional_data_patient_id.765b349cc6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_additional_data_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_additional_data_patient_id.sql", "original_file_path": "../../database/model/public/patient_additional_data.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_additional_data_patient_id.765b349cc6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_additional_data_patient_id"], "alias": "source_unique_tamanu_patient_additional_data_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.157003, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_additional_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_additional_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_additional_data.yml/source_unique_tamanu_patient_additional_data_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    patient_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_additional_data\"\nwhere patient_id is not null\ngroup by patient_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_additional_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_additional_data_patient_id.9eb859e167": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_additional_data_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_additional_data_patient_id.sql", "original_file_path": "../../database/model/public/patient_additional_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_additional_data_patient_id.9eb859e167", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_additional_data_patient_id"], "alias": "source_not_null_tamanu_patient_additional_data_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1589432, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_additional_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_additional_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_additional_data.yml/source_not_null_tamanu_patient_additional_data_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_additional_data\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_additional_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_additional_data_updated_at_sync_tick.d93ed515bf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_additional_data_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_a203ecdfc3883025fe47c89a97bffce9.sql", "original_file_path": "../../database/model/public/patient_additional_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_additional_data_updated_at_sync_tick.d93ed515bf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_additional_data_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_a203ecdfc3883025fe47c89a97bffce9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_a203ecdfc3883025fe47c89a97bffce9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_a203ecdfc3883025fe47c89a97bffce9"}, "created_at": 1775621421.1607308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_a203ecdfc3883025fe47c89a97bffce9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_additional_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_additional_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_additional_data.yml/source_not_null_tamanu_patient_a203ecdfc3883025fe47c89a97bffce9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_additional_data\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_additional_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_.32e4981e6c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_up_d92e2efe0ae22f254b06c252b0a138d2.sql", "original_file_path": "../../database/model/public/upcoming_vaccinations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_.32e4981e6c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_up_d92e2efe0ae22f254b06c252b0a138d2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_up_d92e2efe0ae22f254b06c252b0a138d2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_up_d92e2efe0ae22f254b06c252b0a138d2"}, "created_at": 1775621421.1631355, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_up_d92e2efe0ae22f254b06c252b0a138d2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "upcoming_vaccinations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.upcoming_vaccinations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/upcoming_vaccinations.yml/source_relationships_tamanu_up_d92e2efe0ae22f254b06c252b0a138d2.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"upcoming_vaccinations\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'upcoming_vaccinations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.37ba12bfdf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_up_e4efb31756830da4dc43696974d90cc2.sql", "original_file_path": "../../database/model/public/upcoming_vaccinations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.37ba12bfdf", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_"], "alias": "source_relationships_tamanu_up_e4efb31756830da4dc43696974d90cc2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_up_e4efb31756830da4dc43696974d90cc2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_up_e4efb31756830da4dc43696974d90cc2"}, "created_at": 1775621421.1682298, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_up_e4efb31756830da4dc43696974d90cc2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"], ["tamanu", "upcoming_vaccinations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines", "source.tamanu.tamanu.upcoming_vaccinations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/upcoming_vaccinations.yml/source_relationships_tamanu_up_e4efb31756830da4dc43696974d90cc2.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select scheduled_vaccine_id as from_field\n    from \"central\".\"public\".\"upcoming_vaccinations\"\n    where scheduled_vaccine_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"scheduled_vaccines\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "scheduled_vaccine_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "scheduled_vaccine_id", "to": "source('tamanu', 'scheduled_vaccines')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'upcoming_vaccinations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_preferences_id.ff8617d0af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_preferences_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_preferences_id.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_preferences_id.ff8617d0af", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_preferences_id"], "alias": "source_unique_tamanu_user_preferences_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1738434, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_unique_tamanu_user_preferences_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_preferences\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_id.0563337670": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_id.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_id.0563337670", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_id"], "alias": "source_not_null_tamanu_user_preferences_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1755867, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_preferences\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_created_at.b4868da62e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_created_at.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_created_at.b4868da62e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_created_at"], "alias": "source_not_null_tamanu_user_preferences_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.177279, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"user_preferences\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_updated_at.e3fb22ee58": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_updated_at.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_updated_at.e3fb22ee58", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_updated_at"], "alias": "source_not_null_tamanu_user_preferences_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.178991, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"user_preferences\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_user_id.de0ee34cbb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_user_id.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_user_id.de0ee34cbb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_user_id"], "alias": "source_not_null_tamanu_user_preferences_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1808329, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"user_preferences\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_updated_at_sync_tick.68db073099": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_updated_at_sync_tick.68db073099", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_updated_at_sync_tick"], "alias": "source_not_null_tamanu_user_preferences_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1825824, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"user_preferences\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_key.42f62cbf6e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_key", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_key.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_key.42f62cbf6e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_key"], "alias": "source_not_null_tamanu_user_preferences_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.184263, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_key.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect key\nfrom \"central\".\"public\".\"user_preferences\"\nwhere key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "key", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "key", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_preferences_value.05dc3d9f13": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_preferences_value", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_preferences_value.sql", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_preferences_value.05dc3d9f13", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_preferences_value"], "alias": "source_not_null_tamanu_user_preferences_value", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1859586, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_preferences"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_preferences"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_preferences.yml/source_not_null_tamanu_user_preferences_value.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect value\nfrom \"central\".\"public\".\"user_preferences\"\nwhere value is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "value", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "value", "model": "{{ get_where_subquery(source('tamanu', 'user_preferences')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_values_created_at.acd6792845": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_values_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_values_created_at.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_values_created_at.acd6792845", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_values_created_at"], "alias": "source_not_null_tamanu_patient_field_values_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.188225, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_not_null_tamanu_patient_field_values_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_field_values\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at.dc8ebd5fcb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_values_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_values_updated_at.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at.dc8ebd5fcb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_values_updated_at"], "alias": "source_not_null_tamanu_patient_field_values_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.1900952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_not_null_tamanu_patient_field_values_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_field_values\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_values_value.20bfdc4dc5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_values_value", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_values_value.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_values_value.20bfdc4dc5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_values_value"], "alias": "source_not_null_tamanu_patient_field_values_value", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.191819, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_not_null_tamanu_patient_field_values_value.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect value\nfrom \"central\".\"public\".\"patient_field_values\"\nwhere value is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "value", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "value", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_values_definition_id.afb3baa363": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_values_definition_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_values_definition_id.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_values_definition_id.afb3baa363", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_values_definition_id"], "alias": "source_not_null_tamanu_patient_field_values_definition_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.193524, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_not_null_tamanu_patient_field_values_definition_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect definition_id\nfrom \"central\".\"public\".\"patient_field_values\"\nwhere definition_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "definition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "definition_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_.7942c868d5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_db3e44e09502980455d7eb94d81dce3a.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_.7942c868d5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_"], "alias": "source_relationships_tamanu_pa_db3e44e09502980455d7eb94d81dce3a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_db3e44e09502980455d7eb94d81dce3a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_db3e44e09502980455d7eb94d81dce3a"}, "created_at": 1775621421.1952646, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_db3e44e09502980455d7eb94d81dce3a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"], ["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions", "source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_relationships_tamanu_pa_db3e44e09502980455d7eb94d81dce3a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select definition_id as from_field\n    from \"central\".\"public\".\"patient_field_values\"\n    where definition_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patient_field_definitions\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "definition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "definition_id", "to": "source('tamanu', 'patient_field_definitions')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_values_patient_id.d726e4e785": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_values_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_values_patient_id.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_values_patient_id.d726e4e785", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_values_patient_id"], "alias": "source_not_null_tamanu_patient_field_values_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2005675, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_not_null_tamanu_patient_field_values_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_field_values\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_.7e29294f59": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_3f7fbf90fc1f177ddd15acc3bef3d52d.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_.7e29294f59", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_3f7fbf90fc1f177ddd15acc3bef3d52d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_3f7fbf90fc1f177ddd15acc3bef3d52d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_3f7fbf90fc1f177ddd15acc3bef3d52d"}, "created_at": 1775621421.2023768, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_3f7fbf90fc1f177ddd15acc3bef3d52d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_relationships_tamanu_pa_3f7fbf90fc1f177ddd15acc3bef3d52d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_field_values\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at_sync_tick.37926ff0c2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_values_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_0863520b9639f783db3b3d362f6a0aa1.sql", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at_sync_tick.37926ff0c2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_values_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_0863520b9639f783db3b3d362f6a0aa1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_0863520b9639f783db3b3d362f6a0aa1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_0863520b9639f783db3b3d362f6a0aa1"}, "created_at": 1775621421.2075677, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_0863520b9639f783db3b3d362f6a0aa1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_values"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_values.yml/source_not_null_tamanu_patient_0863520b9639f783db3b3d362f6a0aa1.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_field_values\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_values')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_referrals_id.724932b7f0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_referrals_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_referrals_id.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_unique_tamanu_referrals_id.724932b7f0", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_referrals_id"], "alias": "source_unique_tamanu_referrals_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.209885, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_unique_tamanu_referrals_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"referrals\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_referrals_id.b643c6e9cf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_referrals_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referrals_id.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_referrals_id.b643c6e9cf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_referrals_id"], "alias": "source_not_null_tamanu_referrals_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2116618, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_not_null_tamanu_referrals_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"referrals\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_referrals_created_at.7dc2e9f62e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_referrals_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referrals_created_at.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_referrals_created_at.7dc2e9f62e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_referrals_created_at"], "alias": "source_not_null_tamanu_referrals_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2133837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_not_null_tamanu_referrals_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"referrals\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_referrals_updated_at.319fc895ee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_referrals_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referrals_updated_at.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_referrals_updated_at.319fc895ee", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_referrals_updated_at"], "alias": "source_not_null_tamanu_referrals_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2152834, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_not_null_tamanu_referrals_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"referrals\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_.e17964499c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_64cd5fa5a35a08b671f81bc8fd3f29e7.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_.e17964499c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_re_64cd5fa5a35a08b671f81bc8fd3f29e7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_64cd5fa5a35a08b671f81bc8fd3f29e7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_64cd5fa5a35a08b671f81bc8fd3f29e7"}, "created_at": 1775621421.2170606, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_64cd5fa5a35a08b671f81bc8fd3f29e7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_relationships_tamanu_re_64cd5fa5a35a08b671f81bc8fd3f29e7.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select initiating_encounter_id as from_field\n    from \"central\".\"public\".\"referrals\"\n    where initiating_encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "initiating_encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "initiating_encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_.dc1e9922b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_442fab802054d8cdc9fe956ad0e3152a.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_.dc1e9922b6", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_re_442fab802054d8cdc9fe956ad0e3152a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_442fab802054d8cdc9fe956ad0e3152a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_442fab802054d8cdc9fe956ad0e3152a"}, "created_at": 1775621421.2224305, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_442fab802054d8cdc9fe956ad0e3152a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_relationships_tamanu_re_442fab802054d8cdc9fe956ad0e3152a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select completing_encounter_id as from_field\n    from \"central\".\"public\".\"referrals\"\n    where completing_encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "completing_encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "completing_encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_.36148d215d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_223c3ab3179233f5d9188adf5d1b12dd.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_.36148d215d", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_"], "alias": "source_relationships_tamanu_re_223c3ab3179233f5d9188adf5d1b12dd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_223c3ab3179233f5d9188adf5d1b12dd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_223c3ab3179233f5d9188adf5d1b12dd"}, "created_at": 1775621421.227381, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_223c3ab3179233f5d9188adf5d1b12dd\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"], ["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses", "source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_relationships_tamanu_re_223c3ab3179233f5d9188adf5d1b12dd.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select survey_response_id as from_field\n    from \"central\".\"public\".\"referrals\"\n    where survey_response_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"survey_responses\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "survey_response_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "survey_response_id", "to": "source('tamanu', 'survey_responses')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_referrals_status.b2da9beb55": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_referrals_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referrals_status.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_referrals_status.b2da9beb55", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_referrals_status"], "alias": "source_not_null_tamanu_referrals_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2324815, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_not_null_tamanu_referrals_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"referrals\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_referrals_status__pending__cancelled__completed.86187bc5c9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_referrals_status__pending__cancelled__completed", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__c7c5c42266d9cf50bc3048ec645a42e4.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_referrals_status__pending__cancelled__completed.86187bc5c9", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_referrals_status__pending__cancelled__completed"], "alias": "source_accepted_values_tamanu__c7c5c42266d9cf50bc3048ec645a42e4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__c7c5c42266d9cf50bc3048ec645a42e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__c7c5c42266d9cf50bc3048ec645a42e4"}, "created_at": 1775621421.2342525, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__c7c5c42266d9cf50bc3048ec645a42e4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_accepted_values_tamanu__c7c5c42266d9cf50bc3048ec645a42e4.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"referrals\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'pending','cancelled','completed'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["pending", "cancelled", "completed"], "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_referrals_updated_at_sync_tick.475afc0dcb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_referrals_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referrals_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_referrals_updated_at_sync_tick.475afc0dcb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_referrals_updated_at_sync_tick"], "alias": "source_not_null_tamanu_referrals_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.239541, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "referrals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.referrals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/referrals.yml/source_not_null_tamanu_referrals_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"referrals\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'referrals')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_request_logs_id.7acd19c7d3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_request_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_request_logs_id.sql", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_request_logs_id.7acd19c7d3", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_request_logs_id"], "alias": "source_unique_tamanu_lab_request_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.241885, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_logs.yml/source_unique_tamanu_lab_request_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_request_logs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_logs_id.fe608e09fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_logs_id.sql", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_logs_id.fe608e09fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_logs_id"], "alias": "source_not_null_tamanu_lab_request_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2436478, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_logs.yml/source_not_null_tamanu_lab_request_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_request_logs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_logs_status.8e024043da": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_logs_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_logs_status.sql", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_logs_status.8e024043da", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_logs_status"], "alias": "source_not_null_tamanu_lab_request_logs_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2461786, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_logs.yml/source_not_null_tamanu_lab_request_logs_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"lab_request_logs\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_.f8e2c6d82e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_1da9ed9e87be39f7e77b64224b7936b4.sql", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_.f8e2c6d82e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_"], "alias": "source_relationships_tamanu_la_1da9ed9e87be39f7e77b64224b7936b4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_1da9ed9e87be39f7e77b64224b7936b4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_1da9ed9e87be39f7e77b64224b7936b4"}, "created_at": 1775621421.2480035, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_1da9ed9e87be39f7e77b64224b7936b4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"], ["tamanu", "lab_request_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.lab_request_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_logs.yml/source_relationships_tamanu_la_1da9ed9e87be39f7e77b64224b7936b4.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_request_id as from_field\n    from \"central\".\"public\".\"lab_request_logs\"\n    where lab_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_request_id", "to": "source('tamanu', 'lab_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_.86e7966883": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_7d0fff009413fe5bf5040529bcc5bd55.sql", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_.86e7966883", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_la_7d0fff009413fe5bf5040529bcc5bd55", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_7d0fff009413fe5bf5040529bcc5bd55", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_7d0fff009413fe5bf5040529bcc5bd55"}, "created_at": 1775621421.2530115, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_7d0fff009413fe5bf5040529bcc5bd55\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "lab_request_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.lab_request_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_logs.yml/source_relationships_tamanu_la_7d0fff009413fe5bf5040529bcc5bd55.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select updated_by_id as from_field\n    from \"central\".\"public\".\"lab_request_logs\"\n    where updated_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "updated_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.960428a44f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_logs_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.960428a44f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_logs_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_request_logs_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2580872, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_logs.yml/source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_request_logs\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_logs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_leaves_id.f9fb006fa5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_leaves_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_leaves_id.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_leaves_id.f9fb006fa5", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_leaves_id"], "alias": "source_unique_tamanu_user_leaves_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.260356, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_unique_tamanu_user_leaves_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_leaves\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_id.3c0b468b6b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_id.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_id.3c0b468b6b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_id"], "alias": "source_not_null_tamanu_user_leaves_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2622707, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_leaves\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_start_date.a4376146d4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_start_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_start_date.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_start_date.a4376146d4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_start_date"], "alias": "source_not_null_tamanu_user_leaves_start_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2640367, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_start_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect start_date\nfrom \"central\".\"public\".\"user_leaves\"\nwhere start_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "start_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_date", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_end_date.69c42bf7d9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_end_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_end_date.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_end_date.69c42bf7d9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_end_date"], "alias": "source_not_null_tamanu_user_leaves_end_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2657526, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_end_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect end_date\nfrom \"central\".\"public\".\"user_leaves\"\nwhere end_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "end_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_date", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_user_id.df71d24528": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_user_id.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_user_id.df71d24528", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_user_id"], "alias": "source_not_null_tamanu_user_leaves_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.267472, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"user_leaves\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_created_at.638cb66e18": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_created_at.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_created_at.638cb66e18", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_created_at"], "alias": "source_not_null_tamanu_user_leaves_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.269181, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"user_leaves\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_updated_at.045e6c9ad2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_updated_at.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_updated_at.045e6c9ad2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_updated_at"], "alias": "source_not_null_tamanu_user_leaves_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.270942, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"user_leaves\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_leaves_updated_at_sync_tick.05dfeae565": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_leaves_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_leaves_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_leaves_updated_at_sync_tick.05dfeae565", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_leaves_updated_at_sync_tick"], "alias": "source_not_null_tamanu_user_leaves_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2727983, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_leaves"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_leaves"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_leaves.yml/source_not_null_tamanu_user_leaves_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"user_leaves\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'user_leaves')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_designations_id.85f719d07a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_designations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_designations_id.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_designations_id.85f719d07a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_designations_id"], "alias": "source_unique_tamanu_user_designations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2750711, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_unique_tamanu_user_designations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_designations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_designations_id.be521369b8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_designations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_designations_id.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_designations_id.be521369b8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_designations_id"], "alias": "source_not_null_tamanu_user_designations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2768102, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_not_null_tamanu_user_designations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_designations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_designations_user_id.2b15af1d80": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_designations_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_designations_user_id.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_designations_user_id.2b15af1d80", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_designations_user_id"], "alias": "source_not_null_tamanu_user_designations_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2785282, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_not_null_tamanu_user_designations_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"user_designations\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_designations_designation_id.f9b573eeb8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_designations_designation_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_designations_designation_id.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_designations_designation_id.f9b573eeb8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_designations_designation_id"], "alias": "source_not_null_tamanu_user_designations_designation_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.280392, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_not_null_tamanu_user_designations_designation_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect designation_id\nfrom \"central\".\"public\".\"user_designations\"\nwhere designation_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "designation_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "designation_id", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_designations_created_at.db3f67069a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_designations_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_designations_created_at.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_designations_created_at.db3f67069a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_designations_created_at"], "alias": "source_not_null_tamanu_user_designations_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2821097, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_not_null_tamanu_user_designations_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"user_designations\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_designations_updated_at.4bbf71e0b0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_designations_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_designations_updated_at.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_designations_updated_at.4bbf71e0b0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_designations_updated_at"], "alias": "source_not_null_tamanu_user_designations_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2838328, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_not_null_tamanu_user_designations_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"user_designations\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_designations_updated_at_sync_tick.934bc4ad06": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_designations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_designations_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_designations_updated_at_sync_tick.934bc4ad06", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_designations_updated_at_sync_tick"], "alias": "source_not_null_tamanu_user_designations_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2856305, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_designations.yml/source_not_null_tamanu_user_designations_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"user_designations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'user_designations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_field_definitions_id.96d277b7c5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_field_definitions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_field_definitions_id.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_field_definitions_id.96d277b7c5", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_field_definitions_id"], "alias": "source_unique_tamanu_patient_field_definitions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2879448, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_unique_tamanu_patient_field_definitions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_id.3b31aed01d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definitions_id.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_id.3b31aed01d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_id"], "alias": "source_not_null_tamanu_patient_field_definitions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.289818, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_field_definitions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_created_at.b7c144e251": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definitions_created_at.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_created_at.b7c144e251", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_created_at"], "alias": "source_not_null_tamanu_patient_field_definitions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2915556, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_field_definitions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at.812399208c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definitions_updated_at.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at.812399208c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_updated_at"], "alias": "source_not_null_tamanu_patient_field_definitions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.293281, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_field_definitions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_name.a1fb4fbbdb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definitions_name.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_name.a1fb4fbbdb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_name"], "alias": "source_not_null_tamanu_patient_field_definitions_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2950044, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_field_definitions_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_field_type.01dad44ce8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_field_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definitions_field_type.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_field_type.01dad44ce8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_field_type"], "alias": "source_not_null_tamanu_patient_field_definitions_field_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.2967207, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_field_definitions_field_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect field_type\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere field_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "field_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "field_type", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select.8c8193f02d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__647dccd3ebadda4cb5ff363cb8ca1df8.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select.8c8193f02d", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select"], "alias": "source_accepted_values_tamanu__647dccd3ebadda4cb5ff363cb8ca1df8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__647dccd3ebadda4cb5ff363cb8ca1df8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__647dccd3ebadda4cb5ff363cb8ca1df8"}, "created_at": 1775621421.2986133, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__647dccd3ebadda4cb5ff363cb8ca1df8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_accepted_values_tamanu__647dccd3ebadda4cb5ff363cb8ca1df8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        field_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_field_definitions\"\n    group by field_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'string','number','select'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "field_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "field_type", "values": ["string", "number", "select"], "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_visibility_status.353a97d1ea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_0fcc98fd8e5e9a2ddfd940e18b8b19f9.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_visibility_status.353a97d1ea", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_visibility_status"], "alias": "source_not_null_tamanu_patient_0fcc98fd8e5e9a2ddfd940e18b8b19f9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_0fcc98fd8e5e9a2ddfd940e18b8b19f9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_0fcc98fd8e5e9a2ddfd940e18b8b19f9"}, "created_at": 1775621421.3040726, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_0fcc98fd8e5e9a2ddfd940e18b8b19f9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_0fcc98fd8e5e9a2ddfd940e18b8b19f9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_category_id.5bb661f0af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_category_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definitions_category_id.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_category_id.5bb661f0af", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_category_id"], "alias": "source_not_null_tamanu_patient_field_definitions_category_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3058405, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_field_definitions_category_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect category_id\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere category_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "category_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_.d67c1014d6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_05825c695ad9d98106c4064c94940236.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_.d67c1014d6", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_"], "alias": "source_relationships_tamanu_pa_05825c695ad9d98106c4064c94940236", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_05825c695ad9d98106c4064c94940236", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_05825c695ad9d98106c4064c94940236"}, "created_at": 1775621421.3078582, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_05825c695ad9d98106c4064c94940236\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"], ["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories", "source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_relationships_tamanu_pa_05825c695ad9d98106c4064c94940236.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select category_id as from_field\n    from \"central\".\"public\".\"patient_field_definitions\"\n    where category_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patient_field_definition_categories\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "category_id", "to": "source('tamanu', 'patient_field_definition_categories')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick.9334037106": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_bf8623e34945acb417bde3547a7bb00d.sql", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick.9334037106", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_bf8623e34945acb417bde3547a7bb00d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_bf8623e34945acb417bde3547a7bb00d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_bf8623e34945acb417bde3547a7bb00d"}, "created_at": 1775621421.3129168, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_bf8623e34945acb417bde3547a7bb00d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definitions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definitions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definitions.yml/source_not_null_tamanu_patient_bf8623e34945acb417bde3547a7bb00d.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_field_definitions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definitions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_test_types_id.59d45fd4c8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_test_types_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_test_types_id.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_test_types_id.59d45fd4c8", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_test_types_id"], "alias": "source_unique_tamanu_lab_test_types_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3154519, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_unique_tamanu_lab_test_types_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_id.0d085cde9d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_id.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_id.0d085cde9d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_id"], "alias": "source_not_null_tamanu_lab_test_types_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3172357, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_created_at.6a4f074401": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_created_at.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_created_at.6a4f074401", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_created_at"], "alias": "source_not_null_tamanu_lab_test_types_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3189824, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at.34e9cce3fa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_updated_at.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at.34e9cce3fa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_updated_at"], "alias": "source_not_null_tamanu_lab_test_types_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.320731, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_code.84b27e0faa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_code.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_code.84b27e0faa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_code"], "alias": "source_not_null_tamanu_lab_test_types_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3224564, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_name.87dee5eabd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_name.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_name.87dee5eabd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_name"], "alias": "source_not_null_tamanu_lab_test_types_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3243423, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_unit.953f194d89": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_unit", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_unit.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_unit.953f194d89", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_unit"], "alias": "source_not_null_tamanu_lab_test_types_unit", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.326315, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_unit.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect unit\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere unit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "unit", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "unit", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_result_type.a33f1d56c0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_result_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_result_type.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_result_type.a33f1d56c0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_result_type"], "alias": "source_not_null_tamanu_lab_test_types_result_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3284743, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_result_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect result_type\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere result_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "result_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "result_type", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select.e7c22c9eca": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__0cd3a79c9e7278d80974fb3dd210be4c.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select.e7c22c9eca", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select"], "alias": "source_accepted_values_tamanu__0cd3a79c9e7278d80974fb3dd210be4c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__0cd3a79c9e7278d80974fb3dd210be4c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__0cd3a79c9e7278d80974fb3dd210be4c"}, "created_at": 1775621421.3306499, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__0cd3a79c9e7278d80974fb3dd210be4c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_accepted_values_tamanu__0cd3a79c9e7278d80974fb3dd210be4c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        result_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"lab_test_types\"\n    group by result_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'FreeText','Number','Select'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "result_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "result_type", "values": ["FreeText", "Number", "Select"], "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.8034332af4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_d4aa985574aba386fb94444533fe0253.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.8034332af4", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_"], "alias": "dbt_utils_source_relationships_d4aa985574aba386fb94444533fe0253", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_d4aa985574aba386fb94444533fe0253", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_d4aa985574aba386fb94444533fe0253"}, "created_at": 1775621421.3367531, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_d4aa985574aba386fb94444533fe0253\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/dbt_utils_source_relationships_d4aa985574aba386fb94444533fe0253.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    lab_test_category_id as id\n\n  from \"central\".\"public\".\"lab_test_types\"\n\n  where lab_test_category_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestCategory'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "lab_test_category_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labTestCategory'", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at_sync_tick.f5cbb064a4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at_sync_tick.f5cbb064a4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_test_types_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.342398, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_types_is_sensitive.7905ffff94": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_types_is_sensitive", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_types_is_sensitive.sql", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_types_is_sensitive.7905ffff94", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_types_is_sensitive"], "alias": "source_not_null_tamanu_lab_test_types_is_sensitive", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.344227, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_types.yml/source_not_null_tamanu_lab_test_types_is_sensitive.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_sensitive\nfrom \"central\".\"public\".\"lab_test_types\"\nwhere is_sensitive is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_sensitive", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_sensitive", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_prescriptions_id.e43fe53647": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_prescriptions_id.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_unique_tamanu_prescriptions_id.e43fe53647", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_prescriptions_id"], "alias": "source_unique_tamanu_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3466592, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_unique_tamanu_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"prescriptions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_id.acb2ebf90d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_id.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_id.acb2ebf90d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_id"], "alias": "source_not_null_tamanu_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3483973, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"prescriptions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_created_at.ce02db9537": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_created_at.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_created_at.ce02db9537", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_created_at"], "alias": "source_not_null_tamanu_prescriptions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3507903, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"prescriptions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_updated_at.db8ce11745": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_updated_at.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_updated_at.db8ce11745", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_updated_at"], "alias": "source_not_null_tamanu_prescriptions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.352507, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"prescriptions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_date.a2e0f3a811": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_date.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_date.a2e0f3a811", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_date"], "alias": "source_not_null_tamanu_prescriptions_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3542655, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"prescriptions\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_units.04b2e47d71": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_units", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_units.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_units.04b2e47d71", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_units"], "alias": "source_not_null_tamanu_prescriptions_units", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3559575, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_units.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect units\nfrom \"central\".\"public\".\"prescriptions\"\nwhere units is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "units", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "units", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_frequency.387650c017": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_frequency", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_frequency.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_frequency.387650c017", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_frequency"], "alias": "source_not_null_tamanu_prescriptions_frequency", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3579037, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_frequency.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect frequency\nfrom \"central\".\"public\".\"prescriptions\"\nwhere frequency is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "frequency", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "frequency", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_start_date.6b47c62ca9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_start_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_start_date.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_start_date.6b47c62ca9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_start_date"], "alias": "source_not_null_tamanu_prescriptions_start_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3598006, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_start_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect start_date\nfrom \"central\".\"public\".\"prescriptions\"\nwhere start_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "start_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_date", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_prescriptions_updated_at_sync_tick.ccc1aacb8b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_prescriptions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_prescriptions_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_prescriptions_updated_at_sync_tick.ccc1aacb8b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_prescriptions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_prescriptions_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3615098, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/prescriptions.yml/source_not_null_tamanu_prescriptions_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"prescriptions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_medication_dispenses_id.3794f39031": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_medication_dispenses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_medication_dispenses_id.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_unique_tamanu_medication_dispenses_id.3794f39031", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_medication_dispenses_id"], "alias": "source_unique_tamanu_medication_dispenses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.364028, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_unique_tamanu_medication_dispenses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_id.4e57f1d462": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_dispenses_id.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_id.4e57f1d462", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_id"], "alias": "source_not_null_tamanu_medication_dispenses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3659232, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medication_dispenses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id.d4c0bafee8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_47baa946e9a0beae34756784753e1b88.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id.d4c0bafee8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id"], "alias": "source_not_null_tamanu_medicat_47baa946e9a0beae34756784753e1b88", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_47baa946e9a0beae34756784753e1b88", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_47baa946e9a0beae34756784753e1b88"}, "created_at": 1775621421.3677006, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_47baa946e9a0beae34756784753e1b88\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medicat_47baa946e9a0beae34756784753e1b88.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect pharmacy_order_prescription_id\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere pharmacy_order_prescription_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pharmacy_order_prescription_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pharmacy_order_prescription_id", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_quantity.362d1d5f50": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_quantity", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_dispenses_quantity.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_quantity.362d1d5f50", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_quantity"], "alias": "source_not_null_tamanu_medication_dispenses_quantity", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.369411, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medication_dispenses_quantity.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect quantity\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere quantity is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "quantity", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "quantity", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_by_user_id.afdbe34024": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_dispensed_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_f81e17293bfdca9c7eb30fc5637bc91c.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_by_user_id.afdbe34024", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_dispensed_by_user_id"], "alias": "source_not_null_tamanu_medicat_f81e17293bfdca9c7eb30fc5637bc91c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_f81e17293bfdca9c7eb30fc5637bc91c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_f81e17293bfdca9c7eb30fc5637bc91c"}, "created_at": 1775621421.3712027, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_f81e17293bfdca9c7eb30fc5637bc91c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medicat_f81e17293bfdca9c7eb30fc5637bc91c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect dispensed_by_user_id\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere dispensed_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "dispensed_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "dispensed_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_at.515dc80dcb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_dispensed_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_dispenses_dispensed_at.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_at.515dc80dcb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_dispensed_at"], "alias": "source_not_null_tamanu_medication_dispenses_dispensed_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3729446, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medication_dispenses_dispensed_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect dispensed_at\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere dispensed_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "dispensed_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "dispensed_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_created_at.e8d7e87757": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_dispenses_created_at.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_created_at.e8d7e87757", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_created_at"], "alias": "source_not_null_tamanu_medication_dispenses_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.374795, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medication_dispenses_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at.76e722a377": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medication_dispenses_updated_at.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at.76e722a377", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_updated_at"], "alias": "source_not_null_tamanu_medication_dispenses_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.376493, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medication_dispenses_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at_sync_tick.463ee92e91": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_dispenses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_30a58ea07fb61d44cfdff2fbf2097794.sql", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at_sync_tick.463ee92e91", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_dispenses_updated_at_sync_tick"], "alias": "source_not_null_tamanu_medicat_30a58ea07fb61d44cfdff2fbf2097794", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_30a58ea07fb61d44cfdff2fbf2097794", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_30a58ea07fb61d44cfdff2fbf2097794"}, "created_at": 1775621421.3782203, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_30a58ea07fb61d44cfdff2fbf2097794\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_dispenses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_dispenses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_dispenses.yml/source_not_null_tamanu_medicat_30a58ea07fb61d44cfdff2fbf2097794.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"medication_dispenses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'medication_dispenses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounters_id.6da54b7f38": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounters_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounters_id.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounters_id.6da54b7f38", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounters_id"], "alias": "source_unique_tamanu_encounters_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3804967, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_unique_tamanu_encounters_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounters\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_id.3d82b88759": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_id.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_id.3d82b88759", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_id"], "alias": "source_not_null_tamanu_encounters_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3822281, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounters\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_created_at.5a9caa2a2b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_created_at.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_created_at.5a9caa2a2b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_created_at"], "alias": "source_not_null_tamanu_encounters_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3840907, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounters\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_updated_at.65ef63b763": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_updated_at.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_updated_at.65ef63b763", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_updated_at"], "alias": "source_not_null_tamanu_encounters_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.385859, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounters\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_encounter_type.169507cb50": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_encounter_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_encounter_type.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_encounter_type.169507cb50", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_encounter_type"], "alias": "source_not_null_tamanu_encounters_encounter_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3875828, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_encounter_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_type\nfrom \"central\".\"public\".\"encounters\"\nwhere encounter_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_type", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.6454543933": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__7eaef115e1c2591f32bf0f19f4fb31ee.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.6454543933", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination"], "alias": "source_accepted_values_tamanu__7eaef115e1c2591f32bf0f19f4fb31ee", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__7eaef115e1c2591f32bf0f19f4fb31ee", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__7eaef115e1c2591f32bf0f19f4fb31ee"}, "created_at": 1775621421.3893354, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__7eaef115e1c2591f32bf0f19f4fb31ee\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_accepted_values_tamanu__7eaef115e1c2591f32bf0f19f4fb31ee.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        encounter_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"encounters\"\n    group by encounter_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'admission','clinic','imaging','emergency','observation','triage','surveyResponse','vaccination'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "encounter_type", "values": ["admission", "clinic", "imaging", "emergency", "observation", "triage", "surveyResponse", "vaccination"], "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_start_date.a5dec75857": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_start_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_start_date.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_start_date.a5dec75857", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_start_date"], "alias": "source_not_null_tamanu_encounters_start_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.3966684, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_start_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect start_date\nfrom \"central\".\"public\".\"encounters\"\nwhere start_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "start_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_date", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_patient_id.14f6d7e7fb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_patient_id.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_patient_id.14f6d7e7fb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_patient_id"], "alias": "source_not_null_tamanu_encounters_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.398405, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"encounters\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_.86e006efba": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_13180f1fedec4cce1227952402808020.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_.86e006efba", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_en_13180f1fedec4cce1227952402808020", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_13180f1fedec4cce1227952402808020", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_13180f1fedec4cce1227952402808020"}, "created_at": 1775621421.4004061, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_13180f1fedec4cce1227952402808020\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_relationships_tamanu_en_13180f1fedec4cce1227952402808020.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"encounters\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_.1a33a59a12": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_fa630f610d6086e732a416e5b1276f87.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_.1a33a59a12", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_en_fa630f610d6086e732a416e5b1276f87", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_fa630f610d6086e732a416e5b1276f87", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_fa630f610d6086e732a416e5b1276f87"}, "created_at": 1775621421.405547, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_fa630f610d6086e732a416e5b1276f87\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_relationships_tamanu_en_fa630f610d6086e732a416e5b1276f87.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select examiner_id as from_field\n    from \"central\".\"public\".\"encounters\"\n    where examiner_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "examiner_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "examiner_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_.37f810a377": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_15328f119f64994547fe5431151c4a64.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_.37f810a377", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_"], "alias": "source_relationships_tamanu_en_15328f119f64994547fe5431151c4a64", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_15328f119f64994547fe5431151c4a64", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_15328f119f64994547fe5431151c4a64"}, "created_at": 1775621421.4106672, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_15328f119f64994547fe5431151c4a64\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_relationships_tamanu_en_15328f119f64994547fe5431151c4a64.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_id as from_field\n    from \"central\".\"public\".\"encounters\"\n    where location_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"locations\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_id", "to": "source('tamanu', 'locations')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_.54b3d36175": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_aa33f1d99fa13a8f6975b43607c710d4.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_.54b3d36175", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_"], "alias": "source_relationships_tamanu_en_aa33f1d99fa13a8f6975b43607c710d4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_aa33f1d99fa13a8f6975b43607c710d4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_aa33f1d99fa13a8f6975b43607c710d4"}, "created_at": 1775621421.4158273, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_aa33f1d99fa13a8f6975b43607c710d4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_relationships_tamanu_en_aa33f1d99fa13a8f6975b43607c710d4.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select department_id as from_field\n    from \"central\".\"public\".\"encounters\"\n    where department_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"departments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "department_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "department_id", "to": "source('tamanu', 'departments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_.ecb4200032": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_2fdae708756336ea20481808cae08a6c.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_.ecb4200032", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_"], "alias": "dbt_utils_source_relationships_2fdae708756336ea20481808cae08a6c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_2fdae708756336ea20481808cae08a6c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_2fdae708756336ea20481808cae08a6c"}, "created_at": 1775621421.4207282, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_2fdae708756336ea20481808cae08a6c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/dbt_utils_source_relationships_2fdae708756336ea20481808cae08a6c.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    patient_billing_type_id as id\n\n  from \"central\".\"public\".\"encounters\"\n\n  where patient_billing_type_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'patientBillingType'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_billing_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "patient_billing_type_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'patientBillingType'", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_.6759a4eea9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_75b30552533a9e6287e5c800df205ee9.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_.6759a4eea9", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_"], "alias": "dbt_utils_source_relationships_75b30552533a9e6287e5c800df205ee9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_75b30552533a9e6287e5c800df205ee9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_75b30552533a9e6287e5c800df205ee9"}, "created_at": 1775621421.4262493, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_75b30552533a9e6287e5c800df205ee9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/dbt_utils_source_relationships_75b30552533a9e6287e5c800df205ee9.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    referral_source_id as id\n\n  from \"central\".\"public\".\"encounters\"\n\n  where referral_source_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'referralSource'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "referral_source_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "referral_source_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'referralSource'", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_.b6110183f5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_c0792930ba61c5b0fc342a964d525e64.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_.b6110183f5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_"], "alias": "source_relationships_tamanu_en_c0792930ba61c5b0fc342a964d525e64", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_c0792930ba61c5b0fc342a964d525e64", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_c0792930ba61c5b0fc342a964d525e64"}, "created_at": 1775621421.431753, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_c0792930ba61c5b0fc342a964d525e64\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"], ["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_relationships_tamanu_en_c0792930ba61c5b0fc342a964d525e64.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select planned_location_id as from_field\n    from \"central\".\"public\".\"encounters\"\n    where planned_location_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"locations\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "planned_location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "planned_location_id", "to": "source('tamanu', 'locations')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounters_updated_at_sync_tick.1eb037d2f2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounters_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounters_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounters_updated_at_sync_tick.1eb037d2f2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounters_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encounters_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4366615, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounters.yml/source_not_null_tamanu_encounters_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounters\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounters')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounter_diets_id.da8f18a027": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounter_diets_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounter_diets_id.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounter_diets_id.da8f18a027", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounter_diets_id"], "alias": "source_unique_tamanu_encounter_diets_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4392593, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_unique_tamanu_encounter_diets_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diets_id.d0805612f7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diets_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diets_id.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diets_id.d0805612f7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diets_id"], "alias": "source_not_null_tamanu_encounter_diets_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.44104, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_not_null_tamanu_encounter_diets_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diets_encounter_id.56ca3f2a1c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diets_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diets_encounter_id.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diets_encounter_id.56ca3f2a1c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diets_encounter_id"], "alias": "source_not_null_tamanu_encounter_diets_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.442781, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_not_null_tamanu_encounter_diets_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_.90c10b0836": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_da32df47fb0ce149fa086a1f9e3a6b77.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_.90c10b0836", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_en_da32df47fb0ce149fa086a1f9e3a6b77", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_da32df47fb0ce149fa086a1f9e3a6b77", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_da32df47fb0ce149fa086a1f9e3a6b77"}, "created_at": 1775621421.4445293, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_da32df47fb0ce149fa086a1f9e3a6b77\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_relationships_tamanu_en_da32df47fb0ce149fa086a1f9e3a6b77.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"encounter_diets\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diets_diet_id.f096ba53ad": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diets_diet_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diets_diet_id.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diets_diet_id.f096ba53ad", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diets_diet_id"], "alias": "source_not_null_tamanu_encounter_diets_diet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.450094, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_not_null_tamanu_encounter_diets_diet_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect diet_id\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere diet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "diet_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "diet_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_.e71c59d77d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_dc70639bcbbd060dff898102909054b3.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_.e71c59d77d", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_"], "alias": "dbt_utils_source_relationships_dc70639bcbbd060dff898102909054b3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_dc70639bcbbd060dff898102909054b3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_dc70639bcbbd060dff898102909054b3"}, "created_at": 1775621421.4518945, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_dc70639bcbbd060dff898102909054b3\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/dbt_utils_source_relationships_dc70639bcbbd060dff898102909054b3.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    diet_id as id\n\n  from \"central\".\"public\".\"encounter_diets\"\n\n  where diet_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diet'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "diet_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "diet_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diet'", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_encounter_diets_created_at.0f3c391127": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diets_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diets_created_at.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diets_created_at.0f3c391127", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diets_created_at"], "alias": "source_not_null_tamanu_encounter_diets_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4573703, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_not_null_tamanu_encounter_diets_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at.1a3c4fcb7f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diets_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diets_updated_at.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at.1a3c4fcb7f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diets_updated_at"], "alias": "source_not_null_tamanu_encounter_diets_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.459142, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_not_null_tamanu_encounter_diets_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at_sync_tick.1e9301afae": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diets_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diets_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at_sync_tick.1e9301afae", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diets_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encounter_diets_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4608767, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diets.yml/source_not_null_tamanu_encounter_diets_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounter_diets\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diets')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounter_diagnoses_id.d52ee9adc9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounter_diagnoses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounter_diagnoses_id.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounter_diagnoses_id.d52ee9adc9", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounter_diagnoses_id"], "alias": "source_unique_tamanu_encounter_diagnoses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4633586, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_unique_tamanu_encounter_diagnoses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounter_diagnoses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diagnoses_id.5010c4db2d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diagnoses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diagnoses_id.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diagnoses_id.5010c4db2d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diagnoses_id"], "alias": "source_not_null_tamanu_encounter_diagnoses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4651046, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_not_null_tamanu_encounter_diagnoses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounter_diagnoses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diagnoses_created_at.2e0c2e1d40": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diagnoses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diagnoses_created_at.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diagnoses_created_at.2e0c2e1d40", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diagnoses_created_at"], "alias": "source_not_null_tamanu_encounter_diagnoses_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4668484, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_not_null_tamanu_encounter_diagnoses_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounter_diagnoses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at.e843942ea8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diagnoses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diagnoses_updated_at.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at.e843942ea8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diagnoses_updated_at"], "alias": "source_not_null_tamanu_encounter_diagnoses_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4685683, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_not_null_tamanu_encounter_diagnoses_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounter_diagnoses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected.9dcc845ca8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__f61fadc6be341257d0b9f42ad8a8790e.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected.9dcc845ca8", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected"], "alias": "source_accepted_values_tamanu__f61fadc6be341257d0b9f42ad8a8790e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__f61fadc6be341257d0b9f42ad8a8790e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__f61fadc6be341257d0b9f42ad8a8790e"}, "created_at": 1775621421.4703379, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__f61fadc6be341257d0b9f42ad8a8790e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_accepted_values_tamanu__f61fadc6be341257d0b9f42ad8a8790e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        certainty as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"encounter_diagnoses\"\n    group by certainty\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'confirmed','disproven','emergency','error','suspected'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "certainty", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "certainty", "values": ["confirmed", "disproven", "emergency", "error", "suspected"], "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_diagnoses_date.3cb9b9f92a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diagnoses_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diagnoses_date.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diagnoses_date.3cb9b9f92a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diagnoses_date"], "alias": "source_not_null_tamanu_encounter_diagnoses_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4759574, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_not_null_tamanu_encounter_diagnoses_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"encounter_diagnoses\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_.16e875a59a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_b2c0dc464fc3d89a0b1353f3d4d04712.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_.16e875a59a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_en_b2c0dc464fc3d89a0b1353f3d4d04712", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_b2c0dc464fc3d89a0b1353f3d4d04712", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_b2c0dc464fc3d89a0b1353f3d4d04712"}, "created_at": 1775621421.477728, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_b2c0dc464fc3d89a0b1353f3d4d04712\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_relationships_tamanu_en_b2c0dc464fc3d89a0b1353f3d4d04712.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"encounter_diagnoses\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.6536f09069": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_399bad9887181d803b77782bbd98d536.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.6536f09069", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_399bad9887181d803b77782bbd98d536", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_399bad9887181d803b77782bbd98d536", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_399bad9887181d803b77782bbd98d536"}, "created_at": 1775621421.4832366, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_399bad9887181d803b77782bbd98d536\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/dbt_utils_source_relationships_399bad9887181d803b77782bbd98d536.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    diagnosis_id as id\n\n  from \"central\".\"public\".\"encounter_diagnoses\"\n\n  where diagnosis_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "diagnosis_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "diagnosis_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.82fe91df26": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.82fe91df26", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.488826, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounter_diagnoses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_.98d7d9c464": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_2e0be5ad3d30c46eef8e1b02e4319e5b.sql", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_.98d7d9c464", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_en_2e0be5ad3d30c46eef8e1b02e4319e5b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_2e0be5ad3d30c46eef8e1b02e4319e5b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_2e0be5ad3d30c46eef8e1b02e4319e5b"}, "created_at": 1775621421.490612, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_2e0be5ad3d30c46eef8e1b02e4319e5b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "encounter_diagnoses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.encounter_diagnoses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_diagnoses.yml/source_relationships_tamanu_en_2e0be5ad3d30c46eef8e1b02e4319e5b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select clinician_id as from_field\n    from \"central\".\"public\".\"encounter_diagnoses\"\n    where clinician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "clinician_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_diagnoses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_data_elements_id.a75c7468d4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_data_elements_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_data_elements_id.sql", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_data_elements_id.a75c7468d4", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_data_elements_id"], "alias": "source_unique_tamanu_program_data_elements_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4964914, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_data_elements.yml/source_unique_tamanu_program_data_elements_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_data_elements\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_data_elements')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_data_elements_id.0e73c12f56": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_data_elements_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_data_elements_id.sql", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_data_elements_id.0e73c12f56", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_data_elements_id"], "alias": "source_not_null_tamanu_program_data_elements_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4982653, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_data_elements.yml/source_not_null_tamanu_program_data_elements_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"program_data_elements\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_data_elements')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_data_elements_created_at.3a9a1d2f6d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_data_elements_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_data_elements_created_at.sql", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_data_elements_created_at.3a9a1d2f6d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_data_elements_created_at"], "alias": "source_not_null_tamanu_program_data_elements_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.4999764, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_data_elements.yml/source_not_null_tamanu_program_data_elements_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"program_data_elements\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'program_data_elements')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at.3f3cecdcc3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_data_elements_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_data_elements_updated_at.sql", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at.3f3cecdcc3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_data_elements_updated_at"], "alias": "source_not_null_tamanu_program_data_elements_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5016787, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_data_elements.yml/source_not_null_tamanu_program_data_elements_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"program_data_elements\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'program_data_elements')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_data_elements_type.5a4507db5e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_data_elements_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_data_elements_type.sql", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_data_elements_type.5a4507db5e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_data_elements_type"], "alias": "source_not_null_tamanu_program_data_elements_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5035543, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_data_elements.yml/source_not_null_tamanu_program_data_elements_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"program_data_elements\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'program_data_elements')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at_sync_tick.d9577c2030": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_data_elements_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_967fbe5ed50fe5c4f87e3432726d5824.sql", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at_sync_tick.d9577c2030", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_data_elements_updated_at_sync_tick"], "alias": "source_not_null_tamanu_program_967fbe5ed50fe5c4f87e3432726d5824", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_967fbe5ed50fe5c4f87e3432726d5824", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_967fbe5ed50fe5c4f87e3432726d5824"}, "created_at": 1775621421.505289, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_967fbe5ed50fe5c4f87e3432726d5824\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_data_elements.yml/source_not_null_tamanu_program_967fbe5ed50fe5c4f87e3432726d5824.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"program_data_elements\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'program_data_elements')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_birth_data_created_at.ee3353eccc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_birth_data_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_birth_data_created_at.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_birth_data_created_at.ee3353eccc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_birth_data_created_at"], "alias": "source_not_null_tamanu_patient_birth_data_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5075543, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_not_null_tamanu_patient_birth_data_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_birth_data\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at.96f99396c0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_birth_data_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_birth_data_updated_at.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at.96f99396c0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_birth_data_updated_at"], "alias": "source_not_null_tamanu_patient_birth_data_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5092888, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_not_null_tamanu_patient_birth_data_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_birth_data\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_birth_data_patient_id.8e97708df0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_birth_data_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_birth_data_patient_id.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_birth_data_patient_id.8e97708df0", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_birth_data_patient_id"], "alias": "source_unique_tamanu_patient_birth_data_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.511093, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_unique_tamanu_patient_birth_data_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    patient_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_birth_data\"\nwhere patient_id is not null\ngroup by patient_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_birth_data_patient_id.7c9d7da294": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_birth_data_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_birth_data_patient_id.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_birth_data_patient_id.7c9d7da294", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_birth_data_patient_id"], "alias": "source_not_null_tamanu_patient_birth_data_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5128155, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_not_null_tamanu_patient_birth_data_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_birth_data\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_.535a68dcb7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_a97094180131721392cbf0084cd905db.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_.535a68dcb7", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_a97094180131721392cbf0084cd905db", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_a97094180131721392cbf0084cd905db", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_a97094180131721392cbf0084cd905db"}, "created_at": 1775621421.5145245, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_a97094180131721392cbf0084cd905db\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_relationships_tamanu_pa_a97094180131721392cbf0084cd905db.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_birth_data\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other.cdd88bca26": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__037f97ec5370d6769dbd07e322c6a388.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other.cdd88bca26", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other"], "alias": "source_accepted_values_tamanu__037f97ec5370d6769dbd07e322c6a388", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__037f97ec5370d6769dbd07e322c6a388", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__037f97ec5370d6769dbd07e322c6a388"}, "created_at": 1775621421.519926, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__037f97ec5370d6769dbd07e322c6a388\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_accepted_values_tamanu__037f97ec5370d6769dbd07e322c6a388.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        birth_delivery_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_birth_data\"\n    group by birth_delivery_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'normal_vaginal_delivery','breech','emergency_c_section','elective_c_section','vacuum_extraction','forceps','other'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "birth_delivery_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "birth_delivery_type", "values": ["normal_vaginal_delivery", "breech", "emergency_c_section", "elective_c_section", "vacuum_extraction", "forceps", "other"], "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other.f7dbbb7dc8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__124e108606f5539f08e5560007bb0d80.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other.f7dbbb7dc8", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other"], "alias": "source_accepted_values_tamanu__124e108606f5539f08e5560007bb0d80", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__124e108606f5539f08e5560007bb0d80", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__124e108606f5539f08e5560007bb0d80"}, "created_at": 1775621421.5266194, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__124e108606f5539f08e5560007bb0d80\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_accepted_values_tamanu__124e108606f5539f08e5560007bb0d80.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        attendant_at_birth as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_birth_data\"\n    group by attendant_at_birth\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'doctor','midwife','nurse','traditional_birth_attentdant','other'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "attendant_at_birth", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "attendant_at_birth", "values": ["doctor", "midwife", "nurse", "traditional_birth_attentdant", "other"], "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_.41f2b0a645": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_e52e0cc4c4153926072096e04ffbc86a.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_.41f2b0a645", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_pa_e52e0cc4c4153926072096e04ffbc86a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_e52e0cc4c4153926072096e04ffbc86a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_e52e0cc4c4153926072096e04ffbc86a"}, "created_at": 1775621421.5321643, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_e52e0cc4c4153926072096e04ffbc86a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_relationships_tamanu_pa_e52e0cc4c4153926072096e04ffbc86a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select birth_facility_id as from_field\n    from \"central\".\"public\".\"patient_birth_data\"\n    where birth_facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "birth_facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "birth_facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other.68a09fae97": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__ca28a69286629dfa94d0afaacacd7a6f.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other.68a09fae97", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other"], "alias": "source_accepted_values_tamanu__ca28a69286629dfa94d0afaacacd7a6f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__ca28a69286629dfa94d0afaacacd7a6f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__ca28a69286629dfa94d0afaacacd7a6f"}, "created_at": 1775621421.5372071, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__ca28a69286629dfa94d0afaacacd7a6f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_accepted_values_tamanu__ca28a69286629dfa94d0afaacacd7a6f.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        registered_birth_place as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patient_birth_data\"\n    group by registered_birth_place\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'health_facility','home','other'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "registered_birth_place", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "registered_birth_place", "values": ["health_facility", "home", "other"], "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.ad66b3a9e9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_birth_data_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.ad66b3a9e9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_birth_data_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_birth_data_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5429919, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_birth_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_birth_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_birth_data.yml/source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_birth_data\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_birth_data')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registries_id.4591df7852": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registries_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registries_id.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registries_id.4591df7852", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registries_id"], "alias": "source_unique_tamanu_program_registries_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5453172, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_unique_tamanu_program_registries_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registries\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_id.e8dd600ce7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_id.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_id.e8dd600ce7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_id"], "alias": "source_not_null_tamanu_program_registries_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5470617, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"program_registries\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_created_at.ec096818cc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_created_at.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_created_at.ec096818cc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_created_at"], "alias": "source_not_null_tamanu_program_registries_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5489287, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"program_registries\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_updated_at.b636966c96": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_updated_at.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_updated_at.b636966c96", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_updated_at"], "alias": "source_not_null_tamanu_program_registries_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5506322, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"program_registries\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registries_code.6aae9c851a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registries_code", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registries_code.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registries_code.6aae9c851a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registries_code"], "alias": "source_unique_tamanu_program_registries_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5523627, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_unique_tamanu_program_registries_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    code as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registries\"\nwhere code is not null\ngroup by code\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_code.42a17fd859": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_code.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_code.42a17fd859", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_code"], "alias": "source_not_null_tamanu_program_registries_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5540745, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"program_registries\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_name.7b40894126": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_name.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_name.7b40894126", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_name"], "alias": "source_not_null_tamanu_program_registries_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5557542, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"program_registries\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_currently_at_type.1181424fbc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_currently_at_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_currently_at_type.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_currently_at_type.1181424fbc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_currently_at_type"], "alias": "source_not_null_tamanu_program_registries_currently_at_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.55756, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_currently_at_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect currently_at_type\nfrom \"central\".\"public\".\"program_registries\"\nwhere currently_at_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "currently_at_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "currently_at_type", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_program_registries_currently_at_type__village__facility.878b7101a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_program_registries_currently_at_type__village__facility", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__798681f07c23b5908c876ab18d6c1321.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_program_registries_currently_at_type__village__facility.878b7101a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_program_registries_currently_at_type__village__facility"], "alias": "source_accepted_values_tamanu__798681f07c23b5908c876ab18d6c1321", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__798681f07c23b5908c876ab18d6c1321", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__798681f07c23b5908c876ab18d6c1321"}, "created_at": 1775621421.5593026, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__798681f07c23b5908c876ab18d6c1321\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_accepted_values_tamanu__798681f07c23b5908c876ab18d6c1321.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        currently_at_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"program_registries\"\n    group by currently_at_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'village','facility'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "currently_at_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "currently_at_type", "values": ["village", "facility"], "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_program_id.86ea68d449": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_program_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_program_id.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_program_id.86ea68d449", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_program_id"], "alias": "source_not_null_tamanu_program_registries_program_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5646474, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_program_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect program_id\nfrom \"central\".\"public\".\"program_registries\"\nwhere program_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "program_id", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registries_updated_at_sync_tick.5bea147746": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registries_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registries_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registries_updated_at_sync_tick.5bea147746", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registries_updated_at_sync_tick"], "alias": "source_not_null_tamanu_program_registries_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.566397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registries.yml/source_not_null_tamanu_program_registries_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"program_registries\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'program_registries')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_insurance_plans_id.c93eebe7c9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_insurance_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_insurance_plans_id.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_insurance_plans_id.c93eebe7c9", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_insurance_plans_id"], "alias": "source_unique_tamanu_invoice_insurance_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.568724, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_unique_tamanu_invoice_insurance_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_id.4c3a005a8c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plans_id.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_id.4c3a005a8c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plans_id"], "alias": "source_not_null_tamanu_invoice_insurance_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5704489, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_not_null_tamanu_invoice_insurance_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_created_at.6a73080b49": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plans_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plans_created_at.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_created_at.6a73080b49", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plans_created_at"], "alias": "source_not_null_tamanu_invoice_insurance_plans_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5721843, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_not_null_tamanu_invoice_insurance_plans_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at.1382c20539": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plans_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plans_updated_at.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at.1382c20539", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plans_updated_at"], "alias": "source_not_null_tamanu_invoice_insurance_plans_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5740209, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_not_null_tamanu_invoice_insurance_plans_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick.1671b13fb3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_e01100816cd295efc9820ad3424c3f72.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick.1671b13fb3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_e01100816cd295efc9820ad3424c3f72", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_e01100816cd295efc9820ad3424c3f72", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_e01100816cd295efc9820ad3424c3f72"}, "created_at": 1775621421.5757394, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_e01100816cd295efc9820ad3424c3f72\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_not_null_tamanu_invoice_e01100816cd295efc9820ad3424c3f72.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_code.5691576988": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plans_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plans_code.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_code.5691576988", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plans_code"], "alias": "source_not_null_tamanu_invoice_insurance_plans_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5774722, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_not_null_tamanu_invoice_insurance_plans_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_visibility_status.3bdc27963d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plans_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_45af4ee809db73b2654c1ed0ce4cfed0.sql", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_visibility_status.3bdc27963d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plans_visibility_status"], "alias": "source_not_null_tamanu_invoice_45af4ee809db73b2654c1ed0ce4cfed0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_45af4ee809db73b2654c1ed0ce4cfed0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_45af4ee809db73b2654c1ed0ce4cfed0"}, "created_at": 1775621421.5792181, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_45af4ee809db73b2654c1ed0ce4cfed0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plans.yml/source_not_null_tamanu_invoice_45af4ee809db73b2654c1ed0ce4cfed0.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"invoice_insurance_plans\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_note_items_id.6a3c41e3a8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_note_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_note_items_id.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_unique_tamanu_note_items_id.6a3c41e3a8", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_note_items_id"], "alias": "source_unique_tamanu_note_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5816019, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_unique_tamanu_note_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"note_items\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_id.e102088706": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_id.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_id.e102088706", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_id"], "alias": "source_not_null_tamanu_note_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5833325, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"note_items\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_created_at.6c19cc76af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_created_at.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_created_at.6c19cc76af", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_created_at"], "alias": "source_not_null_tamanu_note_items_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5850167, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"note_items\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_updated_at.c552d1546c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_updated_at.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_updated_at.c552d1546c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_updated_at"], "alias": "source_not_null_tamanu_note_items_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5867262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"note_items\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_note_page_id.e6a2a1ff2b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_note_page_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_note_page_id.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_note_page_id.e6a2a1ff2b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_note_page_id"], "alias": "source_not_null_tamanu_note_items_note_page_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.5884283, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_note_page_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect note_page_id\nfrom \"central\".\"public\".\"note_items\"\nwhere note_page_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "note_page_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "note_page_id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_.11dd57c56b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_ee2695a8b3be707ab79596b72eebdc22.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_.11dd57c56b", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_"], "alias": "source_relationships_tamanu_no_ee2695a8b3be707ab79596b72eebdc22", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_ee2695a8b3be707ab79596b72eebdc22", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_ee2695a8b3be707ab79596b72eebdc22"}, "created_at": 1775621421.590257, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_ee2695a8b3be707ab79596b72eebdc22\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"], ["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages", "source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_relationships_tamanu_no_ee2695a8b3be707ab79596b72eebdc22.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select note_page_id as from_field\n    from \"central\".\"public\".\"note_items\"\n    where note_page_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"note_pages\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "note_page_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "note_page_id", "to": "source('tamanu', 'note_pages')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_.1c2976179a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_05d1fb07fccbc40ca92bce3ef778b8fc.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_.1c2976179a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_"], "alias": "source_relationships_tamanu_no_05d1fb07fccbc40ca92bce3ef778b8fc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_05d1fb07fccbc40ca92bce3ef778b8fc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_05d1fb07fccbc40ca92bce3ef778b8fc"}, "created_at": 1775621421.5954893, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_05d1fb07fccbc40ca92bce3ef778b8fc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"], ["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_relationships_tamanu_no_05d1fb07fccbc40ca92bce3ef778b8fc.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select revised_by_id as from_field\n    from \"central\".\"public\".\"note_items\"\n    where revised_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"note_items\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "revised_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "revised_by_id", "to": "source('tamanu', 'note_items')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_.1029ad90a3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_872c206c148659324bc23a10176f6cc9.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_.1029ad90a3", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_no_872c206c148659324bc23a10176f6cc9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_872c206c148659324bc23a10176f6cc9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_872c206c148659324bc23a10176f6cc9"}, "created_at": 1775621421.6006284, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_872c206c148659324bc23a10176f6cc9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_relationships_tamanu_no_872c206c148659324bc23a10176f6cc9.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select author_id as from_field\n    from \"central\".\"public\".\"note_items\"\n    where author_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "author_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "author_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_.35728438ca": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_ba894cd73c65ab03a8672e3cd4d6e8a3.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_.35728438ca", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_no_ba894cd73c65ab03a8672e3cd4d6e8a3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_ba894cd73c65ab03a8672e3cd4d6e8a3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_ba894cd73c65ab03a8672e3cd4d6e8a3"}, "created_at": 1775621421.6057913, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_ba894cd73c65ab03a8672e3cd4d6e8a3\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_relationships_tamanu_no_ba894cd73c65ab03a8672e3cd4d6e8a3.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select on_behalf_of_id as from_field\n    from \"central\".\"public\".\"note_items\"\n    where on_behalf_of_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "on_behalf_of_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "on_behalf_of_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_content.cdcdc58bd6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_content", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_content.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_content.cdcdc58bd6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_content"], "alias": "source_not_null_tamanu_note_items_content", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6106365, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_content.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect content\nfrom \"central\".\"public\".\"note_items\"\nwhere content is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "content", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "content", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_date.b7ba7d298b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_date.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_date.b7ba7d298b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_date"], "alias": "source_not_null_tamanu_note_items_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6123948, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"note_items\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_items_updated_at_sync_tick.9c0561f44d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_items_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_items_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_items_updated_at_sync_tick.9c0561f44d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_items_updated_at_sync_tick"], "alias": "source_not_null_tamanu_note_items_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6143737, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_items.yml/source_not_null_tamanu_note_items_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"note_items\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'note_items')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounter_pause_prescription_histories_id.242095e95a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounter_pause_prescription_histories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounter_pause_prescription_histories_id.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounter_pause_prescription_histories_id.242095e95a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounter_pause_prescription_histories_id"], "alias": "source_unique_tamanu_encounter_pause_prescription_histories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6167157, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_unique_tamanu_encounter_pause_prescription_histories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_id.9371741f30": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_e04820fb3dadcccb272ee4c587d040f4.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_id.9371741f30", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_id"], "alias": "source_not_null_tamanu_encount_e04820fb3dadcccb272ee4c587d040f4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_e04820fb3dadcccb272ee4c587d040f4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_e04820fb3dadcccb272ee4c587d040f4"}, "created_at": 1775621421.618457, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_e04820fb3dadcccb272ee4c587d040f4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_e04820fb3dadcccb272ee4c587d040f4.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id.6431100b96": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_fcc5298b7bacf4500f9c368d8b052481.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id.6431100b96", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id"], "alias": "source_not_null_tamanu_encount_fcc5298b7bacf4500f9c368d8b052481", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_fcc5298b7bacf4500f9c368d8b052481", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_fcc5298b7bacf4500f9c368d8b052481"}, "created_at": 1775621421.6202002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_fcc5298b7bacf4500f9c368d8b052481\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_fcc5298b7bacf4500f9c368d8b052481.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_prescription_id\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere encounter_prescription_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_prescription_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_prescription_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action.36a50d92fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_action", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_a3e1e8721a8439c141d7bb0e3a2efd88.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action.36a50d92fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_action"], "alias": "source_not_null_tamanu_encount_a3e1e8721a8439c141d7bb0e3a2efd88", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_a3e1e8721a8439c141d7bb0e3a2efd88", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_a3e1e8721a8439c141d7bb0e3a2efd88"}, "created_at": 1775621421.6220334, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_a3e1e8721a8439c141d7bb0e3a2efd88\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_a3e1e8721a8439c141d7bb0e3a2efd88.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect action\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere action is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "action", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "action", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action_date.fff7387332": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_action_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_1ea81f05063da733f0d68858d21d4803.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action_date.fff7387332", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_action_date"], "alias": "source_not_null_tamanu_encount_1ea81f05063da733f0d68858d21d4803", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_1ea81f05063da733f0d68858d21d4803", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_1ea81f05063da733f0d68858d21d4803"}, "created_at": 1775621421.623764, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_1ea81f05063da733f0d68858d21d4803\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_1ea81f05063da733f0d68858d21d4803.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect action_date\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere action_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "action_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "action_date", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_created_at.1766fe12bb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_ad73d183557f9bceb67c3b570cda64ac.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_created_at.1766fe12bb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_created_at"], "alias": "source_not_null_tamanu_encount_ad73d183557f9bceb67c3b570cda64ac", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_ad73d183557f9bceb67c3b570cda64ac", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_ad73d183557f9bceb67c3b570cda64ac"}, "created_at": 1775621421.6254835, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_ad73d183557f9bceb67c3b570cda64ac\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_ad73d183557f9bceb67c3b570cda64ac.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at.bce04537f7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_47d2ce9d4c4a56e6fbaa7ac04c727b7e.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at.bce04537f7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_updated_at"], "alias": "source_not_null_tamanu_encount_47d2ce9d4c4a56e6fbaa7ac04c727b7e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_47d2ce9d4c4a56e6fbaa7ac04c727b7e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_47d2ce9d4c4a56e6fbaa7ac04c727b7e"}, "created_at": 1775621421.627206, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_47d2ce9d4c4a56e6fbaa7ac04c727b7e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_47d2ce9d4c4a56e6fbaa7ac04c727b7e.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick.1a62809ae2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_d358191dd4e9dbefd0bd207aa1e537cb.sql", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick.1a62809ae2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encount_d358191dd4e9dbefd0bd207aa1e537cb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_d358191dd4e9dbefd0bd207aa1e537cb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_d358191dd4e9dbefd0bd207aa1e537cb"}, "created_at": 1775621421.6289284, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_d358191dd4e9dbefd0bd207aa1e537cb\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescription_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescription_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescription_histories.yml/source_not_null_tamanu_encount_d358191dd4e9dbefd0bd207aa1e537cb.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounter_pause_prescription_histories\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescription_histories')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_id.6579ad9f9e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registry_clinical_statuses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registry_clinical_statuses_id.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_id.6579ad9f9e", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registry_clinical_statuses_id"], "alias": "source_unique_tamanu_program_registry_clinical_statuses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.631336, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_unique_tamanu_program_registry_clinical_statuses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_id.5152485ff1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_clinical_statuses_id.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_id.5152485ff1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_id"], "alias": "source_not_null_tamanu_program_registry_clinical_statuses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6331127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_registry_clinical_statuses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_created_at.db653414c9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_fc0d8d971bdfe18fe835b7de4cb8ae1a.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_created_at.db653414c9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_created_at"], "alias": "source_not_null_tamanu_program_fc0d8d971bdfe18fe835b7de4cb8ae1a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_fc0d8d971bdfe18fe835b7de4cb8ae1a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_fc0d8d971bdfe18fe835b7de4cb8ae1a"}, "created_at": 1775621421.6348493, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_fc0d8d971bdfe18fe835b7de4cb8ae1a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_fc0d8d971bdfe18fe835b7de4cb8ae1a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at.74ec57dc65": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_53451cd5c8e210744f01a8dcc6015e74.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at.74ec57dc65", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_updated_at"], "alias": "source_not_null_tamanu_program_53451cd5c8e210744f01a8dcc6015e74", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_53451cd5c8e210744f01a8dcc6015e74", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_53451cd5c8e210744f01a8dcc6015e74"}, "created_at": 1775621421.6365533, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_53451cd5c8e210744f01a8dcc6015e74\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_53451cd5c8e210744f01a8dcc6015e74.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_code.93a7de7fa7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_program_registry_clinical_statuses_code", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_program_registry_clinical_statuses_code.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_code.93a7de7fa7", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_program_registry_clinical_statuses_code"], "alias": "source_unique_tamanu_program_registry_clinical_statuses_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.638275, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_unique_tamanu_program_registry_clinical_statuses_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    code as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere code is not null\ngroup by code\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_code.b6dbb55eee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_clinical_statuses_code.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_code.b6dbb55eee", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_code"], "alias": "source_not_null_tamanu_program_registry_clinical_statuses_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6406372, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_registry_clinical_statuses_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_name.1483c9ad54": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_registry_clinical_statuses_name.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_name.1483c9ad54", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_name"], "alias": "source_not_null_tamanu_program_registry_clinical_statuses_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6423597, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_registry_clinical_statuses_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id.51f24319f9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_f4a8353a6dbc7cb846139c812c99c1f5.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id.51f24319f9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id"], "alias": "source_not_null_tamanu_program_f4a8353a6dbc7cb846139c812c99c1f5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_f4a8353a6dbc7cb846139c812c99c1f5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_f4a8353a6dbc7cb846139c812c99c1f5"}, "created_at": 1775621421.6442318, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_f4a8353a6dbc7cb846139c812c99c1f5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_f4a8353a6dbc7cb846139c812c99c1f5.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect program_registry_id\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere program_registry_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "program_registry_id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_.5a69a4eefa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pr_5e7f9660e033eb35ad4d26c6a5e97181.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_.5a69a4eefa", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_"], "alias": "source_relationships_tamanu_pr_5e7f9660e033eb35ad4d26c6a5e97181", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pr_5e7f9660e033eb35ad4d26c6a5e97181", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pr_5e7f9660e033eb35ad4d26c6a5e97181"}, "created_at": 1775621421.6459794, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pr_5e7f9660e033eb35ad4d26c6a5e97181\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"], ["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries", "source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_relationships_tamanu_pr_5e7f9660e033eb35ad4d26c6a5e97181.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select program_registry_id as from_field\n    from \"central\".\"public\".\"program_registry_clinical_statuses\"\n    where program_registry_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"program_registries\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "program_registry_id", "to": "source('tamanu', 'program_registries')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick.a28eb831c8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_program_97130df8175309d93eebd85ca577fa1c.sql", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick.a28eb831c8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick"], "alias": "source_not_null_tamanu_program_97130df8175309d93eebd85ca577fa1c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_program_97130df8175309d93eebd85ca577fa1c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_program_97130df8175309d93eebd85ca577fa1c"}, "created_at": 1775621421.6514657, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_program_97130df8175309d93eebd85ca577fa1c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/program_registry_clinical_statuses.yml/source_not_null_tamanu_program_97130df8175309d93eebd85ca577fa1c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"program_registry_clinical_statuses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'program_registry_clinical_statuses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_local_system_facts_id.fec4c53d21": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_local_system_facts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_local_system_facts_id.sql", "original_file_path": "../../database/model/public/local_system_facts.yml", "unique_id": "test.tamanu.source_unique_tamanu_local_system_facts_id.fec4c53d21", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_local_system_facts_id"], "alias": "source_unique_tamanu_local_system_facts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6538153, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "local_system_facts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.local_system_facts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/local_system_facts.yml/source_unique_tamanu_local_system_facts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"local_system_facts\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'local_system_facts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_local_system_facts_id.b86094ee5b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_local_system_facts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_local_system_facts_id.sql", "original_file_path": "../../database/model/public/local_system_facts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_local_system_facts_id.b86094ee5b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_local_system_facts_id"], "alias": "source_not_null_tamanu_local_system_facts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6556485, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "local_system_facts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.local_system_facts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/local_system_facts.yml/source_not_null_tamanu_local_system_facts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"local_system_facts\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'local_system_facts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_local_system_facts_key.d313f0ba6d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_local_system_facts_key", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_local_system_facts_key.sql", "original_file_path": "../../database/model/public/local_system_facts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_local_system_facts_key.d313f0ba6d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_local_system_facts_key"], "alias": "source_not_null_tamanu_local_system_facts_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.657524, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "local_system_facts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.local_system_facts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/local_system_facts.yml/source_not_null_tamanu_local_system_facts_key.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect key\nfrom \"central\".\"public\".\"local_system_facts\"\nwhere key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "key", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "key", "model": "{{ get_where_subquery(source('tamanu', 'local_system_facts')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoices_invoice_insurance_plans_id.33a1630253": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoices_invoice_insurance_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoices_invoice_insurance_plans_id.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoices_invoice_insurance_plans_id.33a1630253", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoices_invoice_insurance_plans_id"], "alias": "source_unique_tamanu_invoices_invoice_insurance_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6598039, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_unique_tamanu_invoices_invoice_insurance_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_id.81fdb96190": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_invoice_insurance_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_invoice_insurance_plans_id.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_id.81fdb96190", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_invoice_insurance_plans_id"], "alias": "source_not_null_tamanu_invoices_invoice_insurance_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6616516, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_not_null_tamanu_invoices_invoice_insurance_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_created_at.3c4109e1f6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_invoice_insurance_plans_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_d7aed70f771949ca060c230721f8956d.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_created_at.3c4109e1f6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_invoice_insurance_plans_created_at"], "alias": "source_not_null_tamanu_invoice_d7aed70f771949ca060c230721f8956d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_d7aed70f771949ca060c230721f8956d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_d7aed70f771949ca060c230721f8956d"}, "created_at": 1775621421.6633966, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_d7aed70f771949ca060c230721f8956d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_not_null_tamanu_invoice_d7aed70f771949ca060c230721f8956d.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at.23b9b151a0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_0530506cb6d69b20eb2e4c0c8435396c.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at.23b9b151a0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at"], "alias": "source_not_null_tamanu_invoice_0530506cb6d69b20eb2e4c0c8435396c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_0530506cb6d69b20eb2e4c0c8435396c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_0530506cb6d69b20eb2e4c0c8435396c"}, "created_at": 1775621421.6659474, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_0530506cb6d69b20eb2e4c0c8435396c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_not_null_tamanu_invoice_0530506cb6d69b20eb2e4c0c8435396c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick.65d4601e80": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_54cf6165ff5d9eab52272c83a5e7eed1.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick.65d4601e80", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_54cf6165ff5d9eab52272c83a5e7eed1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_54cf6165ff5d9eab52272c83a5e7eed1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_54cf6165ff5d9eab52272c83a5e7eed1"}, "created_at": 1775621421.6684551, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_54cf6165ff5d9eab52272c83a5e7eed1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_not_null_tamanu_invoice_54cf6165ff5d9eab52272c83a5e7eed1.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id.06e1c59b11": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_8cac9489249ae58e0afdb997c3136ed1.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id.06e1c59b11", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id"], "alias": "source_not_null_tamanu_invoice_8cac9489249ae58e0afdb997c3136ed1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_8cac9489249ae58e0afdb997c3136ed1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_8cac9489249ae58e0afdb997c3136ed1"}, "created_at": 1775621421.6703315, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_8cac9489249ae58e0afdb997c3136ed1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_not_null_tamanu_invoice_8cac9489249ae58e0afdb997c3136ed1.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_id\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere invoice_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_id", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id.b21c244f33": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_df09d95973bef45ab2f4e46a478b9dbc.sql", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id.b21c244f33", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id"], "alias": "source_not_null_tamanu_invoice_df09d95973bef45ab2f4e46a478b9dbc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_df09d95973bef45ab2f4e46a478b9dbc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_df09d95973bef45ab2f4e46a478b9dbc"}, "created_at": 1775621421.6723773, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_df09d95973bef45ab2f4e46a478b9dbc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices_invoice_insurance_plans.yml/source_not_null_tamanu_invoice_df09d95973bef45ab2f4e46a478b9dbc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_insurance_plan_id\nfrom \"central\".\"public\".\"invoices_invoice_insurance_plans\"\nwhere invoice_insurance_plan_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_insurance_plan_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_insurance_plan_id", "model": "{{ get_where_subquery(source('tamanu', 'invoices_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_refresh_tokens_id.0c9c64d141": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_refresh_tokens_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_refresh_tokens_id.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_unique_tamanu_refresh_tokens_id.0c9c64d141", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_refresh_tokens_id"], "alias": "source_unique_tamanu_refresh_tokens_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6747272, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_unique_tamanu_refresh_tokens_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"refresh_tokens\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_refresh_tokens_id.470a9a0ad1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_refresh_tokens_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_refresh_tokens_id.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_refresh_tokens_id.470a9a0ad1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_refresh_tokens_id"], "alias": "source_not_null_tamanu_refresh_tokens_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6764863, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_not_null_tamanu_refresh_tokens_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"refresh_tokens\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_refresh_tokens_refresh_id.1f1f3cc868": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_refresh_tokens_refresh_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_refresh_tokens_refresh_id.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_refresh_tokens_refresh_id.1f1f3cc868", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_refresh_tokens_refresh_id"], "alias": "source_not_null_tamanu_refresh_tokens_refresh_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6783648, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_not_null_tamanu_refresh_tokens_refresh_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect refresh_id\nfrom \"central\".\"public\".\"refresh_tokens\"\nwhere refresh_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "refresh_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "refresh_id", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_refresh_tokens_device_id.b6b31e60be": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_refresh_tokens_device_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_refresh_tokens_device_id.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_refresh_tokens_device_id.b6b31e60be", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_refresh_tokens_device_id"], "alias": "source_not_null_tamanu_refresh_tokens_device_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6800792, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_not_null_tamanu_refresh_tokens_device_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect device_id\nfrom \"central\".\"public\".\"refresh_tokens\"\nwhere device_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "device_id", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_refresh_tokens_user_id.78eb836f95": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_refresh_tokens_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_refresh_tokens_user_id.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_refresh_tokens_user_id.78eb836f95", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_refresh_tokens_user_id"], "alias": "source_not_null_tamanu_refresh_tokens_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6817741, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_not_null_tamanu_refresh_tokens_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"refresh_tokens\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_.ba625319c2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_7a2111bbf9247158a1cce7b969b4e2c7.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_.ba625319c2", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_re_7a2111bbf9247158a1cce7b969b4e2c7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_7a2111bbf9247158a1cce7b969b4e2c7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_7a2111bbf9247158a1cce7b969b4e2c7"}, "created_at": 1775621421.683498, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_7a2111bbf9247158a1cce7b969b4e2c7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_relationships_tamanu_re_7a2111bbf9247158a1cce7b969b4e2c7.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select user_id as from_field\n    from \"central\".\"public\".\"refresh_tokens\"\n    where user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_refresh_tokens_expires_at.a515544921": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_refresh_tokens_expires_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_refresh_tokens_expires_at.sql", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "test.tamanu.source_not_null_tamanu_refresh_tokens_expires_at.a515544921", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_refresh_tokens_expires_at"], "alias": "source_not_null_tamanu_refresh_tokens_expires_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6889653, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "refresh_tokens"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.refresh_tokens"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/refresh_tokens.yml/source_not_null_tamanu_refresh_tokens_expires_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect expires_at\nfrom \"central\".\"public\".\"refresh_tokens\"\nwhere expires_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "expires_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "expires_at", "model": "{{ get_where_subquery(source('tamanu', 'refresh_tokens')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_death_revert_logs_id.001d670317": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_death_revert_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_death_revert_logs_id.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_unique_tamanu_death_revert_logs_id.001d670317", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_death_revert_logs_id"], "alias": "source_unique_tamanu_death_revert_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.691278, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_unique_tamanu_death_revert_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_id.6df645dcf5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_id.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_id.6df645dcf5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_id"], "alias": "source_not_null_tamanu_death_revert_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.693058, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_created_at.c782214dc7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_created_at.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_created_at.c782214dc7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_created_at"], "alias": "source_not_null_tamanu_death_revert_logs_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6947818, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at.844962c5a1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_updated_at.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at.844962c5a1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_updated_at"], "alias": "source_not_null_tamanu_death_revert_logs_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6966712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_revert_time.3e0bd39153": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_revert_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_revert_time.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_revert_time.3e0bd39153", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_revert_time"], "alias": "source_not_null_tamanu_death_revert_logs_revert_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.6983883, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_revert_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect revert_time\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere revert_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "revert_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "revert_time", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_death_data_id.4889452a8a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_death_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_death_data_id.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_death_data_id.4889452a8a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_death_data_id"], "alias": "source_not_null_tamanu_death_revert_logs_death_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7000942, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_death_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect death_data_id\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere death_data_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "death_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "death_data_id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_.a370a6342c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_de_2a54bf0ab63be5423117566a1a680fd8.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_.a370a6342c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_"], "alias": "source_relationships_tamanu_de_2a54bf0ab63be5423117566a1a680fd8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_de_2a54bf0ab63be5423117566a1a680fd8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_de_2a54bf0ab63be5423117566a1a680fd8"}, "created_at": 1775621421.7018306, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_de_2a54bf0ab63be5423117566a1a680fd8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"], ["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_relationships_tamanu_de_2a54bf0ab63be5423117566a1a680fd8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select death_data_id as from_field\n    from \"central\".\"public\".\"death_revert_logs\"\n    where death_data_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patient_death_data\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "death_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "death_data_id", "to": "source('tamanu', 'patient_death_data')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_patient_id.12123f0c05": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_patient_id.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_patient_id.12123f0c05", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_patient_id"], "alias": "source_not_null_tamanu_death_revert_logs_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7070959, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_.ab4f34cd7c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_de_37013d9147d1990112fdde5d737aa220.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_.ab4f34cd7c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_de_37013d9147d1990112fdde5d737aa220", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_de_37013d9147d1990112fdde5d737aa220", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_de_37013d9147d1990112fdde5d737aa220"}, "created_at": 1775621421.7089233, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_de_37013d9147d1990112fdde5d737aa220\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_relationships_tamanu_de_37013d9147d1990112fdde5d737aa220.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"death_revert_logs\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_reverted_by_id.34e5a69137": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_reverted_by_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_reverted_by_id.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_reverted_by_id.34e5a69137", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_reverted_by_id"], "alias": "source_not_null_tamanu_death_revert_logs_reverted_by_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7140808, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_reverted_by_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect reverted_by_id\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere reverted_by_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reverted_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "reverted_by_id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_.953c559e54": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_de_edb318ae50acbcd231e818d7b02da6b0.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_.953c559e54", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_de_edb318ae50acbcd231e818d7b02da6b0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_de_edb318ae50acbcd231e818d7b02da6b0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_de_edb318ae50acbcd231e818d7b02da6b0"}, "created_at": 1775621421.7158706, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_de_edb318ae50acbcd231e818d7b02da6b0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_relationships_tamanu_de_edb318ae50acbcd231e818d7b02da6b0.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select reverted_by_id as from_field\n    from \"central\".\"public\".\"death_revert_logs\"\n    where reverted_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reverted_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "reverted_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.24982eacdf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_death_revert_logs_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.24982eacdf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_death_revert_logs_updated_at_sync_tick"], "alias": "source_not_null_tamanu_death_revert_logs_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7210248, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "death_revert_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.death_revert_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/death_revert_logs.yml/source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"death_revert_logs\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'death_revert_logs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_program_registration_conditions_id.18c7acc7c5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_program_registration_conditions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_program_registration_conditions_id.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_program_registration_conditions_id.18c7acc7c5", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_program_registration_conditions_id"], "alias": "source_unique_tamanu_patient_program_registration_conditions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7233243, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_unique_tamanu_patient_program_registration_conditions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_id.148f05b382": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registration_conditions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_e1a0875d2f8370a639a39e66313a54d8.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_id.148f05b382", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registration_conditions_id"], "alias": "source_not_null_tamanu_patient_e1a0875d2f8370a639a39e66313a54d8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_e1a0875d2f8370a639a39e66313a54d8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_e1a0875d2f8370a639a39e66313a54d8"}, "created_at": 1775621421.7250814, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_e1a0875d2f8370a639a39e66313a54d8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_not_null_tamanu_patient_e1a0875d2f8370a639a39e66313a54d8.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_created_at.ffd5ec434b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registration_conditions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_fb29367a1b2a4b655e2dc679f4d6d5e1.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_created_at.ffd5ec434b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registration_conditions_created_at"], "alias": "source_not_null_tamanu_patient_fb29367a1b2a4b655e2dc679f4d6d5e1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_fb29367a1b2a4b655e2dc679f4d6d5e1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_fb29367a1b2a4b655e2dc679f4d6d5e1"}, "created_at": 1775621421.726833, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_fb29367a1b2a4b655e2dc679f4d6d5e1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_not_null_tamanu_patient_fb29367a1b2a4b655e2dc679f4d6d5e1.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at.ec3ed984e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registration_conditions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_3ed13cc8bb0e80092fdf2a13034ca013.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at.ec3ed984e8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registration_conditions_updated_at"], "alias": "source_not_null_tamanu_patient_3ed13cc8bb0e80092fdf2a13034ca013", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_3ed13cc8bb0e80092fdf2a13034ca013", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_3ed13cc8bb0e80092fdf2a13034ca013"}, "created_at": 1775621421.7286887, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_3ed13cc8bb0e80092fdf2a13034ca013\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_not_null_tamanu_patient_3ed13cc8bb0e80092fdf2a13034ca013.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_date.51631f2975": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registration_conditions_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_eb6ddead16ab669ae3252875d7b3ad4e.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_date.51631f2975", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registration_conditions_date"], "alias": "source_not_null_tamanu_patient_eb6ddead16ab669ae3252875d7b3ad4e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_eb6ddead16ab669ae3252875d7b3ad4e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_eb6ddead16ab669ae3252875d7b3ad4e"}, "created_at": 1775621421.7304053, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_eb6ddead16ab669ae3252875d7b3ad4e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_not_null_tamanu_patient_eb6ddead16ab669ae3252875d7b3ad4e.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_.bfef5107bf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_e79b2438034c42e58b5c5b2539b9356b.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_.bfef5107bf", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_"], "alias": "source_relationships_tamanu_pa_e79b2438034c42e58b5c5b2539b9356b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_e79b2438034c42e58b5c5b2539b9356b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_e79b2438034c42e58b5c5b2539b9356b"}, "created_at": 1775621421.7321537, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_e79b2438034c42e58b5c5b2539b9356b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_conditions"], ["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_conditions", "source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_relationships_tamanu_pa_e79b2438034c42e58b5c5b2539b9356b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select program_registry_condition_id as from_field\n    from \"central\".\"public\".\"patient_program_registration_conditions\"\n    where program_registry_condition_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"program_registry_conditions\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "program_registry_condition_id", "to": "source('tamanu', 'program_registry_conditions')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_.1928169432": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_a43c5af7e4a09c2c83da292c916c7847.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_.1928169432", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pa_a43c5af7e4a09c2c83da292c916c7847", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_a43c5af7e4a09c2c83da292c916c7847", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_a43c5af7e4a09c2c83da292c916c7847"}, "created_at": 1775621421.7373984, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_a43c5af7e4a09c2c83da292c916c7847\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_relationships_tamanu_pa_a43c5af7e4a09c2c83da292c916c7847.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select clinician_id as from_field\n    from \"central\".\"public\".\"patient_program_registration_conditions\"\n    where clinician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "clinician_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_.329bc7b403": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_3825b449fdbcb5f619ee1fbbc56bb8a6.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_.329bc7b403", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pa_3825b449fdbcb5f619ee1fbbc56bb8a6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_3825b449fdbcb5f619ee1fbbc56bb8a6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_3825b449fdbcb5f619ee1fbbc56bb8a6"}, "created_at": 1775621421.7423913, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_3825b449fdbcb5f619ee1fbbc56bb8a6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_relationships_tamanu_pa_3825b449fdbcb5f619ee1fbbc56bb8a6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select deletion_clinician_id as from_field\n    from \"central\".\"public\".\"patient_program_registration_conditions\"\n    where deletion_clinician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "deletion_clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "deletion_clinician_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick.9a6307d740": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_04c836cd5c65e3b3b3a82e521c276a1a.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick.9a6307d740", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_04c836cd5c65e3b3b3a82e521c276a1a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_04c836cd5c65e3b3b3a82e521c276a1a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_04c836cd5c65e3b3b3a82e521c276a1a"}, "created_at": 1775621421.7480447, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_04c836cd5c65e3b3b3a82e521c276a1a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_not_null_tamanu_patient_04c836cd5c65e3b3b3a82e521c276a1a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id.e4d2008618": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_6689f85e653a5201bd84873ff8f58c79.sql", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id.e4d2008618", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id"], "alias": "source_not_null_tamanu_patient_6689f85e653a5201bd84873ff8f58c79", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_6689f85e653a5201bd84873ff8f58c79", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_6689f85e653a5201bd84873ff8f58c79"}, "created_at": 1775621421.7497633, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_6689f85e653a5201bd84873ff8f58c79\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registration_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registration_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registration_conditions.yml/source_not_null_tamanu_patient_6689f85e653a5201bd84873ff8f58c79.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect program_registry_condition_category_id\nfrom \"central\".\"public\".\"patient_program_registration_conditions\"\nwhere program_registry_condition_category_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_condition_category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "program_registry_condition_category_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registration_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patients_id.aad3b90c9d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patients_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patients_id.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_unique_tamanu_patients_id.aad3b90c9d", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patients_id"], "alias": "source_unique_tamanu_patients_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7521932, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_unique_tamanu_patients_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patients\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patients_id.275ed05302": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patients_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patients_id.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patients_id.275ed05302", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patients_id"], "alias": "source_not_null_tamanu_patients_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7539656, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_not_null_tamanu_patients_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patients\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patients_created_at.f10f4a4622": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patients_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patients_created_at.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patients_created_at.f10f4a4622", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patients_created_at"], "alias": "source_not_null_tamanu_patients_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7556908, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_not_null_tamanu_patients_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patients\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patients_updated_at.907998e8ed": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patients_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patients_updated_at.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patients_updated_at.907998e8ed", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patients_updated_at"], "alias": "source_not_null_tamanu_patients_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7573745, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_not_null_tamanu_patients_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patients\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patients_display_id.d601818f72": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patients_display_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patients_display_id.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_unique_tamanu_patients_display_id.d601818f72", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patients_display_id"], "alias": "source_unique_tamanu_patients_display_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.759111, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_unique_tamanu_patients_display_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    display_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patients\"\nwhere display_id is not null\ngroup by display_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "display_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "display_id", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patients_display_id.faf4f13c00": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patients_display_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patients_display_id.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patients_display_id.faf4f13c00", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patients_display_id"], "alias": "source_not_null_tamanu_patients_display_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.760945, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_not_null_tamanu_patients_display_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect display_id\nfrom \"central\".\"public\".\"patients\"\nwhere display_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "display_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "display_id", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patients_sex.107df8a545": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patients_sex", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patients_sex.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patients_sex.107df8a545", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patients_sex"], "alias": "source_not_null_tamanu_patients_sex", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.762658, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_not_null_tamanu_patients_sex.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect sex\nfrom \"central\".\"public\".\"patients\"\nwhere sex is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "sex", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "sex", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_patients_sex__female__male__other.a3c5a2bdc7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_patients_sex__female__male__other", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu_patients_sex__female__male__other.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_patients_sex__female__male__other.a3c5a2bdc7", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_patients_sex__female__male__other"], "alias": "source_accepted_values_tamanu_patients_sex__female__male__other", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7643788, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_accepted_values_tamanu_patients_sex__female__male__other.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        sex as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"patients\"\n    group by sex\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'female','male','other'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "sex", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "sex", "values": ["female", "male", "other"], "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patients_updated_at_sync_tick.937dfa8d54": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patients_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patients_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patients_updated_at_sync_tick.937dfa8d54", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patients_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patients_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.769467, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patients.yml/source_not_null_tamanu_patients_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patients\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patients')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_departments_id.f24dde60cc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_departments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_departments_id.sql", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "test.tamanu.source_unique_tamanu_departments_id.f24dde60cc", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_departments_id"], "alias": "source_unique_tamanu_departments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7717931, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/departments.yml/source_unique_tamanu_departments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"departments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'departments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_departments_id.4f5628ebfb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_departments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_departments_id.sql", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_departments_id.4f5628ebfb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_departments_id"], "alias": "source_not_null_tamanu_departments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7735202, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/departments.yml/source_not_null_tamanu_departments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"departments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'departments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_departments_code.196489124d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_departments_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_departments_code.sql", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_departments_code.196489124d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_departments_code"], "alias": "source_not_null_tamanu_departments_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7752628, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/departments.yml/source_not_null_tamanu_departments_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"departments\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'departments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_departments_name.3448ffbf45": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_departments_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_departments_name.sql", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_departments_name.3448ffbf45", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_departments_name"], "alias": "source_not_null_tamanu_departments_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.777085, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/departments.yml/source_not_null_tamanu_departments_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"departments\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'departments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_.632d512530": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_de_1f3ec675052379764a48aa93acec3e86.sql", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_.632d512530", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_de_1f3ec675052379764a48aa93acec3e86", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_de_1f3ec675052379764a48aa93acec3e86", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_de_1f3ec675052379764a48aa93acec3e86"}, "created_at": 1775621421.7788057, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_de_1f3ec675052379764a48aa93acec3e86\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "departments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.departments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/departments.yml/source_relationships_tamanu_de_1f3ec675052379764a48aa93acec3e86.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"departments\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'departments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_departments_updated_at_sync_tick.3876957182": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_departments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_departments_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_departments_updated_at_sync_tick.3876957182", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_departments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_departments_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.784174, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/departments.yml/source_not_null_tamanu_departments_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"departments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'departments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_note_pages_id.589de9f269": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_note_pages_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_note_pages_id.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_unique_tamanu_note_pages_id.589de9f269", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_note_pages_id"], "alias": "source_unique_tamanu_note_pages_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7865093, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_unique_tamanu_note_pages_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"note_pages\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_id.ca251365f2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_id.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_id.ca251365f2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_id"], "alias": "source_not_null_tamanu_note_pages_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7882676, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"note_pages\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_created_at.d12af0d7fa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_created_at.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_created_at.d12af0d7fa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_created_at"], "alias": "source_not_null_tamanu_note_pages_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7899854, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"note_pages\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_updated_at.f4a3d0c174": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_updated_at.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_updated_at.f4a3d0c174", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_updated_at"], "alias": "source_not_null_tamanu_note_pages_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7916892, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"note_pages\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_note_type.ef33cb53cd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_note_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_note_type.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_note_type.ef33cb53cd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_note_type"], "alias": "source_not_null_tamanu_note_pages_note_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7935014, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_note_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect note_type\nfrom \"central\".\"public\".\"note_pages\"\nwhere note_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "note_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "note_type", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_record_id.4fb443d5b8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_record_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_record_id.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_record_id.4fb443d5b8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_record_id"], "alias": "source_not_null_tamanu_note_pages_record_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7952032, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_record_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_id\nfrom \"central\".\"public\".\"note_pages\"\nwhere record_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_id", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_record_type.3a45297bcc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_record_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_record_type.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_record_type.3a45297bcc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_record_type"], "alias": "source_not_null_tamanu_note_pages_record_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.796915, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_record_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_type\nfrom \"central\".\"public\".\"note_pages\"\nwhere record_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_type", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_date.73c5e4ff13": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_date.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_date.73c5e4ff13", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_date"], "alias": "source_not_null_tamanu_note_pages_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.7986236, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"note_pages\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_note_pages_updated_at_sync_tick.92101dbbcc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_note_pages_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_note_pages_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "test.tamanu.source_not_null_tamanu_note_pages_updated_at_sync_tick.92101dbbcc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_note_pages_updated_at_sync_tick"], "alias": "source_not_null_tamanu_note_pages_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8003478, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "note_pages"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.note_pages"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/note_pages.yml/source_not_null_tamanu_note_pages_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"note_pages\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'note_pages')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_insurance_plan_items_id.cbd4f88b8d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_insurance_plan_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_insurance_plan_items_id.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_insurance_plan_items_id.cbd4f88b8d", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_insurance_plan_items_id"], "alias": "source_unique_tamanu_invoice_insurance_plan_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8027542, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_unique_tamanu_invoice_insurance_plan_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_id.43701f0ea4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plan_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plan_items_id.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_id.43701f0ea4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plan_items_id"], "alias": "source_not_null_tamanu_invoice_insurance_plan_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8044717, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_not_null_tamanu_invoice_insurance_plan_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_created_at.3f6d2aaeca": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plan_items_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plan_items_created_at.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_created_at.3f6d2aaeca", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plan_items_created_at"], "alias": "source_not_null_tamanu_invoice_insurance_plan_items_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8061929, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_not_null_tamanu_invoice_insurance_plan_items_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at.31dd03f410": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plan_items_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurance_plan_items_updated_at.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at.31dd03f410", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plan_items_updated_at"], "alias": "source_not_null_tamanu_invoice_insurance_plan_items_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8078995, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_not_null_tamanu_invoice_insurance_plan_items_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick.1d01aecfe2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_855dad3e2edede24eb80b170e7889448.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick.1d01aecfe2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_855dad3e2edede24eb80b170e7889448", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_855dad3e2edede24eb80b170e7889448", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_855dad3e2edede24eb80b170e7889448"}, "created_at": 1775621421.809603, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_855dad3e2edede24eb80b170e7889448\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_not_null_tamanu_invoice_855dad3e2edede24eb80b170e7889448.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id.22ae6631a9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_cebcbb5ef9fa7a68984d859e6210b7c4.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id.22ae6631a9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id"], "alias": "source_not_null_tamanu_invoice_cebcbb5ef9fa7a68984d859e6210b7c4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_cebcbb5ef9fa7a68984d859e6210b7c4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_cebcbb5ef9fa7a68984d859e6210b7c4"}, "created_at": 1775621421.8114033, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_cebcbb5ef9fa7a68984d859e6210b7c4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_not_null_tamanu_invoice_cebcbb5ef9fa7a68984d859e6210b7c4.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_insurance_plan_id\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere invoice_insurance_plan_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_insurance_plan_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_insurance_plan_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id.e10425ebc3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_fefe28a15361de8e28ef99931807ef42.sql", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id.e10425ebc3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id"], "alias": "source_not_null_tamanu_invoice_fefe28a15361de8e28ef99931807ef42", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_fefe28a15361de8e28ef99931807ef42", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_fefe28a15361de8e28ef99931807ef42"}, "created_at": 1775621421.8131018, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_fefe28a15361de8e28ef99931807ef42\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurance_plan_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurance_plan_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurance_plan_items.yml/source_not_null_tamanu_invoice_fefe28a15361de8e28ef99931807ef42.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_product_id\nfrom \"central\".\"public\".\"invoice_insurance_plan_items\"\nwhere invoice_product_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_product_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_product_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurance_plan_items')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_tests_id.2135a2616a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_tests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_tests_id.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_tests_id.2135a2616a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_tests_id"], "alias": "source_unique_tamanu_lab_tests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8153443, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_unique_tamanu_lab_tests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_tests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_tests_id.abec38f58a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_tests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tests_id.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_tests_id.abec38f58a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_tests_id"], "alias": "source_not_null_tamanu_lab_tests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8171062, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_not_null_tamanu_lab_tests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_tests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_tests_created_at.667f51451c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_tests_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tests_created_at.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_tests_created_at.667f51451c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_tests_created_at"], "alias": "source_not_null_tamanu_lab_tests_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.818945, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_not_null_tamanu_lab_tests_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_tests\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_tests_updated_at.64be4fd140": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_tests_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tests_updated_at.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_tests_updated_at.64be4fd140", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_tests_updated_at"], "alias": "source_not_null_tamanu_lab_tests_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8206608, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_not_null_tamanu_lab_tests_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_tests\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_tests_date.e00dab5c9e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_tests_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tests_date.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_tests_date.e00dab5c9e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_tests_date"], "alias": "source_not_null_tamanu_lab_tests_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8223457, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_not_null_tamanu_lab_tests_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"lab_tests\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_tests_result.cac9a56686": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_tests_result", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tests_result.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_tests_result.cac9a56686", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_tests_result"], "alias": "source_not_null_tamanu_lab_tests_result", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8240654, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_not_null_tamanu_lab_tests_result.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect result\nfrom \"central\".\"public\".\"lab_tests\"\nwhere result is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "result", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "result", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_.feba1f8faa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_92003cb8abdb214accd2b3c248a5fc1d.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_.feba1f8faa", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_"], "alias": "source_relationships_tamanu_la_92003cb8abdb214accd2b3c248a5fc1d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_92003cb8abdb214accd2b3c248a5fc1d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_92003cb8abdb214accd2b3c248a5fc1d"}, "created_at": 1775621421.8258128, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_92003cb8abdb214accd2b3c248a5fc1d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"], ["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_relationships_tamanu_la_92003cb8abdb214accd2b3c248a5fc1d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_request_id as from_field\n    from \"central\".\"public\".\"lab_tests\"\n    where lab_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_request_id", "to": "source('tamanu', 'lab_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_.1db3f2d26e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_74099ec7b41e1a1719a3fbe7d4feb380.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_.1db3f2d26e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_"], "alias": "source_relationships_tamanu_la_74099ec7b41e1a1719a3fbe7d4feb380", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_74099ec7b41e1a1719a3fbe7d4feb380", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_74099ec7b41e1a1719a3fbe7d4feb380"}, "created_at": 1775621421.8312516, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_74099ec7b41e1a1719a3fbe7d4feb380\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"], ["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types", "source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_relationships_tamanu_la_74099ec7b41e1a1719a3fbe7d4feb380.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_test_type_id as from_field\n    from \"central\".\"public\".\"lab_tests\"\n    where lab_test_type_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_test_types\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_test_type_id", "to": "source('tamanu', 'lab_test_types')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_.be7e43137f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_3c4c6e13151cd9ebe7b5fed04061c7de.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_.be7e43137f", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_"], "alias": "dbt_utils_source_relationships_3c4c6e13151cd9ebe7b5fed04061c7de", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_3c4c6e13151cd9ebe7b5fed04061c7de", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_3c4c6e13151cd9ebe7b5fed04061c7de"}, "created_at": 1775621421.836376, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_3c4c6e13151cd9ebe7b5fed04061c7de\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/dbt_utils_source_relationships_3c4c6e13151cd9ebe7b5fed04061c7de.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    category_id as id\n\n  from \"central\".\"public\".\"lab_tests\"\n\n  where category_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestCategory'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "category_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labTestCategory'", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_.b46161f1b5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_5c1ceead95ed0ecab3b357c570de5fc6.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_.b46161f1b5", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_"], "alias": "dbt_utils_source_relationships_5c1ceead95ed0ecab3b357c570de5fc6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_5c1ceead95ed0ecab3b357c570de5fc6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_5c1ceead95ed0ecab3b357c570de5fc6"}, "created_at": 1775621421.841399, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_5c1ceead95ed0ecab3b357c570de5fc6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/dbt_utils_source_relationships_5c1ceead95ed0ecab3b357c570de5fc6.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    lab_test_method_id as id\n\n  from \"central\".\"public\".\"lab_tests\"\n\n  where lab_test_method_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestMethod'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_method_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "lab_test_method_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labTestMethod'", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_lab_tests_updated_at_sync_tick.eeac5bc0de": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_tests_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tests_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_tests_updated_at_sync_tick.eeac5bc0de", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_tests_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_tests_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8474963, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_tests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_tests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_tests.yml/source_not_null_tamanu_lab_tests_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_tests\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_tests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_items_id.9cdffdcc59": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_items_id.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_items_id.9cdffdcc59", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_items_id"], "alias": "source_unique_tamanu_invoice_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8498483, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_unique_tamanu_invoice_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_items\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_id.dc141da1a1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_id.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_id.dc141da1a1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_id"], "alias": "source_not_null_tamanu_invoice_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8517892, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_items\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_invoice_id.3660f18c91": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_invoice_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_invoice_id.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_invoice_id.3660f18c91", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_invoice_id"], "alias": "source_not_null_tamanu_invoice_items_invoice_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.853486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_invoice_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_id\nfrom \"central\".\"public\".\"invoice_items\"\nwhere invoice_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_.1c28785b87": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_e59051bf7847c8e21d20ee2a38ef66d8.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_.1c28785b87", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_"], "alias": "source_relationships_tamanu_in_e59051bf7847c8e21d20ee2a38ef66d8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_e59051bf7847c8e21d20ee2a38ef66d8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_e59051bf7847c8e21d20ee2a38ef66d8"}, "created_at": 1775621421.8552365, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_e59051bf7847c8e21d20ee2a38ef66d8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"], ["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices", "source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_relationships_tamanu_in_e59051bf7847c8e21d20ee2a38ef66d8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select invoice_id as from_field\n    from \"central\".\"public\".\"invoice_items\"\n    where invoice_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoices\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "invoice_id", "to": "source('tamanu', 'invoices')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_order_date.7be79d0261": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_order_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_order_date.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_order_date.7be79d0261", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_order_date"], "alias": "source_not_null_tamanu_invoice_items_order_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8603268, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_order_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect order_date\nfrom \"central\".\"public\".\"invoice_items\"\nwhere order_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "order_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "order_date", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_.46ad5d1e2f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_c9ea1a56be53f31bce74d8eb386c0513.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_.46ad5d1e2f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_"], "alias": "source_relationships_tamanu_in_c9ea1a56be53f31bce74d8eb386c0513", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_c9ea1a56be53f31bce74d8eb386c0513", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_c9ea1a56be53f31bce74d8eb386c0513"}, "created_at": 1775621421.8621185, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_c9ea1a56be53f31bce74d8eb386c0513\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_products"], ["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_products", "source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_relationships_tamanu_in_c9ea1a56be53f31bce74d8eb386c0513.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select product_id as from_field\n    from \"central\".\"public\".\"invoice_items\"\n    where product_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoice_products\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "product_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "product_id", "to": "source('tamanu', 'invoice_products')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_quantity.3be1c84af8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_quantity", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_quantity.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_quantity.3be1c84af8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_quantity"], "alias": "source_not_null_tamanu_invoice_items_quantity", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.867199, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_quantity.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect quantity\nfrom \"central\".\"public\".\"invoice_items\"\nwhere quantity is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "quantity", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "quantity", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_ordered_by_user_id.a2db62ee39": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_ordered_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_ordered_by_user_id.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_ordered_by_user_id.a2db62ee39", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_ordered_by_user_id"], "alias": "source_not_null_tamanu_invoice_items_ordered_by_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.868953, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_ordered_by_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect ordered_by_user_id\nfrom \"central\".\"public\".\"invoice_items\"\nwhere ordered_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ordered_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ordered_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_.a5aadc15a8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_f72f9ac5edc0c5ca5ee9ed64f9ad749a.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_.a5aadc15a8", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_in_f72f9ac5edc0c5ca5ee9ed64f9ad749a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_f72f9ac5edc0c5ca5ee9ed64f9ad749a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_f72f9ac5edc0c5ca5ee9ed64f9ad749a"}, "created_at": 1775621421.8707497, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_f72f9ac5edc0c5ca5ee9ed64f9ad749a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_relationships_tamanu_in_f72f9ac5edc0c5ca5ee9ed64f9ad749a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select ordered_by_user_id as from_field\n    from \"central\".\"public\".\"invoice_items\"\n    where ordered_by_user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ordered_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "ordered_by_user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_created_at.474e57c0bb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_created_at.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_created_at.474e57c0bb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_created_at"], "alias": "source_not_null_tamanu_invoice_items_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8758142, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_items\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_updated_at_sync_tick.0d6baa054f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_updated_at_sync_tick.0d6baa054f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_items_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8775656, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_items\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_items_approved.3e2ce00100": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_items_approved", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_items_approved.sql", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_items_approved.3e2ce00100", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_items_approved"], "alias": "source_not_null_tamanu_invoice_items_approved", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8793128, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_items.yml/source_not_null_tamanu_invoice_items_approved.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect approved\nfrom \"central\".\"public\".\"invoice_items\"\nwhere approved is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "approved", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "approved", "model": "{{ get_where_subquery(source('tamanu', 'invoice_items')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_requests_id.4e5a6c8c2f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_requests_id.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_requests_id.4e5a6c8c2f", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_requests_id"], "alias": "source_unique_tamanu_lab_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8816502, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_unique_tamanu_lab_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_requests_id.e536409687": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_requests_id.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_requests_id.e536409687", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_requests_id"], "alias": "source_not_null_tamanu_lab_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8835008, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_not_null_tamanu_lab_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_requests_created_at.1ee9713d63": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_requests_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_requests_created_at.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_requests_created_at.1ee9713d63", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_requests_created_at"], "alias": "source_not_null_tamanu_lab_requests_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8852298, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_not_null_tamanu_lab_requests_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_requests\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_requests_updated_at.fca847ad8c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_requests_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_requests_updated_at.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_requests_updated_at.fca847ad8c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_requests_updated_at"], "alias": "source_not_null_tamanu_lab_requests_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.8869555, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_not_null_tamanu_lab_requests_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_requests\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error.a405e0e600": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__49d0cb15cd39a06eeffcacc5a1d0563d.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error.a405e0e600", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error"], "alias": "source_accepted_values_tamanu__49d0cb15cd39a06eeffcacc5a1d0563d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__49d0cb15cd39a06eeffcacc5a1d0563d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__49d0cb15cd39a06eeffcacc5a1d0563d"}, "created_at": 1775621421.8887398, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__49d0cb15cd39a06eeffcacc5a1d0563d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_accepted_values_tamanu__49d0cb15cd39a06eeffcacc5a1d0563d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"lab_requests\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'reception_pending','results_pending','interim_results','to_be_verified','verified','published','cancelled','invalidated','deleted','sample-not-collected','entered-in-error'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["reception_pending", "results_pending", "interim_results", "to_be_verified", "verified", "published", "cancelled", "invalidated", "deleted", "sample-not-collected", "entered-in-error"], "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_.332337a1bd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_794cfd7feb660eee022a0a148d1c9922.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_.332337a1bd", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_la_794cfd7feb660eee022a0a148d1c9922", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_794cfd7feb660eee022a0a148d1c9922", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_794cfd7feb660eee022a0a148d1c9922"}, "created_at": 1775621421.895762, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_794cfd7feb660eee022a0a148d1c9922\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_relationships_tamanu_la_794cfd7feb660eee022a0a148d1c9922.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select requested_by_id as from_field\n    from \"central\".\"public\".\"lab_requests\"\n    where requested_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "requested_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "requested_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_.ead6a9d3f0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_b885be3a539616c7db94444f050f11a5.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_.ead6a9d3f0", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_la_b885be3a539616c7db94444f050f11a5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_b885be3a539616c7db94444f050f11a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_b885be3a539616c7db94444f050f11a5"}, "created_at": 1775621421.9008603, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_b885be3a539616c7db94444f050f11a5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_relationships_tamanu_la_b885be3a539616c7db94444f050f11a5.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"lab_requests\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.1161021af0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_41d5142a34eb2763eae42c3bacd2987e.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.1161021af0", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_"], "alias": "dbt_utils_source_relationships_41d5142a34eb2763eae42c3bacd2987e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_41d5142a34eb2763eae42c3bacd2987e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_41d5142a34eb2763eae42c3bacd2987e"}, "created_at": 1775621421.9059834, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_41d5142a34eb2763eae42c3bacd2987e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/dbt_utils_source_relationships_41d5142a34eb2763eae42c3bacd2987e.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    lab_test_category_id as id\n\n  from \"central\".\"public\".\"lab_requests\"\n\n  where lab_test_category_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestCategory'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"to_condition": "type = 'labTestCategory'", "column_name": "lab_test_category_id", "to": "source('tamanu', 'reference_data')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_lab_requests_display_id.cbbdd33475": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_requests_display_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_requests_display_id.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_requests_display_id.cbbdd33475", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_requests_display_id"], "alias": "source_not_null_tamanu_lab_requests_display_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9109206, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_not_null_tamanu_lab_requests_display_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect display_id\nfrom \"central\".\"public\".\"lab_requests\"\nwhere display_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "display_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "display_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_.15144cb13a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_8cf06f59860165f4bb21fc0bfc6d6e32.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_.15144cb13a", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_"], "alias": "dbt_utils_source_relationships_8cf06f59860165f4bb21fc0bfc6d6e32", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_8cf06f59860165f4bb21fc0bfc6d6e32", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_8cf06f59860165f4bb21fc0bfc6d6e32"}, "created_at": 1775621421.912748, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_8cf06f59860165f4bb21fc0bfc6d6e32\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/dbt_utils_source_relationships_8cf06f59860165f4bb21fc0bfc6d6e32.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    lab_test_priority_id as id\n\n  from \"central\".\"public\".\"lab_requests\"\n\n  where lab_test_priority_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestPriority'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_priority_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "lab_test_priority_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labTestPriority'", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_.4ae8635507": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_3c5911e1d5dbeae86f9382701ed17e63.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_.4ae8635507", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_"], "alias": "dbt_utils_source_relationships_3c5911e1d5dbeae86f9382701ed17e63", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_3c5911e1d5dbeae86f9382701ed17e63", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_3c5911e1d5dbeae86f9382701ed17e63"}, "created_at": 1775621421.918226, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_3c5911e1d5dbeae86f9382701ed17e63\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/dbt_utils_source_relationships_3c5911e1d5dbeae86f9382701ed17e63.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    lab_test_laboratory_id as id\n\n  from \"central\".\"public\".\"lab_requests\"\n\n  where lab_test_laboratory_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestLaboratory'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_laboratory_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "lab_test_laboratory_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labTestLaboratory'", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_lab_requests_updated_at_sync_tick.ef00317737": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_requests_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_requests_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_requests_updated_at_sync_tick.ef00317737", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_requests_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_requests_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9236832, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_not_null_tamanu_lab_requests_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_requests\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused.2cbc5618a7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__7654e248e09c22d70aea001dc5144297.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused.2cbc5618a7", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused"], "alias": "source_accepted_values_tamanu__7654e248e09c22d70aea001dc5144297", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__7654e248e09c22d70aea001dc5144297", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__7654e248e09c22d70aea001dc5144297"}, "created_at": 1775621421.925498, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__7654e248e09c22d70aea001dc5144297\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_accepted_values_tamanu__7654e248e09c22d70aea001dc5144297.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        reason_for_cancellation as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"lab_requests\"\n    group by reason_for_cancellation\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'clinical','duplicate','entered-in-error','other','patient-discharged','patient-refused'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reason_for_cancellation", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "reason_for_cancellation", "values": ["clinical", "duplicate", "entered-in-error", "other", "patient-discharged", "patient-refused"], "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_.b8a500a3ec": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_1a8a2c31ea1f9f0820c9a47a97518afe.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_.b8a500a3ec", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_"], "alias": "source_relationships_tamanu_la_1a8a2c31ea1f9f0820c9a47a97518afe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_1a8a2c31ea1f9f0820c9a47a97518afe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_1a8a2c31ea1f9f0820c9a47a97518afe"}, "created_at": 1775621421.9310596, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_1a8a2c31ea1f9f0820c9a47a97518afe\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_relationships_tamanu_la_1a8a2c31ea1f9f0820c9a47a97518afe.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select department_id as from_field\n    from \"central\".\"public\".\"lab_requests\"\n    where department_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"departments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "department_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "department_id", "to": "source('tamanu', 'departments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_.2905d1bd3a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_081684246f6bf00522c0c77579566577.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_.2905d1bd3a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_"], "alias": "source_relationships_tamanu_la_081684246f6bf00522c0c77579566577", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_081684246f6bf00522c0c77579566577", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_081684246f6bf00522c0c77579566577"}, "created_at": 1775621421.9369023, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_081684246f6bf00522c0c77579566577\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_relationships_tamanu_la_081684246f6bf00522c0c77579566577.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_test_panel_request_id as from_field\n    from \"central\".\"public\".\"lab_requests\"\n    where lab_test_panel_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_test_panel_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_panel_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_test_panel_request_id", "to": "source('tamanu', 'lab_test_panel_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_.726d5f854e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_15b340ce98774176dc0533ead99502c7.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_.726d5f854e", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_"], "alias": "dbt_utils_source_relationships_15b340ce98774176dc0533ead99502c7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_15b340ce98774176dc0533ead99502c7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_15b340ce98774176dc0533ead99502c7"}, "created_at": 1775621421.941799, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_15b340ce98774176dc0533ead99502c7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/dbt_utils_source_relationships_15b340ce98774176dc0533ead99502c7.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    lab_sample_site_id as id\n\n  from \"central\".\"public\".\"lab_requests\"\n\n  where lab_sample_site_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labSampleSite'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_sample_site_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "lab_sample_site_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labSampleSite'", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_.b37e5b8f30": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_98b52936ce8ec0d1626214bff7bd6748.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_.b37e5b8f30", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_"], "alias": "dbt_utils_source_relationships_98b52936ce8ec0d1626214bff7bd6748", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_98b52936ce8ec0d1626214bff7bd6748", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_98b52936ce8ec0d1626214bff7bd6748"}, "created_at": 1775621421.9472065, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_98b52936ce8ec0d1626214bff7bd6748\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/dbt_utils_source_relationships_98b52936ce8ec0d1626214bff7bd6748.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    specimen_type_id as id\n\n  from \"central\".\"public\".\"lab_requests\"\n\n  where specimen_type_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'specimenType'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "specimen_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "specimen_type_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'specimenType'", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_.fa7e746896": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_0c622d266d5911b841d249d771338ae6.sql", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_.fa7e746896", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_la_0c622d266d5911b841d249d771338ae6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_0c622d266d5911b841d249d771338ae6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_0c622d266d5911b841d249d771338ae6"}, "created_at": 1775621421.952666, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_0c622d266d5911b841d249d771338ae6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "lab_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.lab_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_requests.yml/source_relationships_tamanu_la_0c622d266d5911b841d249d771338ae6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select collected_by_id as from_field\n    from \"central\".\"public\".\"lab_requests\"\n    where collected_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "collected_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "collected_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_SequelizeMeta_name.ed3437179c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_SequelizeMeta_name", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_SequelizeMeta_name.sql", "original_file_path": "../../database/model/public/SequelizeMeta.yml", "unique_id": "test.tamanu.source_unique_tamanu_SequelizeMeta_name.ed3437179c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_SequelizeMeta_name"], "alias": "source_unique_tamanu_SequelizeMeta_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9584317, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "SequelizeMeta"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.SequelizeMeta"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/SequelizeMeta.yml/source_unique_tamanu_SequelizeMeta_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    name as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"SequelizeMeta\"\nwhere name is not null\ngroup by name\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'SequelizeMeta')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_SequelizeMeta_name.8bbd44e2f6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_SequelizeMeta_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_SequelizeMeta_name.sql", "original_file_path": "../../database/model/public/SequelizeMeta.yml", "unique_id": "test.tamanu.source_not_null_tamanu_SequelizeMeta_name.8bbd44e2f6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_SequelizeMeta_name"], "alias": "source_not_null_tamanu_SequelizeMeta_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9602087, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "SequelizeMeta"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.SequelizeMeta"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/SequelizeMeta.yml/source_not_null_tamanu_SequelizeMeta_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"SequelizeMeta\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'SequelizeMeta')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoices_id.5821fd311e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoices_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoices_id.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoices_id.5821fd311e", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoices_id"], "alias": "source_unique_tamanu_invoices_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9624553, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_unique_tamanu_invoices_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoices\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_id.547f4c6b53": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_id.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_id.547f4c6b53", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_id"], "alias": "source_not_null_tamanu_invoices_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9642231, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoices\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_display_id.d7f24dffea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_display_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_display_id.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_display_id.d7f24dffea", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_display_id"], "alias": "source_not_null_tamanu_invoices_display_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9660563, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_display_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect display_id\nfrom \"central\".\"public\".\"invoices\"\nwhere display_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "display_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "display_id", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_date.af363f73c1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_date.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_date.af363f73c1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_date"], "alias": "source_not_null_tamanu_invoices_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9678032, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"invoices\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_status.3cc2fac683": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_status.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_status.3cc2fac683", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_status"], "alias": "source_not_null_tamanu_invoices_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9694986, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"invoices\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised.6e4b4a0157": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__c1bf7ef91745e936067f21d8c60cdee9.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised.6e4b4a0157", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised"], "alias": "source_accepted_values_tamanu__c1bf7ef91745e936067f21d8c60cdee9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__c1bf7ef91745e936067f21d8c60cdee9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__c1bf7ef91745e936067f21d8c60cdee9"}, "created_at": 1775621421.9712515, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__c1bf7ef91745e936067f21d8c60cdee9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_accepted_values_tamanu__c1bf7ef91745e936067f21d8c60cdee9.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"invoices\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'cancelled','in_progress','finalised'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["cancelled", "in_progress", "finalised"], "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_encounter_id.165abf9a41": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_encounter_id.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_encounter_id.165abf9a41", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_encounter_id"], "alias": "source_not_null_tamanu_invoices_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9765415, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"invoices\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_.5dd1ea3660": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_47c85a765c41af008005ce231dcca4ea.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_.5dd1ea3660", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_in_47c85a765c41af008005ce231dcca4ea", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_47c85a765c41af008005ce231dcca4ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_47c85a765c41af008005ce231dcca4ea"}, "created_at": 1775621421.9783099, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_47c85a765c41af008005ce231dcca4ea\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_relationships_tamanu_in_47c85a765c41af008005ce231dcca4ea.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"invoices\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_created_at.f79d3fee01": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_created_at.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_created_at.f79d3fee01", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_created_at"], "alias": "source_not_null_tamanu_invoices_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9834104, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoices\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_patient_payment_status.c489578d60": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_patient_payment_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_patient_payment_status.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_patient_payment_status.c489578d60", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_patient_payment_status"], "alias": "source_not_null_tamanu_invoices_patient_payment_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9851797, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_patient_payment_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_payment_status\nfrom \"central\".\"public\".\"invoices\"\nwhere patient_payment_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_payment_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_payment_status", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial.fa024cba1f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__0ccf9b61af9a58ab61ca9ddeb2258ca8.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial.fa024cba1f", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial"], "alias": "source_accepted_values_tamanu__0ccf9b61af9a58ab61ca9ddeb2258ca8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__0ccf9b61af9a58ab61ca9ddeb2258ca8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__0ccf9b61af9a58ab61ca9ddeb2258ca8"}, "created_at": 1775621421.9869633, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__0ccf9b61af9a58ab61ca9ddeb2258ca8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_accepted_values_tamanu__0ccf9b61af9a58ab61ca9ddeb2258ca8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        patient_payment_status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"invoices\"\n    group by patient_payment_status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'unpaid','paid','partial'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_payment_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "patient_payment_status", "values": ["unpaid", "paid", "partial"], "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_insurer_payment_status.defe067d68": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_insurer_payment_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_insurer_payment_status.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_insurer_payment_status.defe067d68", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_insurer_payment_status"], "alias": "source_not_null_tamanu_invoices_insurer_payment_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9925315, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_insurer_payment_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect insurer_payment_status\nfrom \"central\".\"public\".\"invoices\"\nwhere insurer_payment_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "insurer_payment_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "insurer_payment_status", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected.3e0ad430bb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__1c8058746f05ad7f386a1977c9970d1d.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected.3e0ad430bb", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected"], "alias": "source_accepted_values_tamanu__1c8058746f05ad7f386a1977c9970d1d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__1c8058746f05ad7f386a1977c9970d1d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__1c8058746f05ad7f386a1977c9970d1d"}, "created_at": 1775621421.994375, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__1c8058746f05ad7f386a1977c9970d1d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_accepted_values_tamanu__1c8058746f05ad7f386a1977c9970d1d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        insurer_payment_status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"invoices\"\n    group by insurer_payment_status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'unpaid','paid','partial','rejected'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "insurer_payment_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "insurer_payment_status", "values": ["unpaid", "paid", "partial", "rejected"], "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoices_updated_at_sync_tick.1157c94f1b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoices_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoices_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoices_updated_at_sync_tick.1157c94f1b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoices_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoices_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621421.9993052, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoices.yml/source_not_null_tamanu_invoices_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoices\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoices')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_communications_id.b90ad76da2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_communications_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_communications_id.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_communications_id.b90ad76da2", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_communications_id"], "alias": "source_unique_tamanu_patient_communications_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.00165, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_unique_tamanu_patient_communications_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_communications\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_id.1fe956c44c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_communications_id.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_id.1fe956c44c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_id"], "alias": "source_not_null_tamanu_patient_communications_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0034227, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_communications_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_communications\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_created_at.33e1921e8e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_communications_created_at.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_created_at.33e1921e8e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_created_at"], "alias": "source_not_null_tamanu_patient_communications_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0051515, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_communications_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_communications\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_updated_at.871abd87ae": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_communications_updated_at.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_updated_at.871abd87ae", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_updated_at"], "alias": "source_not_null_tamanu_patient_communications_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0070488, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_communications_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_communications\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_type.4795985e7b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_communications_type.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_type.4795985e7b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_type"], "alias": "source_not_null_tamanu_patient_communications_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0087748, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_communications_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"patient_communications\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_channel.587842d7e0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_channel", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_communications_channel.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_channel.587842d7e0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_channel"], "alias": "source_not_null_tamanu_patient_communications_channel", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.01046, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_communications_channel.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect channel\nfrom \"central\".\"public\".\"patient_communications\"\nwhere channel is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "channel", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "channel", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_status.125dae34af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_communications_status.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_status.125dae34af", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_status"], "alias": "source_not_null_tamanu_patient_communications_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0121596, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_communications_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"patient_communications\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_.f0401833ba": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_29312226495b1c61b7940169207a0c20.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_.f0401833ba", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_29312226495b1c61b7940169207a0c20", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_29312226495b1c61b7940169207a0c20", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_29312226495b1c61b7940169207a0c20"}, "created_at": 1775621422.013927, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_29312226495b1c61b7940169207a0c20\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_relationships_tamanu_pa_29312226495b1c61b7940169207a0c20.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_communications\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_communications_updated_at_sync_tick.2b3912c278": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_communications_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_afead9d96d423292d879257a0dfc38e2.sql", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_communications_updated_at_sync_tick.2b3912c278", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_communications_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_afead9d96d423292d879257a0dfc38e2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_afead9d96d423292d879257a0dfc38e2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_afead9d96d423292d879257a0dfc38e2"}, "created_at": 1775621422.0190825, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_afead9d96d423292d879257a0dfc38e2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_communications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_communications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_communications.yml/source_not_null_tamanu_patient_afead9d96d423292d879257a0dfc38e2.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_communications\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_communications')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_signers_historical_id.a3bfab8f1b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_signers_historical_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_signers_historical_id.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_unique_tamanu_signers_historical_id.a3bfab8f1b", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_signers_historical_id"], "alias": "source_unique_tamanu_signers_historical_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0214012, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_unique_tamanu_signers_historical_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"signers_historical\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_id.0d0aeac24d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_id.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_id.0d0aeac24d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_id"], "alias": "source_not_null_tamanu_signers_historical_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0233257, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"signers_historical\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_created_at.42db3ab0e4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_created_at.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_created_at.42db3ab0e4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_created_at"], "alias": "source_not_null_tamanu_signers_historical_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0250556, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"signers_historical\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_updated_at.1b5d6fc4e7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_updated_at.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_updated_at.1b5d6fc4e7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_updated_at"], "alias": "source_not_null_tamanu_signers_historical_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0267801, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"signers_historical\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_country_code.42c68d2696": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_country_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_country_code.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_country_code.42c68d2696", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_country_code"], "alias": "source_not_null_tamanu_signers_historical_country_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0284705, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_country_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect country_code\nfrom \"central\".\"public\".\"signers_historical\"\nwhere country_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country_code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country_code", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_public_key.d16df118c2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_public_key", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_public_key.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_public_key.d16df118c2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_public_key"], "alias": "source_not_null_tamanu_signers_historical_public_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0302575, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_public_key.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect public_key\nfrom \"central\".\"public\".\"signers_historical\"\nwhere public_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "public_key", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "public_key", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_request.2959786f4d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_request", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_request.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_request.2959786f4d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_request"], "alias": "source_not_null_tamanu_signers_historical_request", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0329182, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_request.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect request\nfrom \"central\".\"public\".\"signers_historical\"\nwhere request is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "request", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "request", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_signers_historical_signatures_issued.da2dbdd26c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_signers_historical_signatures_issued", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_signers_historical_signatures_issued.sql", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "test.tamanu.source_not_null_tamanu_signers_historical_signatures_issued.da2dbdd26c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_signers_historical_signatures_issued"], "alias": "source_not_null_tamanu_signers_historical_signatures_issued", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.034665, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "signers_historical"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.signers_historical"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/signers_historical.yml/source_not_null_tamanu_signers_historical_signatures_issued.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect signatures_issued\nfrom \"central\".\"public\".\"signers_historical\"\nwhere signatures_issued is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "signatures_issued", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "signatures_issued", "model": "{{ get_where_subquery(source('tamanu', 'signers_historical')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_price_list_items_id.0ce15b2467": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_price_list_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_price_list_items_id.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_price_list_items_id.0ce15b2467", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_price_list_items_id"], "alias": "source_unique_tamanu_invoice_price_list_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0370026, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_unique_tamanu_invoice_price_list_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_id.5081c70d98": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_list_items_id.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_id.5081c70d98", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_id"], "alias": "source_not_null_tamanu_invoice_price_list_items_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0387535, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_price_list_items_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_created_at.94f64a01f3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_list_items_created_at.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_created_at.94f64a01f3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_created_at"], "alias": "source_not_null_tamanu_invoice_price_list_items_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.04059, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_price_list_items_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at.3be1e8411f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_list_items_updated_at.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at.3be1e8411f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_updated_at"], "alias": "source_not_null_tamanu_invoice_price_list_items_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0423248, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_price_list_items_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick.96a1770fd7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_e8f1bb5845a86606e7cbf81ea06ec223.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick.96a1770fd7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_e8f1bb5845a86606e7cbf81ea06ec223", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_e8f1bb5845a86606e7cbf81ea06ec223", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_e8f1bb5845a86606e7cbf81ea06ec223"}, "created_at": 1775621422.0440416, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_e8f1bb5845a86606e7cbf81ea06ec223\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_e8f1bb5845a86606e7cbf81ea06ec223.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id.98a95f7705": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_f33723a6a6f69425839077c30589433d.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id.98a95f7705", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id"], "alias": "source_not_null_tamanu_invoice_f33723a6a6f69425839077c30589433d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_f33723a6a6f69425839077c30589433d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_f33723a6a6f69425839077c30589433d"}, "created_at": 1775621422.045744, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_f33723a6a6f69425839077c30589433d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_f33723a6a6f69425839077c30589433d.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_price_list_id\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere invoice_price_list_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_price_list_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_price_list_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_product_id.21d5cfd939": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_invoice_product_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_87328fff0aea86f06a9c5fd4ffe7d4a5.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_product_id.21d5cfd939", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_invoice_product_id"], "alias": "source_not_null_tamanu_invoice_87328fff0aea86f06a9c5fd4ffe7d4a5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_87328fff0aea86f06a9c5fd4ffe7d4a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_87328fff0aea86f06a9c5fd4ffe7d4a5"}, "created_at": 1775621422.0474353, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_87328fff0aea86f06a9c5fd4ffe7d4a5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_87328fff0aea86f06a9c5fd4ffe7d4a5.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_product_id\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere invoice_product_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_product_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_product_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_price_list_items_is_hidden.7422bf5f0a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_price_list_items_is_hidden", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_price_list_items_is_hidden.sql", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_price_list_items_is_hidden.7422bf5f0a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_price_list_items_is_hidden"], "alias": "source_not_null_tamanu_invoice_price_list_items_is_hidden", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0491734, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_price_list_items"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_price_list_items"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_price_list_items.yml/source_not_null_tamanu_invoice_price_list_items_is_hidden.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_hidden\nfrom \"central\".\"public\".\"invoice_price_list_items\"\nwhere is_hidden is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_hidden", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_hidden", "model": "{{ get_where_subquery(source('tamanu', 'invoice_price_list_items')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_notes_id.a24a543e48": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_notes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_notes_id.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_unique_tamanu_notes_id.a24a543e48", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_notes_id"], "alias": "source_unique_tamanu_notes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.051559, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_unique_tamanu_notes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"notes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_id.09c896ad4f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_id.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_id.09c896ad4f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_id"], "alias": "source_not_null_tamanu_notes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0533056, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"notes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_created_at.6995826036": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_created_at.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_created_at.6995826036", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_created_at"], "alias": "source_not_null_tamanu_notes_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0550349, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"notes\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_updated_at.a1ee0f269e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_updated_at.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_updated_at.a1ee0f269e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_updated_at"], "alias": "source_not_null_tamanu_notes_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0567544, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"notes\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_record_id.cfea6af90a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_record_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_record_id.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_record_id.cfea6af90a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_record_id"], "alias": "source_not_null_tamanu_notes_record_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.058603, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_record_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_id\nfrom \"central\".\"public\".\"notes\"\nwhere record_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_record_type.95fdec276c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_record_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_record_type.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_record_type.95fdec276c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_record_type"], "alias": "source_not_null_tamanu_notes_record_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.060308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_record_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_type\nfrom \"central\".\"public\".\"notes\"\nwhere record_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_type", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage.bec5c8fb7d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__d17ff06c2fb879c65473b91b3a8f21f3.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage.bec5c8fb7d", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage"], "alias": "source_accepted_values_tamanu__d17ff06c2fb879c65473b91b3a8f21f3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__d17ff06c2fb879c65473b91b3a8f21f3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__d17ff06c2fb879c65473b91b3a8f21f3"}, "created_at": 1775621422.062064, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__d17ff06c2fb879c65473b91b3a8f21f3\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_accepted_values_tamanu__d17ff06c2fb879c65473b91b3a8f21f3.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        record_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"notes\"\n    group by record_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Encounter','ImagingRequest','LabRequest','Patient','PatientCarePlan','Triage'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "record_type", "values": ["Encounter", "ImagingRequest", "LabRequest", "Patient", "PatientCarePlan", "Triage"], "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_date.da7301eac5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_date.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_date.da7301eac5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_date"], "alias": "source_not_null_tamanu_notes_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0687678, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"notes\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_updated_at_sync_tick.c817dbafe2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_updated_at_sync_tick.c817dbafe2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_updated_at_sync_tick"], "alias": "source_not_null_tamanu_notes_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0705082, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"notes\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_notes_author_id__id__source_tamanu_users_.d295cc11d5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_notes_author_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_39756f88f8af689fc33fa616ac2a2ed3.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_relationships_tamanu_notes_author_id__id__source_tamanu_users_.d295cc11d5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_notes_author_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_no_39756f88f8af689fc33fa616ac2a2ed3", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_39756f88f8af689fc33fa616ac2a2ed3", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_39756f88f8af689fc33fa616ac2a2ed3"}, "created_at": 1775621422.0722773, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_39756f88f8af689fc33fa616ac2a2ed3\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_relationships_tamanu_no_39756f88f8af689fc33fa616ac2a2ed3.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select author_id as from_field\n    from \"central\".\"public\".\"notes\"\n    where author_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "author_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "author_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_.8b38421ee7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_03645bf53e52261be97347577b4b2caa.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_.8b38421ee7", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_no_03645bf53e52261be97347577b4b2caa", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_03645bf53e52261be97347577b4b2caa", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_03645bf53e52261be97347577b4b2caa"}, "created_at": 1775621422.0775259, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_03645bf53e52261be97347577b4b2caa\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_relationships_tamanu_no_03645bf53e52261be97347577b4b2caa.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select on_behalf_of_id as from_field\n    from \"central\".\"public\".\"notes\"\n    where on_behalf_of_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "on_behalf_of_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "on_behalf_of_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_content.aaef9e6205": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_content", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_content.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_content.aaef9e6205", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_content"], "alias": "source_not_null_tamanu_notes_content", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0826256, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_content.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect content\nfrom \"central\".\"public\".\"notes\"\nwhere content is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "content", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "content", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_.2e3d834e0e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_no_e459d796a026a85af8bddcf84d75e935.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_.2e3d834e0e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_"], "alias": "source_relationships_tamanu_no_e459d796a026a85af8bddcf84d75e935", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_no_e459d796a026a85af8bddcf84d75e935", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_no_e459d796a026a85af8bddcf84d75e935"}, "created_at": 1775621422.0844588, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_no_e459d796a026a85af8bddcf84d75e935\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"], ["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_relationships_tamanu_no_e459d796a026a85af8bddcf84d75e935.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select revised_by_id as from_field\n    from \"central\".\"public\".\"notes\"\n    where revised_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"notes\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "revised_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "revised_by_id", "to": "source('tamanu', 'notes')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_note_type_id.149bd5c822": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_note_type_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_note_type_id.sql", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_note_type_id.149bd5c822", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_note_type_id"], "alias": "source_not_null_tamanu_notes_note_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0893269, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes.yml/source_not_null_tamanu_notes_note_type_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect note_type_id\nfrom \"central\".\"public\".\"notes\"\nwhere note_type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "note_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "note_type_id", "model": "{{ get_where_subquery(source('tamanu', 'notes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_imaging_results_id.6830573d99": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_imaging_results_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_imaging_results_id.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_unique_tamanu_imaging_results_id.6830573d99", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_imaging_results_id"], "alias": "source_unique_tamanu_imaging_results_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0919511, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_unique_tamanu_imaging_results_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"imaging_results\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_id.bc45b4d2ee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_id.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_id.bc45b4d2ee", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_id"], "alias": "source_not_null_tamanu_imaging_results_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.093705, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"imaging_results\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_created_at.59c90956bf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_created_at.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_created_at.59c90956bf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_created_at"], "alias": "source_not_null_tamanu_imaging_results_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.095413, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"imaging_results\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_updated_at.6f4012c0e4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_updated_at.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_updated_at.6f4012c0e4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_updated_at"], "alias": "source_not_null_tamanu_imaging_results_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0971305, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"imaging_results\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_updated_at_sync_tick.35b86ae623": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_updated_at_sync_tick.35b86ae623", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_updated_at_sync_tick"], "alias": "source_not_null_tamanu_imaging_results_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.0989723, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"imaging_results\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_visibility_status.80dbc6bd58": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_visibility_status.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_visibility_status.80dbc6bd58", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_visibility_status"], "alias": "source_not_null_tamanu_imaging_results_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1007, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"imaging_results\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_imaging_request_id.68d290fbfe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_imaging_request_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_imaging_request_id.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_imaging_request_id.68d290fbfe", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_imaging_request_id"], "alias": "source_not_null_tamanu_imaging_results_imaging_request_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1023812, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_imaging_request_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect imaging_request_id\nfrom \"central\".\"public\".\"imaging_results\"\nwhere imaging_request_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "imaging_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "imaging_request_id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_.2549bf4069": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_e277fbdaf6496fc209dae2c03fae6cde.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_.2549bf4069", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_"], "alias": "source_relationships_tamanu_im_e277fbdaf6496fc209dae2c03fae6cde", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_e277fbdaf6496fc209dae2c03fae6cde", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_e277fbdaf6496fc209dae2c03fae6cde"}, "created_at": 1775621422.1040995, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_e277fbdaf6496fc209dae2c03fae6cde\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"], ["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_relationships_tamanu_im_e277fbdaf6496fc209dae2c03fae6cde.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select imaging_request_id as from_field\n    from \"central\".\"public\".\"imaging_results\"\n    where imaging_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"imaging_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "imaging_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "imaging_request_id", "to": "source('tamanu', 'imaging_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_.cf92796113": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_488baf45204d64cd9e491ec5e7b600a5.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_.cf92796113", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_im_488baf45204d64cd9e491ec5e7b600a5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_488baf45204d64cd9e491ec5e7b600a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_488baf45204d64cd9e491ec5e7b600a5"}, "created_at": 1775621422.1093678, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_488baf45204d64cd9e491ec5e7b600a5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_relationships_tamanu_im_488baf45204d64cd9e491ec5e7b600a5.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select completed_by_id as from_field\n    from \"central\".\"public\".\"imaging_results\"\n    where completed_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "completed_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "completed_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_results_completed_at.3e8e297046": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_results_completed_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_results_completed_at.sql", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_results_completed_at.3e8e297046", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_results_completed_at"], "alias": "source_not_null_tamanu_imaging_results_completed_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1145952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_results"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_results"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_results.yml/source_not_null_tamanu_imaging_results_completed_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect completed_at\nfrom \"central\".\"public\".\"imaging_results\"\nwhere completed_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "completed_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "completed_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_results')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_discharges_id.8b9c580a59": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_discharges_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_discharges_id.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_unique_tamanu_discharges_id.8b9c580a59", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_discharges_id"], "alias": "source_unique_tamanu_discharges_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1169329, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_unique_tamanu_discharges_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"discharges\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_discharges_id.4a7ff5af7b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_discharges_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_discharges_id.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_not_null_tamanu_discharges_id.4a7ff5af7b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_discharges_id"], "alias": "source_not_null_tamanu_discharges_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1186724, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_not_null_tamanu_discharges_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"discharges\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_discharges_encounter_id.5299e31574": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_discharges_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_discharges_encounter_id.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_not_null_tamanu_discharges_encounter_id.5299e31574", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_discharges_encounter_id"], "alias": "source_not_null_tamanu_discharges_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.120367, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_not_null_tamanu_discharges_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"discharges\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_.43adeff312": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_di_9937c1a8558847b3c86b755314f2b0b1.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_.43adeff312", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_di_9937c1a8558847b3c86b755314f2b0b1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_di_9937c1a8558847b3c86b755314f2b0b1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_di_9937c1a8558847b3c86b755314f2b0b1"}, "created_at": 1775621422.122133, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_di_9937c1a8558847b3c86b755314f2b0b1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_relationships_tamanu_di_9937c1a8558847b3c86b755314f2b0b1.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"discharges\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_.1e9379ede1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_di_e5cf1d12f72e8f097325f74916f81975.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_.1e9379ede1", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_di_e5cf1d12f72e8f097325f74916f81975", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_di_e5cf1d12f72e8f097325f74916f81975", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_di_e5cf1d12f72e8f097325f74916f81975"}, "created_at": 1775621422.1272025, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_di_e5cf1d12f72e8f097325f74916f81975\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_relationships_tamanu_di_e5cf1d12f72e8f097325f74916f81975.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select discharger_id as from_field\n    from \"central\".\"public\".\"discharges\"\n    where discharger_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "discharger_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "discharger_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_.2fff0e5fc5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_b963dbbb1037214038e4b26b626b1af9.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_.2fff0e5fc5", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_"], "alias": "dbt_utils_source_relationships_b963dbbb1037214038e4b26b626b1af9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_b963dbbb1037214038e4b26b626b1af9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_b963dbbb1037214038e4b26b626b1af9"}, "created_at": 1775621422.1328273, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_b963dbbb1037214038e4b26b626b1af9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/dbt_utils_source_relationships_b963dbbb1037214038e4b26b626b1af9.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    disposition_id as id\n\n  from \"central\".\"public\".\"discharges\"\n\n  where disposition_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'dischargeDisposition'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "disposition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "disposition_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'dischargeDisposition'", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_discharges_updated_at_sync_tick.0b20bf424c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_discharges_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_discharges_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_not_null_tamanu_discharges_updated_at_sync_tick.0b20bf424c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_discharges_updated_at_sync_tick"], "alias": "source_not_null_tamanu_discharges_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1382341, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_not_null_tamanu_discharges_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"discharges\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_.1fe0fe6f7f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_di_d0fd6188d7232f2b06ff02e74d239edd.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_.1fe0fe6f7f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_di_d0fd6188d7232f2b06ff02e74d239edd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_di_d0fd6188d7232f2b06ff02e74d239edd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_di_d0fd6188d7232f2b06ff02e74d239edd"}, "created_at": 1775621422.1400175, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_di_d0fd6188d7232f2b06ff02e74d239edd\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_relationships_tamanu_di_d0fd6188d7232f2b06ff02e74d239edd.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_name as from_field\n    from \"central\".\"public\".\"discharges\"\n    where facility_name is not null\n),\n\nparent as (\n    select name as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_name", "to": "source('tamanu', 'facilities')", "field": "name", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_.298b48d81f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_di_bbcfe64432ff46e89906d27535f8520c.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_.298b48d81f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_di_bbcfe64432ff46e89906d27535f8520c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_di_bbcfe64432ff46e89906d27535f8520c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_di_bbcfe64432ff46e89906d27535f8520c"}, "created_at": 1775621422.1450021, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_di_bbcfe64432ff46e89906d27535f8520c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_relationships_tamanu_di_bbcfe64432ff46e89906d27535f8520c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_address as from_field\n    from \"central\".\"public\".\"discharges\"\n    where facility_address is not null\n),\n\nparent as (\n    select street_address as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_address", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_address", "to": "source('tamanu', 'facilities')", "field": "street_address", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_.68747350e4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_di_6cf3073596394ccfd61dfb76d7e2f192.sql", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "test.tamanu.source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_.68747350e4", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_di_6cf3073596394ccfd61dfb76d7e2f192", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_di_6cf3073596394ccfd61dfb76d7e2f192", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_di_6cf3073596394ccfd61dfb76d7e2f192"}, "created_at": 1775621422.15008, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_di_6cf3073596394ccfd61dfb76d7e2f192\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "discharges"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.discharges"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/discharges.yml/source_relationships_tamanu_di_6cf3073596394ccfd61dfb76d7e2f192.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_town as from_field\n    from \"central\".\"public\".\"discharges\"\n    where facility_town is not null\n),\n\nparent as (\n    select city_town as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_town", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_town", "to": "source('tamanu', 'facilities')", "field": "city_town", "model": "{{ get_where_subquery(source('tamanu', 'discharges')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_ongoing_prescriptions_id.acc37386e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_ongoing_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_ongoing_prescriptions_id.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_ongoing_prescriptions_id.acc37386e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_ongoing_prescriptions_id"], "alias": "source_unique_tamanu_patient_ongoing_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1557376, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_unique_tamanu_patient_ongoing_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_id.01386e7977": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_ongoing_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_ongoing_prescriptions_id.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_id.01386e7977", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_ongoing_prescriptions_id"], "alias": "source_not_null_tamanu_patient_ongoing_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.157498, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_not_null_tamanu_patient_ongoing_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.f41a0ed63a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_ongoing_prescriptions_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.f41a0ed63a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_ongoing_prescriptions_patient_id"], "alias": "source_not_null_tamanu_patient_ongoing_prescriptions_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1592472, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id.3409401d0e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_a79104510c6558312316085bc7cccfb6.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id.3409401d0e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id"], "alias": "source_not_null_tamanu_patient_a79104510c6558312316085bc7cccfb6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_a79104510c6558312316085bc7cccfb6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_a79104510c6558312316085bc7cccfb6"}, "created_at": 1775621422.1609828, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_a79104510c6558312316085bc7cccfb6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_not_null_tamanu_patient_a79104510c6558312316085bc7cccfb6.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect prescription_id\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere prescription_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "prescription_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "prescription_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_created_at.0bf2c435a7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_ongoing_prescriptions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_ongoing_prescriptions_created_at.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_created_at.0bf2c435a7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_ongoing_prescriptions_created_at"], "alias": "source_not_null_tamanu_patient_ongoing_prescriptions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.162875, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_not_null_tamanu_patient_ongoing_prescriptions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.6af6ca8d00": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_ongoing_prescriptions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.6af6ca8d00", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_ongoing_prescriptions_updated_at"], "alias": "source_not_null_tamanu_patient_ongoing_prescriptions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1646023, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick.d9e250caae": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_f069c79bae2d4c81733b203f8a958479.sql", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick.d9e250caae", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_f069c79bae2d4c81733b203f8a958479", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_f069c79bae2d4c81733b203f8a958479", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_f069c79bae2d4c81733b203f8a958479"}, "created_at": 1775621422.166317, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_f069c79bae2d4c81733b203f8a958479\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_ongoing_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_ongoing_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_ongoing_prescriptions.yml/source_not_null_tamanu_patient_f069c79bae2d4c81733b203f8a958479.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_ongoing_prescriptions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_ongoing_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_location_assignment_templates_id.2a2b122606": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_location_assignment_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_location_assignment_templates_id.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_unique_tamanu_location_assignment_templates_id.2a2b122606", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_location_assignment_templates_id"], "alias": "source_unique_tamanu_location_assignment_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1686084, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_unique_tamanu_location_assignment_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_id.91706d5751": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_id.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_id.91706d5751", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_id"], "alias": "source_not_null_tamanu_location_assignment_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.170482, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_user_id.fc74c558b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_user_id.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_user_id.fc74c558b6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_user_id"], "alias": "source_not_null_tamanu_location_assignment_templates_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1722267, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_location_id.f01a2ba717": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_location_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locatio_da2bfda0b42784a16e668c46b0542524.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_location_id.f01a2ba717", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_location_id"], "alias": "source_not_null_tamanu_locatio_da2bfda0b42784a16e668c46b0542524", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_locatio_da2bfda0b42784a16e668c46b0542524", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_locatio_da2bfda0b42784a16e668c46b0542524"}, "created_at": 1775621422.1739583, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_locatio_da2bfda0b42784a16e668c46b0542524\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_locatio_da2bfda0b42784a16e668c46b0542524.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect location_id\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere location_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "location_id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_date.0265301d5d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_date.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_date.0265301d5d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_date"], "alias": "source_not_null_tamanu_location_assignment_templates_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1757302, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_start_time.aad4cea7dc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_start_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_start_time.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_start_time.aad4cea7dc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_start_time"], "alias": "source_not_null_tamanu_location_assignment_templates_start_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.177438, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_start_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect start_time\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere start_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "start_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_time", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_end_time.65aa617784": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_end_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_end_time.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_end_time.65aa617784", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_end_time"], "alias": "source_not_null_tamanu_location_assignment_templates_end_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1792486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_end_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect end_time\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere end_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "end_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_time", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_end_date.cfd6b45ace": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_repeat_end_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locatio_b8acb799300384351e0ae65772880b51.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_end_date.cfd6b45ace", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_repeat_end_date"], "alias": "source_not_null_tamanu_locatio_b8acb799300384351e0ae65772880b51", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_locatio_b8acb799300384351e0ae65772880b51", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_locatio_b8acb799300384351e0ae65772880b51"}, "created_at": 1775621422.1809614, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_locatio_b8acb799300384351e0ae65772880b51\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_locatio_b8acb799300384351e0ae65772880b51.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect repeat_end_date\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere repeat_end_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "repeat_end_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "repeat_end_date", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_frequency.c7157d2070": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_repeat_frequency", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locatio_f6951ec45370462a2acc8387c2367f0f.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_frequency.c7157d2070", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_repeat_frequency"], "alias": "source_not_null_tamanu_locatio_f6951ec45370462a2acc8387c2367f0f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_locatio_f6951ec45370462a2acc8387c2367f0f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_locatio_f6951ec45370462a2acc8387c2367f0f"}, "created_at": 1775621422.1826603, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_locatio_f6951ec45370462a2acc8387c2367f0f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_locatio_f6951ec45370462a2acc8387c2367f0f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect repeat_frequency\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere repeat_frequency is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "repeat_frequency", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "repeat_frequency", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_unit.2fca6b103d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_repeat_unit", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locatio_aa1d1e6c407835f0e02cc5a70b096722.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_unit.2fca6b103d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_repeat_unit"], "alias": "source_not_null_tamanu_locatio_aa1d1e6c407835f0e02cc5a70b096722", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_locatio_aa1d1e6c407835f0e02cc5a70b096722", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_locatio_aa1d1e6c407835f0e02cc5a70b096722"}, "created_at": 1775621422.1843545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_locatio_aa1d1e6c407835f0e02cc5a70b096722\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_locatio_aa1d1e6c407835f0e02cc5a70b096722.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect repeat_unit\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere repeat_unit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "repeat_unit", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "repeat_unit", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_created_at.a5e55e1095": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_created_at.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_created_at.a5e55e1095", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_created_at"], "alias": "source_not_null_tamanu_location_assignment_templates_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1860642, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at.813872183e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignment_templates_updated_at.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at.813872183e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_updated_at"], "alias": "source_not_null_tamanu_location_assignment_templates_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.1877882, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_location_assignment_templates_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick.902f20bfe3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locatio_6a7f38887280ccd51ee1f8ecd2f431bc.sql", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick.902f20bfe3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick"], "alias": "source_not_null_tamanu_locatio_6a7f38887280ccd51ee1f8ecd2f431bc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_locatio_6a7f38887280ccd51ee1f8ecd2f431bc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_locatio_6a7f38887280ccd51ee1f8ecd2f431bc"}, "created_at": 1775621422.1895976, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_locatio_6a7f38887280ccd51ee1f8ecd2f431bc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignment_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignment_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignment_templates.yml/source_not_null_tamanu_locatio_6a7f38887280ccd51ee1f8ecd2f431bc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"location_assignment_templates\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'location_assignment_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_facilities_facility_id.2e4a51e2f6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_facilities_facility_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_facilities_facility_id.sql", "original_file_path": "../../database/model/public/patient_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_facilities_facility_id.2e4a51e2f6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_facilities_facility_id"], "alias": "source_not_null_tamanu_patient_facilities_facility_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.191857, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_facilities.yml/source_not_null_tamanu_patient_facilities_facility_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect facility_id\nfrom \"central\".\"public\".\"patient_facilities\"\nwhere facility_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "facility_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_.8a454e3fea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_c78717bf2419228f10044e6d85ff8449.sql", "original_file_path": "../../database/model/public/patient_facilities.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_.8a454e3fea", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_pa_c78717bf2419228f10044e6d85ff8449", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_c78717bf2419228f10044e6d85ff8449", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_c78717bf2419228f10044e6d85ff8449"}, "created_at": 1775621422.1936486, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_c78717bf2419228f10044e6d85ff8449\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "patient_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_facilities.yml/source_relationships_tamanu_pa_c78717bf2419228f10044e6d85ff8449.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"patient_facilities\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_facilities_patient_id.a4d7ee14a4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_facilities_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_facilities_patient_id.sql", "original_file_path": "../../database/model/public/patient_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_facilities_patient_id.a4d7ee14a4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_facilities_patient_id"], "alias": "source_not_null_tamanu_patient_facilities_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.199029, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_facilities.yml/source_not_null_tamanu_patient_facilities_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_facilities\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_.62c931e062": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_eabe8ec8f86a90ec7286506eabcb346e.sql", "original_file_path": "../../database/model/public/patient_facilities.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_.62c931e062", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_eabe8ec8f86a90ec7286506eabcb346e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_eabe8ec8f86a90ec7286506eabcb346e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_eabe8ec8f86a90ec7286506eabcb346e"}, "created_at": 1775621422.2008283, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_eabe8ec8f86a90ec7286506eabcb346e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_facilities.yml/source_relationships_tamanu_pa_eabe8ec8f86a90ec7286506eabcb346e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_facilities\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_care_plans_id.a3a1194e99": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_care_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_care_plans_id.sql", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_care_plans_id.a3a1194e99", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_care_plans_id"], "alias": "source_unique_tamanu_patient_care_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2065022, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_care_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_care_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_care_plans.yml/source_unique_tamanu_patient_care_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_care_plans\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_care_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_care_plans_id.56024c4140": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_care_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_care_plans_id.sql", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_care_plans_id.56024c4140", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_care_plans_id"], "alias": "source_not_null_tamanu_patient_care_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2082577, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_care_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_care_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_care_plans.yml/source_not_null_tamanu_patient_care_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_care_plans\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_care_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_care_plans_created_at.dd6e82d0b1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_care_plans_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_care_plans_created_at.sql", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_care_plans_created_at.dd6e82d0b1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_care_plans_created_at"], "alias": "source_not_null_tamanu_patient_care_plans_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2099802, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_care_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_care_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_care_plans.yml/source_not_null_tamanu_patient_care_plans_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_care_plans\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_care_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at.b6d6e4d022": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_care_plans_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_care_plans_updated_at.sql", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at.b6d6e4d022", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_care_plans_updated_at"], "alias": "source_not_null_tamanu_patient_care_plans_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2116835, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_care_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_care_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_care_plans.yml/source_not_null_tamanu_patient_care_plans_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_care_plans\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_care_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_care_plans_date.34408a1445": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_care_plans_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_care_plans_date.sql", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_care_plans_date.34408a1445", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_care_plans_date"], "alias": "source_not_null_tamanu_patient_care_plans_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2135286, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_care_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_care_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_care_plans.yml/source_not_null_tamanu_patient_care_plans_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"patient_care_plans\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'patient_care_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.310ae42450": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_care_plans_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.310ae42450", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_care_plans_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_care_plans_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.215259, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_care_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_care_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_care_plans.yml/source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_care_plans\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_care_plans')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_surveys_id.0e6c4290cc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_surveys_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_surveys_id.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_unique_tamanu_surveys_id.0e6c4290cc", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_surveys_id"], "alias": "source_unique_tamanu_surveys_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.217504, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_unique_tamanu_surveys_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"surveys\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_id.232633415e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_id.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_id.232633415e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_id"], "alias": "source_not_null_tamanu_surveys_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2193685, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"surveys\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_created_at.49abf4cc08": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_created_at.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_created_at.49abf4cc08", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_created_at"], "alias": "source_not_null_tamanu_surveys_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.221199, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"surveys\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_updated_at.88f3f24266": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_updated_at.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_updated_at.88f3f24266", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_updated_at"], "alias": "source_not_null_tamanu_surveys_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2229092, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"surveys\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_.fa85daf635": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_su_1586588afe9f2664a305c99082d665d6.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_.fa85daf635", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_"], "alias": "source_relationships_tamanu_su_1586588afe9f2664a305c99082d665d6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_su_1586588afe9f2664a305c99082d665d6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_su_1586588afe9f2664a305c99082d665d6"}, "created_at": 1775621422.2246256, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_su_1586588afe9f2664a305c99082d665d6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "programs"], ["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.programs", "source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_relationships_tamanu_su_1586588afe9f2664a305c99082d665d6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select program_id as from_field\n    from \"central\".\"public\".\"surveys\"\n    where program_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"programs\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "program_id", "to": "source('tamanu', 'programs')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals.fb3dae8522": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__92304247c93ca90fc7c79b59e3d65234.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals.fb3dae8522", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals"], "alias": "source_accepted_values_tamanu__92304247c93ca90fc7c79b59e3d65234", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__92304247c93ca90fc7c79b59e3d65234", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__92304247c93ca90fc7c79b59e3d65234"}, "created_at": 1775621422.230518, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__92304247c93ca90fc7c79b59e3d65234\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_accepted_values_tamanu__92304247c93ca90fc7c79b59e3d65234.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        survey_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"surveys\"\n    group by survey_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'programs','referral','obsolete','vitals'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "survey_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "survey_type", "values": ["programs", "referral", "obsolete", "vitals"], "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_is_sensitive.5f59558cfe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_is_sensitive", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_is_sensitive.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_is_sensitive.5f59558cfe", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_is_sensitive"], "alias": "source_not_null_tamanu_surveys_is_sensitive", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2354732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_is_sensitive.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_sensitive\nfrom \"central\".\"public\".\"surveys\"\nwhere is_sensitive is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_sensitive", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_sensitive", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_updated_at_sync_tick.27e79d3218": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_updated_at_sync_tick.27e79d3218", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_updated_at_sync_tick"], "alias": "source_not_null_tamanu_surveys_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.23745, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"surveys\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_notifiable.fa289a592a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_notifiable", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_notifiable.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_notifiable.fa289a592a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_notifiable"], "alias": "source_not_null_tamanu_surveys_notifiable", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2391949, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_notifiable.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect notifiable\nfrom \"central\".\"public\".\"surveys\"\nwhere notifiable is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "notifiable", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "notifiable", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_notify_email_addresses.6c0b996c80": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_notify_email_addresses", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_notify_email_addresses.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_notify_email_addresses.6c0b996c80", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_notify_email_addresses"], "alias": "source_not_null_tamanu_surveys_notify_email_addresses", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.240906, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_notify_email_addresses.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect notify_email_addresses\nfrom \"central\".\"public\".\"surveys\"\nwhere notify_email_addresses is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "notify_email_addresses", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "notify_email_addresses", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_surveys_visibility_status.a50fde3a7b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_surveys_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_surveys_visibility_status.sql", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_surveys_visibility_status.a50fde3a7b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_surveys_visibility_status"], "alias": "source_not_null_tamanu_surveys_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.242625, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/surveys.yml/source_not_null_tamanu_surveys_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"surveys\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'surveys')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_appointment_procedure_types_id.037055b61c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_appointment_procedure_types_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_appointment_procedure_types_id.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_unique_tamanu_appointment_procedure_types_id.037055b61c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_appointment_procedure_types_id"], "alias": "source_unique_tamanu_appointment_procedure_types_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.244936, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_unique_tamanu_appointment_procedure_types_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_procedure_types_id.138766fc43": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_procedure_types_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_procedure_types_id.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_procedure_types_id.138766fc43", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_procedure_types_id"], "alias": "source_not_null_tamanu_appointment_procedure_types_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2467937, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_not_null_tamanu_appointment_procedure_types_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_procedure_types_appointment_id.5ad9e548f4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_procedure_types_appointment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appoint_8a482054604b9a95b107c57b47540a0f.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_procedure_types_appointment_id.5ad9e548f4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_procedure_types_appointment_id"], "alias": "source_not_null_tamanu_appoint_8a482054604b9a95b107c57b47540a0f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_appoint_8a482054604b9a95b107c57b47540a0f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_appoint_8a482054604b9a95b107c57b47540a0f"}, "created_at": 1775621422.248527, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_appoint_8a482054604b9a95b107c57b47540a0f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_not_null_tamanu_appoint_8a482054604b9a95b107c57b47540a0f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect appointment_id\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere appointment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "appointment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "appointment_id", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_procedure_types_procedure_type_id.14840677e5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_procedure_types_procedure_type_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appoint_71b265d22c36fa3e137a7d89146c8703.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_procedure_types_procedure_type_id.14840677e5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_procedure_types_procedure_type_id"], "alias": "source_not_null_tamanu_appoint_71b265d22c36fa3e137a7d89146c8703", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_appoint_71b265d22c36fa3e137a7d89146c8703", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_appoint_71b265d22c36fa3e137a7d89146c8703"}, "created_at": 1775621422.2502623, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_appoint_71b265d22c36fa3e137a7d89146c8703\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_not_null_tamanu_appoint_71b265d22c36fa3e137a7d89146c8703.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect procedure_type_id\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere procedure_type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "procedure_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "procedure_type_id", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_procedure_types_created_at.2e4c1b17ce": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_procedure_types_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_procedure_types_created_at.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_procedure_types_created_at.2e4c1b17ce", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_procedure_types_created_at"], "alias": "source_not_null_tamanu_appointment_procedure_types_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2519834, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_not_null_tamanu_appointment_procedure_types_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at.7d42fb36d3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_procedure_types_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointment_procedure_types_updated_at.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at.7d42fb36d3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_procedure_types_updated_at"], "alias": "source_not_null_tamanu_appointment_procedure_types_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2537074, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_not_null_tamanu_appointment_procedure_types_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick.66fee65a6c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appoint_032ffafa3a69d15d514fd4c9b3714042.sql", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick.66fee65a6c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick"], "alias": "source_not_null_tamanu_appoint_032ffafa3a69d15d514fd4c9b3714042", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_appoint_032ffafa3a69d15d514fd4c9b3714042", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_appoint_032ffafa3a69d15d514fd4c9b3714042"}, "created_at": 1775621422.2555244, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_appoint_032ffafa3a69d15d514fd4c9b3714042\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointment_procedure_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointment_procedure_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointment_procedure_types.yml/source_not_null_tamanu_appoint_032ffafa3a69d15d514fd4c9b3714042.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"appointment_procedure_types\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'appointment_procedure_types')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_report_requests_id.d871afb2cf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_report_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_report_requests_id.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_unique_tamanu_report_requests_id.d871afb2cf", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_report_requests_id"], "alias": "source_unique_tamanu_report_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2577665, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_unique_tamanu_report_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"report_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_id.8374913dcd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_id.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_id.8374913dcd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_id"], "alias": "source_not_null_tamanu_report_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2594762, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"report_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_created_at.5d76519d08": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_created_at.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_created_at.5d76519d08", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_created_at"], "alias": "source_not_null_tamanu_report_requests_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2611837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"report_requests\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_updated_at.60abf391b8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_updated_at.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_updated_at.60abf391b8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_updated_at"], "alias": "source_not_null_tamanu_report_requests_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.26301, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"report_requests\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_recipients.d49a8a2f72": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_recipients", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_recipients.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_recipients.d49a8a2f72", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_recipients"], "alias": "source_not_null_tamanu_report_requests_recipients", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2647493, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_recipients.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect recipients\nfrom \"central\".\"public\".\"report_requests\"\nwhere recipients is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recipients", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "recipients", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_status.4eafffa24a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_status.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_status.4eafffa24a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_status"], "alias": "source_not_null_tamanu_report_requests_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.266429, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"report_requests\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error.526b71b853": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__24a114ea0caac02877dca5c270dc5fc8.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error.526b71b853", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error"], "alias": "source_accepted_values_tamanu__24a114ea0caac02877dca5c270dc5fc8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__24a114ea0caac02877dca5c270dc5fc8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__24a114ea0caac02877dca5c270dc5fc8"}, "created_at": 1775621422.2681725, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__24a114ea0caac02877dca5c270dc5fc8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_accepted_values_tamanu__24a114ea0caac02877dca5c270dc5fc8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"report_requests\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Received','Processing','Processed','Error'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["Received", "Processing", "Processed", "Error"], "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_requested_by_user_id.10828a78a1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_requested_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_requested_by_user_id.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_requested_by_user_id.10828a78a1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_requested_by_user_id"], "alias": "source_not_null_tamanu_report_requests_requested_by_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2736466, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_requested_by_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect requested_by_user_id\nfrom \"central\".\"public\".\"report_requests\"\nwhere requested_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "requested_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "requested_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_.11b6b8f5c4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_1723d1cbb5133171b4b17f176af16c95.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_.11b6b8f5c4", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_re_1723d1cbb5133171b4b17f176af16c95", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_1723d1cbb5133171b4b17f176af16c95", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_1723d1cbb5133171b4b17f176af16c95"}, "created_at": 1775621422.2754252, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_1723d1cbb5133171b4b17f176af16c95\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_relationships_tamanu_re_1723d1cbb5133171b4b17f176af16c95.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select requested_by_user_id as from_field\n    from \"central\".\"public\".\"report_requests\"\n    where requested_by_user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "requested_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "requested_by_user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_.ce7ace92aa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_129974f546797fea7a3845057b3199b6.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_.ce7ace92aa", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_re_129974f546797fea7a3845057b3199b6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_129974f546797fea7a3845057b3199b6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_129974f546797fea7a3845057b3199b6"}, "created_at": 1775621422.280624, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_129974f546797fea7a3845057b3199b6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_relationships_tamanu_re_129974f546797fea7a3845057b3199b6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"report_requests\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_export_format.0e947a46a3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_export_format", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_export_format.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_export_format.0e947a46a3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_export_format"], "alias": "source_not_null_tamanu_report_requests_export_format", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.285649, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_export_format.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect export_format\nfrom \"central\".\"public\".\"report_requests\"\nwhere export_format is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "export_format", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "export_format", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_report_requests_export_format__xlsx__csv.68903ce3f9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_report_requests_export_format__xlsx__csv", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__7cad5453a40be771bcdacbe1df1da35d.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_report_requests_export_format__xlsx__csv.68903ce3f9", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_report_requests_export_format__xlsx__csv"], "alias": "source_accepted_values_tamanu__7cad5453a40be771bcdacbe1df1da35d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__7cad5453a40be771bcdacbe1df1da35d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__7cad5453a40be771bcdacbe1df1da35d"}, "created_at": 1775621422.2876613, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__7cad5453a40be771bcdacbe1df1da35d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_accepted_values_tamanu__7cad5453a40be771bcdacbe1df1da35d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        export_format as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"report_requests\"\n    group by export_format\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'xlsx','csv'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "export_format", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "export_format", "values": ["xlsx", "csv"], "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_.c9440b513d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_2927e7a244cfed48746aa65a6789c553.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_.c9440b513d", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_"], "alias": "source_relationships_tamanu_re_2927e7a244cfed48746aa65a6789c553", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_2927e7a244cfed48746aa65a6789c553", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_2927e7a244cfed48746aa65a6789c553"}, "created_at": 1775621422.2926595, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_2927e7a244cfed48746aa65a6789c553\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"], ["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions", "source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_relationships_tamanu_re_2927e7a244cfed48746aa65a6789c553.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select report_definition_version_id as from_field\n    from \"central\".\"public\".\"report_requests\"\n    where report_definition_version_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"report_definition_versions\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "report_definition_version_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "report_definition_version_id", "to": "source('tamanu', 'report_definition_versions')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_requests_updated_at_sync_tick.eef7d7f267": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_requests_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_requests_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_requests_updated_at_sync_tick.eef7d7f267", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_requests_updated_at_sync_tick"], "alias": "source_not_null_tamanu_report_requests_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.2977674, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_requests.yml/source_not_null_tamanu_report_requests_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"report_requests\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'report_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_reference_drugs_id.b18d9ebb13": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_reference_drugs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_reference_drugs_id.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_unique_tamanu_reference_drugs_id.b18d9ebb13", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_reference_drugs_id"], "alias": "source_unique_tamanu_reference_drugs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3001177, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_unique_tamanu_reference_drugs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drugs_id.262b5ed3f6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drugs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drugs_id.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drugs_id.262b5ed3f6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drugs_id"], "alias": "source_not_null_tamanu_reference_drugs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3020437, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_not_null_tamanu_reference_drugs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_reference_drugs_reference_data_id.ecedb99e2c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_reference_drugs_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_reference_drugs_reference_data_id.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_unique_tamanu_reference_drugs_reference_data_id.ecedb99e2c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_reference_drugs_reference_data_id"], "alias": "source_unique_tamanu_reference_drugs_reference_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3037946, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_unique_tamanu_reference_drugs_reference_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    reference_data_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere reference_data_id is not null\ngroup by reference_data_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reference_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "reference_data_id", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drugs_reference_data_id.69bff85f87": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drugs_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drugs_reference_data_id.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drugs_reference_data_id.69bff85f87", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drugs_reference_data_id"], "alias": "source_not_null_tamanu_reference_drugs_reference_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.305496, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_not_null_tamanu_reference_drugs_reference_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect reference_data_id\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere reference_data_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reference_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "reference_data_id", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drugs_is_sensitive.e5bd778894": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drugs_is_sensitive", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drugs_is_sensitive.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drugs_is_sensitive.e5bd778894", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drugs_is_sensitive"], "alias": "source_not_null_tamanu_reference_drugs_is_sensitive", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3072164, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_not_null_tamanu_reference_drugs_is_sensitive.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_sensitive\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere is_sensitive is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_sensitive", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_sensitive", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drugs_created_at.56d6a7bcc0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drugs_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drugs_created_at.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drugs_created_at.56d6a7bcc0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drugs_created_at"], "alias": "source_not_null_tamanu_reference_drugs_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3089557, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_not_null_tamanu_reference_drugs_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at.573d9fdd62": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drugs_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drugs_updated_at.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at.573d9fdd62", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drugs_updated_at"], "alias": "source_not_null_tamanu_reference_drugs_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3106549, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_not_null_tamanu_reference_drugs_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at_sync_tick.82d2c43485": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drugs_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drugs_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at_sync_tick.82d2c43485", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drugs_updated_at_sync_tick"], "alias": "source_not_null_tamanu_reference_drugs_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3124607, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drugs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drugs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drugs.yml/source_not_null_tamanu_reference_drugs_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"reference_drugs\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'reference_drugs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_insurer_payments_id.b447e82df0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_insurer_payments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_insurer_payments_id.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_insurer_payments_id.b447e82df0", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_insurer_payments_id"], "alias": "source_unique_tamanu_invoice_insurer_payments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.314735, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_unique_tamanu_invoice_insurer_payments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_id.e4847e6d62": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurer_payments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurer_payments_id.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_id.e4847e6d62", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurer_payments_id"], "alias": "source_not_null_tamanu_invoice_insurer_payments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3164582, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_not_null_tamanu_invoice_insurer_payments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_insurer_payments_invoice_payment_id.7dc74551cc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_insurer_payments_invoice_payment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_i_ff616bdd4f24f65bacff754ba7572933.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_insurer_payments_invoice_payment_id.7dc74551cc", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_insurer_payments_invoice_payment_id"], "alias": "source_unique_tamanu_invoice_i_ff616bdd4f24f65bacff754ba7572933", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_unique_tamanu_invoice_i_ff616bdd4f24f65bacff754ba7572933", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_unique_tamanu_invoice_i_ff616bdd4f24f65bacff754ba7572933"}, "created_at": 1775621422.318181, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_unique_tamanu_invoice_i_ff616bdd4f24f65bacff754ba7572933\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_unique_tamanu_invoice_i_ff616bdd4f24f65bacff754ba7572933.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    invoice_payment_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere invoice_payment_id is not null\ngroup by invoice_payment_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "invoice_payment_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id.d5611881a3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_983343c9acd4b1a168a63a5a81a526dc.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id.d5611881a3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id"], "alias": "source_not_null_tamanu_invoice_983343c9acd4b1a168a63a5a81a526dc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_983343c9acd4b1a168a63a5a81a526dc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_983343c9acd4b1a168a63a5a81a526dc"}, "created_at": 1775621422.3200295, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_983343c9acd4b1a168a63a5a81a526dc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_not_null_tamanu_invoice_983343c9acd4b1a168a63a5a81a526dc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_payment_id\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere invoice_payment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_payment_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.bb3f5a2cf7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_5c75d1e9aa64ee85ca7c87d087357efc.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.bb3f5a2cf7", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_"], "alias": "source_relationships_tamanu_in_5c75d1e9aa64ee85ca7c87d087357efc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_5c75d1e9aa64ee85ca7c87d087357efc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_5c75d1e9aa64ee85ca7c87d087357efc"}, "created_at": 1775621422.3217583, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_5c75d1e9aa64ee85ca7c87d087357efc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"], ["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments", "source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_relationships_tamanu_in_5c75d1e9aa64ee85ca7c87d087357efc.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select invoice_payment_id as from_field\n    from \"central\".\"public\".\"invoice_insurer_payments\"\n    where invoice_payment_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoice_payments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "invoice_payment_id", "to": "source('tamanu', 'invoice_payments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_insurer_id.d4af11cfdf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurer_payments_insurer_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurer_payments_insurer_id.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_insurer_id.d4af11cfdf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurer_payments_insurer_id"], "alias": "source_not_null_tamanu_invoice_insurer_payments_insurer_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3270507, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_not_null_tamanu_invoice_insurer_payments_insurer_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect insurer_id\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere insurer_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "insurer_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "insurer_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_.04f39ad92a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_b8dfad1a14f91a00c4e0bffa71a4747f.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_.04f39ad92a", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_"], "alias": "dbt_utils_source_relationships_b8dfad1a14f91a00c4e0bffa71a4747f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_b8dfad1a14f91a00c4e0bffa71a4747f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_b8dfad1a14f91a00c4e0bffa71a4747f"}, "created_at": 1775621422.329547, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_b8dfad1a14f91a00c4e0bffa71a4747f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/dbt_utils_source_relationships_b8dfad1a14f91a00c4e0bffa71a4747f.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    insurer_id as id\n\n  from \"central\".\"public\".\"invoice_insurer_payments\"\n\n  where insurer_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'insurer'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "insurer_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "insurer_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'insurer'", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_status.7ac01d0560": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurer_payments_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurer_payments_status.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_status.7ac01d0560", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurer_payments_status"], "alias": "source_not_null_tamanu_invoice_insurer_payments_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3349395, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_not_null_tamanu_invoice_insurer_payments_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected.b655cf463e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__daaaf49f65b35ccd155c3f4b43dc868b.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected.b655cf463e", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected"], "alias": "source_accepted_values_tamanu__daaaf49f65b35ccd155c3f4b43dc868b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__daaaf49f65b35ccd155c3f4b43dc868b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__daaaf49f65b35ccd155c3f4b43dc868b"}, "created_at": 1775621422.3369436, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__daaaf49f65b35ccd155c3f4b43dc868b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_accepted_values_tamanu__daaaf49f65b35ccd155c3f4b43dc868b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"invoice_insurer_payments\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'unpaid','paid','partial','rejected'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["unpaid", "paid", "partial", "rejected"], "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_created_at.8b24ac848c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurer_payments_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_insurer_payments_created_at.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_created_at.8b24ac848c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurer_payments_created_at"], "alias": "source_not_null_tamanu_invoice_insurer_payments_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3413208, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_not_null_tamanu_invoice_insurer_payments_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick.4f3ee2ea02": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_a7574701f269308adcb445479d3a8ea9.sql", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick.4f3ee2ea02", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_a7574701f269308adcb445479d3a8ea9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_a7574701f269308adcb445479d3a8ea9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_a7574701f269308adcb445479d3a8ea9"}, "created_at": 1775621422.343098, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_a7574701f269308adcb445479d3a8ea9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_insurer_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_insurer_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_insurer_payments.yml/source_not_null_tamanu_invoice_a7574701f269308adcb445479d3a8ea9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_insurer_payments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_insurer_payments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_procedures_id.ed36ede291": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_procedures_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_procedures_id.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_unique_tamanu_procedures_id.ed36ede291", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_procedures_id"], "alias": "source_unique_tamanu_procedures_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3455632, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_unique_tamanu_procedures_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"procedures\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedures_id.ba34e3de73": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedures_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedures_id.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedures_id.ba34e3de73", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedures_id"], "alias": "source_not_null_tamanu_procedures_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3473642, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_not_null_tamanu_procedures_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"procedures\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedures_created_at.04e3942886": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedures_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedures_created_at.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedures_created_at.04e3942886", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedures_created_at"], "alias": "source_not_null_tamanu_procedures_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3491166, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_not_null_tamanu_procedures_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"procedures\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedures_updated_at.25bc26ecf8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedures_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedures_updated_at.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedures_updated_at.25bc26ecf8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedures_updated_at"], "alias": "source_not_null_tamanu_procedures_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3508334, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_not_null_tamanu_procedures_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"procedures\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedures_date.dcd844e127": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedures_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedures_date.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedures_date.dcd844e127", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedures_date"], "alias": "source_not_null_tamanu_procedures_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3525624, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_not_null_tamanu_procedures_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"procedures\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_.e6407dfa85": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pr_ac8b6cd2d56f9b2670aa5c1393244578.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_.e6407dfa85", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_pr_ac8b6cd2d56f9b2670aa5c1393244578", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pr_ac8b6cd2d56f9b2670aa5c1393244578", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pr_ac8b6cd2d56f9b2670aa5c1393244578"}, "created_at": 1775621422.3561695, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pr_ac8b6cd2d56f9b2670aa5c1393244578\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_relationships_tamanu_pr_ac8b6cd2d56f9b2670aa5c1393244578.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"procedures\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"to": "source('tamanu', 'encounters')", "field": "id", "column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_.679ed5aba8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pr_dd0f63ff67eaff3c16c1f92729f32ebd.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_.679ed5aba8", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_"], "alias": "source_relationships_tamanu_pr_dd0f63ff67eaff3c16c1f92729f32ebd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pr_dd0f63ff67eaff3c16c1f92729f32ebd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pr_dd0f63ff67eaff3c16c1f92729f32ebd"}, "created_at": 1775621422.3615322, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pr_dd0f63ff67eaff3c16c1f92729f32ebd\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"], ["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_relationships_tamanu_pr_dd0f63ff67eaff3c16c1f92729f32ebd.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_id as from_field\n    from \"central\".\"public\".\"procedures\"\n    where location_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"locations\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"to": "source('tamanu', 'locations')", "field": "id", "column_name": "location_id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_.357cfc4070": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_a6dc0a3ec12ae6bde245ad5e8ea7fbdc.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_.357cfc4070", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_"], "alias": "dbt_utils_source_relationships_a6dc0a3ec12ae6bde245ad5e8ea7fbdc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_a6dc0a3ec12ae6bde245ad5e8ea7fbdc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_a6dc0a3ec12ae6bde245ad5e8ea7fbdc"}, "created_at": 1775621422.3668597, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_a6dc0a3ec12ae6bde245ad5e8ea7fbdc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/dbt_utils_source_relationships_a6dc0a3ec12ae6bde245ad5e8ea7fbdc.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    procedure_type_id as id\n\n  from \"central\".\"public\".\"procedures\"\n\n  where procedure_type_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'procedureType'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "procedure_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'procedureType'", "column_name": "procedure_type_id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_.8b2aee60ac": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_ab1c603a129592f765725b67bebb0be1.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_.8b2aee60ac", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_"], "alias": "dbt_utils_source_relationships_ab1c603a129592f765725b67bebb0be1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_ab1c603a129592f765725b67bebb0be1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_ab1c603a129592f765725b67bebb0be1"}, "created_at": 1775621422.372435, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_ab1c603a129592f765725b67bebb0be1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/dbt_utils_source_relationships_ab1c603a129592f765725b67bebb0be1.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    anaesthetic_id as id\n\n  from \"central\".\"public\".\"procedures\"\n\n  where anaesthetic_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'drug'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "anaesthetic_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'drug'", "column_name": "anaesthetic_id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_.b1d682ce39": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pr_4bb62730ef6b6a0f1affe153853a784c.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_.b1d682ce39", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pr_4bb62730ef6b6a0f1affe153853a784c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pr_4bb62730ef6b6a0f1affe153853a784c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pr_4bb62730ef6b6a0f1affe153853a784c"}, "created_at": 1775621422.3779502, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pr_4bb62730ef6b6a0f1affe153853a784c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_relationships_tamanu_pr_4bb62730ef6b6a0f1affe153853a784c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select physician_id as from_field\n    from \"central\".\"public\".\"procedures\"\n    where physician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "physician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"to": "source('tamanu', 'users')", "field": "id", "column_name": "physician_id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_.5a3ee51b82": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pr_05f2cb4aac671f94eb918e115baea4ad.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_.5a3ee51b82", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pr_05f2cb4aac671f94eb918e115baea4ad", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pr_05f2cb4aac671f94eb918e115baea4ad", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pr_05f2cb4aac671f94eb918e115baea4ad"}, "created_at": 1775621422.3829315, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pr_05f2cb4aac671f94eb918e115baea4ad\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_relationships_tamanu_pr_05f2cb4aac671f94eb918e115baea4ad.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select anaesthetist_id as from_field\n    from \"central\".\"public\".\"procedures\"\n    where anaesthetist_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "anaesthetist_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"to": "source('tamanu', 'users')", "field": "id", "column_name": "anaesthetist_id", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedures_updated_at_sync_tick.2da29f5157": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedures_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedures_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedures_updated_at_sync_tick.2da29f5157", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedures_updated_at_sync_tick"], "alias": "source_not_null_tamanu_procedures_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3880336, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedures"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedures"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedures.yml/source_not_null_tamanu_procedures_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"procedures\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'procedures')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_roles_id.0ad588a58a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_roles_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_roles_id.sql", "original_file_path": "../../database/model/public/roles.yml", "unique_id": "test.tamanu.source_unique_tamanu_roles_id.0ad588a58a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_roles_id"], "alias": "source_unique_tamanu_roles_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3904717, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "roles"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.roles"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/roles.yml/source_unique_tamanu_roles_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"roles\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'roles')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_roles_id.a534c5d463": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_roles_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_roles_id.sql", "original_file_path": "../../database/model/public/roles.yml", "unique_id": "test.tamanu.source_not_null_tamanu_roles_id.a534c5d463", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_roles_id"], "alias": "source_not_null_tamanu_roles_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3923845, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "roles"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.roles"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/roles.yml/source_not_null_tamanu_roles_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"roles\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'roles')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_roles_name.cfc8ac49ef": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_roles_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_roles_name.sql", "original_file_path": "../../database/model/public/roles.yml", "unique_id": "test.tamanu.source_not_null_tamanu_roles_name.cfc8ac49ef", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_roles_name"], "alias": "source_not_null_tamanu_roles_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3941615, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "roles"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.roles"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/roles.yml/source_not_null_tamanu_roles_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"roles\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'roles')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_roles_updated_at_sync_tick.7e4ea46e3f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_roles_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_roles_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/roles.yml", "unique_id": "test.tamanu.source_not_null_tamanu_roles_updated_at_sync_tick.7e4ea46e3f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_roles_updated_at_sync_tick"], "alias": "source_not_null_tamanu_roles_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3959088, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "roles"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.roles"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/roles.yml/source_not_null_tamanu_roles_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"roles\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'roles')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_imaging_requests_id.189883862e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_imaging_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_imaging_requests_id.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_unique_tamanu_imaging_requests_id.189883862e", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_imaging_requests_id"], "alias": "source_unique_tamanu_imaging_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.3981705, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_unique_tamanu_imaging_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_requests_id.d663e704e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_requests_id.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_requests_id.d663e704e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_requests_id"], "alias": "source_not_null_tamanu_imaging_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.39993, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_not_null_tamanu_imaging_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_requests_created_at.d386c49d0f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_requests_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_requests_created_at.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_requests_created_at.d386c49d0f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_requests_created_at"], "alias": "source_not_null_tamanu_imaging_requests_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4017959, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_not_null_tamanu_imaging_requests_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at.ea1a5d3b4f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_requests_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_requests_updated_at.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at.ea1a5d3b4f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_requests_updated_at"], "alias": "source_not_null_tamanu_imaging_requests_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.403524, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_not_null_tamanu_imaging_requests_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error.a9ecb8382a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__e706cfda0e37002b14546067a36e4017.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error.a9ecb8382a", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error"], "alias": "source_accepted_values_tamanu__e706cfda0e37002b14546067a36e4017", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__e706cfda0e37002b14546067a36e4017", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__e706cfda0e37002b14546067a36e4017"}, "created_at": 1775621422.4052632, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__e706cfda0e37002b14546067a36e4017\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_accepted_values_tamanu__e706cfda0e37002b14546067a36e4017.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"imaging_requests\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'pending','in_progress','completed','cancelled','deleted','entered_in_error'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["pending", "in_progress", "completed", "cancelled", "deleted", "entered_in_error"], "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_requests_requested_date.4fe72ce056": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_requests_requested_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_requests_requested_date.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_requests_requested_date.4fe72ce056", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_requests_requested_date"], "alias": "source_not_null_tamanu_imaging_requests_requested_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4104586, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_not_null_tamanu_imaging_requests_requested_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect requested_date\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere requested_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "requested_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "requested_date", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_.6e73984503": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_e91cdd17135bacaefbb0e41a863dfa82.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_.6e73984503", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_im_e91cdd17135bacaefbb0e41a863dfa82", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_e91cdd17135bacaefbb0e41a863dfa82", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_e91cdd17135bacaefbb0e41a863dfa82"}, "created_at": 1775621422.412252, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_e91cdd17135bacaefbb0e41a863dfa82\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_relationships_tamanu_im_e91cdd17135bacaefbb0e41a863dfa82.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"imaging_requests\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_.120db4235e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_57226fb69578110ada58d2a51d68aa8a.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_.120db4235e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_im_57226fb69578110ada58d2a51d68aa8a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_57226fb69578110ada58d2a51d68aa8a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_57226fb69578110ada58d2a51d68aa8a"}, "created_at": 1775621422.4174318, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_57226fb69578110ada58d2a51d68aa8a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_relationships_tamanu_im_57226fb69578110ada58d2a51d68aa8a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select requested_by_id as from_field\n    from \"central\".\"public\".\"imaging_requests\"\n    where requested_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "requested_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "requested_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_.d4627e3b55": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_0abbc5c1b7e70c78fd1ace5ee79344b6.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_.d4627e3b55", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_im_0abbc5c1b7e70c78fd1ace5ee79344b6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_0abbc5c1b7e70c78fd1ace5ee79344b6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_0abbc5c1b7e70c78fd1ace5ee79344b6"}, "created_at": 1775621422.4223123, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_0abbc5c1b7e70c78fd1ace5ee79344b6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_relationships_tamanu_im_0abbc5c1b7e70c78fd1ace5ee79344b6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select completed_by_id as from_field\n    from \"central\".\"public\".\"imaging_requests\"\n    where completed_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "completed_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "completed_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_.70fffaafa5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_00fb4796a67be837520f7e81978749e2.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_.70fffaafa5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_"], "alias": "source_relationships_tamanu_im_00fb4796a67be837520f7e81978749e2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_00fb4796a67be837520f7e81978749e2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_00fb4796a67be837520f7e81978749e2"}, "created_at": 1775621422.427979, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_00fb4796a67be837520f7e81978749e2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"], ["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_relationships_tamanu_im_00fb4796a67be837520f7e81978749e2.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_id as from_field\n    from \"central\".\"public\".\"imaging_requests\"\n    where location_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"locations\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_id", "to": "source('tamanu', 'locations')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay.b2d7a7ce17": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__5a491239c2adb0ef1cf07f3eb018ee9f.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay.b2d7a7ce17", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay"], "alias": "source_accepted_values_tamanu__5a491239c2adb0ef1cf07f3eb018ee9f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__5a491239c2adb0ef1cf07f3eb018ee9f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__5a491239c2adb0ef1cf07f3eb018ee9f"}, "created_at": 1775621422.433117, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__5a491239c2adb0ef1cf07f3eb018ee9f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_accepted_values_tamanu__5a491239c2adb0ef1cf07f3eb018ee9f.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        imaging_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"imaging_requests\"\n    group by imaging_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'angiogram','colonoscopy','ctScan','ecg','echocardiogram','endoscopy','fluroscopy','holterMonitor','mammogram','orthopantomography','mri','stressTest','ultrasound','vascularStudy','xRay'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "imaging_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "imaging_type", "values": ["angiogram", "colonoscopy", "ctScan", "ecg", "echocardiogram", "endoscopy", "fluroscopy", "holterMonitor", "mammogram", "orthopantomography", "mri", "stressTest", "ultrasound", "vascularStudy", "xRay"], "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_.5f80fa9caf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_9eedcc49686db126a35af7db386be7f1.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_.5f80fa9caf", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_"], "alias": "source_relationships_tamanu_im_9eedcc49686db126a35af7db386be7f1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_9eedcc49686db126a35af7db386be7f1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_9eedcc49686db126a35af7db386be7f1"}, "created_at": 1775621422.441936, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_9eedcc49686db126a35af7db386be7f1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"], ["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups", "source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_relationships_tamanu_im_9eedcc49686db126a35af7db386be7f1.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_group_id as from_field\n    from \"central\".\"public\".\"imaging_requests\"\n    where location_group_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"location_groups\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_group_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_group_id", "to": "source('tamanu', 'location_groups')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at_sync_tick.bde3718e92": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_requests_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_requests_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at_sync_tick.bde3718e92", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_requests_updated_at_sync_tick"], "alias": "source_not_null_tamanu_imaging_requests_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4470725, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_not_null_tamanu_imaging_requests_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_requests_display_id.7bf4017999": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_requests_display_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_requests_display_id.sql", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_requests_display_id.7bf4017999", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_requests_display_id"], "alias": "source_not_null_tamanu_imaging_requests_display_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4488232, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_requests.yml/source_not_null_tamanu_imaging_requests_display_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect display_id\nfrom \"central\".\"public\".\"imaging_requests\"\nwhere display_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "display_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "display_id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_reference_data_id.f40209ddee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_reference_data_id.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_unique_tamanu_reference_data_id.f40209ddee", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_reference_data_id"], "alias": "source_unique_tamanu_reference_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.451151, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_unique_tamanu_reference_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"reference_data\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_id.558d36e056": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_id.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_id.558d36e056", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_id"], "alias": "source_not_null_tamanu_reference_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4530234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"reference_data\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_created_at.929d48b0fb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_created_at.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_created_at.929d48b0fb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_created_at"], "alias": "source_not_null_tamanu_reference_data_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4547825, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"reference_data\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_updated_at.2d38750dde": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_updated_at.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_updated_at.2d38750dde", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_updated_at"], "alias": "source_not_null_tamanu_reference_data_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.456475, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"reference_data\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_code.45bb74a969": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_code.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_code.45bb74a969", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_code"], "alias": "source_not_null_tamanu_reference_data_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4581544, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"reference_data\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_type.be10d4a572": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_type.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_type.be10d4a572", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_type"], "alias": "source_not_null_tamanu_reference_data_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4598596, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"reference_data\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_name.92065a73ea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_name.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_name.92065a73ea", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_name"], "alias": "source_not_null_tamanu_reference_data_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4615455, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"reference_data\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_updated_at_sync_tick.c5ae94a272": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_updated_at_sync_tick.c5ae94a272", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_updated_at_sync_tick"], "alias": "source_not_null_tamanu_reference_data_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.463389, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"reference_data\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_system_required.5345a25d20": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_system_required", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_system_required.sql", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_system_required.5345a25d20", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_system_required"], "alias": "source_not_null_tamanu_reference_data_system_required", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4650748, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data.yml/source_not_null_tamanu_reference_data_system_required.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect system_required\nfrom \"central\".\"public\".\"reference_data\"\nwhere system_required is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "system_required", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "system_required", "model": "{{ get_where_subquery(source('tamanu', 'reference_data')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_issues_id.cc84a334be": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_issues_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_issues_id.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_issues_id.cc84a334be", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_issues_id"], "alias": "source_unique_tamanu_patient_issues_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4673479, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_unique_tamanu_patient_issues_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_issues\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_issues_id.90df660f7f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_issues_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_issues_id.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_issues_id.90df660f7f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_issues_id"], "alias": "source_not_null_tamanu_patient_issues_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4690678, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_not_null_tamanu_patient_issues_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_issues\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_issues_created_at.e6b6b24d67": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_issues_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_issues_created_at.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_issues_created_at.e6b6b24d67", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_issues_created_at"], "alias": "source_not_null_tamanu_patient_issues_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4709456, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_not_null_tamanu_patient_issues_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_issues\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_issues_updated_at.3d4ab948f0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_issues_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_issues_updated_at.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_issues_updated_at.3d4ab948f0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_issues_updated_at"], "alias": "source_not_null_tamanu_patient_issues_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4726474, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_not_null_tamanu_patient_issues_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_issues\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_issues_recorded_date.1adb9dcc27": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_issues_recorded_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_issues_recorded_date.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_issues_recorded_date.1adb9dcc27", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_issues_recorded_date"], "alias": "source_not_null_tamanu_patient_issues_recorded_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.474313, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_not_null_tamanu_patient_issues_recorded_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect recorded_date\nfrom \"central\".\"public\".\"patient_issues\"\nwhere recorded_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recorded_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "recorded_date", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_issues_type.86926f7218": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_issues_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_issues_type.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_issues_type.86926f7218", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_issues_type"], "alias": "source_not_null_tamanu_patient_issues_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4760127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_not_null_tamanu_patient_issues_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"patient_issues\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_.d2d3f731fb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_11d3db8e3761e666259492a9f7225fcc.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_.d2d3f731fb", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_11d3db8e3761e666259492a9f7225fcc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_11d3db8e3761e666259492a9f7225fcc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_11d3db8e3761e666259492a9f7225fcc"}, "created_at": 1775621422.4777582, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_11d3db8e3761e666259492a9f7225fcc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_relationships_tamanu_pa_11d3db8e3761e666259492a9f7225fcc.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_issues\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_issues_updated_at_sync_tick.b613106397": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_issues_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_issues_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_issues_updated_at_sync_tick.b613106397", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_issues_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_issues_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4831223, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_issues"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_issues"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_issues.yml/source_not_null_tamanu_patient_issues_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_issues\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_issues')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_source_start_tick.4b0254a181": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_ticks_source_start_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_ticks_source_start_tick.sql", "original_file_path": "../../database/model/public/sync_lookup_ticks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_source_start_tick.4b0254a181", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_ticks_source_start_tick"], "alias": "source_not_null_tamanu_sync_lookup_ticks_source_start_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4854736, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup_ticks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup_ticks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup_ticks.yml/source_not_null_tamanu_sync_lookup_ticks_source_start_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect source_start_tick\nfrom \"central\".\"public\".\"sync_lookup_ticks\"\nwhere source_start_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "source_start_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "source_start_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup_ticks')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.f4830d30b3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_sync_lookup_ticks_lookup_end_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.sql", "original_file_path": "../../database/model/public/sync_lookup_ticks.yml", "unique_id": "test.tamanu.source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.f4830d30b3", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_sync_lookup_ticks_lookup_end_tick"], "alias": "source_unique_tamanu_sync_lookup_ticks_lookup_end_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.487241, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup_ticks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup_ticks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup_ticks.yml/source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    lookup_end_tick as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"sync_lookup_ticks\"\nwhere lookup_end_tick is not null\ngroup by lookup_end_tick\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lookup_end_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "lookup_end_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup_ticks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.2552341359": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.sql", "original_file_path": "../../database/model/public/sync_lookup_ticks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.2552341359", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick"], "alias": "source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4891436, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup_ticks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup_ticks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup_ticks.yml/source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect lookup_end_tick\nfrom \"central\".\"public\".\"sync_lookup_ticks\"\nwhere lookup_end_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lookup_end_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "lookup_end_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup_ticks')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_settings_id.6bf47c8849": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_settings_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_settings_id.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_unique_tamanu_settings_id.6bf47c8849", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_settings_id"], "alias": "source_unique_tamanu_settings_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4913666, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_unique_tamanu_settings_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"settings\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_settings_id.5ec7f45b36": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_settings_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_settings_id.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_settings_id.5ec7f45b36", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_settings_id"], "alias": "source_not_null_tamanu_settings_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.493315, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_not_null_tamanu_settings_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"settings\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_settings_created_at.8ad3e239a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_settings_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_settings_created_at.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_settings_created_at.8ad3e239a6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_settings_created_at"], "alias": "source_not_null_tamanu_settings_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4951398, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_not_null_tamanu_settings_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"settings\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_settings_updated_at.9dc40b301e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_settings_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_settings_updated_at.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_settings_updated_at.9dc40b301e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_settings_updated_at"], "alias": "source_not_null_tamanu_settings_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.496871, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_not_null_tamanu_settings_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"settings\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_settings_key.83ad9711e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_settings_key", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_settings_key.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_settings_key.83ad9711e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_settings_key"], "alias": "source_not_null_tamanu_settings_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.4987266, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_not_null_tamanu_settings_key.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect key\nfrom \"central\".\"public\".\"settings\"\nwhere key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "key", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "key", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_.bf1a10aebe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_se_8f578dab1de5c540e4f6ec449925f06b.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_.bf1a10aebe", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_se_8f578dab1de5c540e4f6ec449925f06b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_se_8f578dab1de5c540e4f6ec449925f06b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_se_8f578dab1de5c540e4f6ec449925f06b"}, "created_at": 1775621422.5004625, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_se_8f578dab1de5c540e4f6ec449925f06b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_relationships_tamanu_se_8f578dab1de5c540e4f6ec449925f06b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"settings\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_settings_updated_at_sync_tick.9e782f5b11": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_settings_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_settings_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_settings_updated_at_sync_tick.9e782f5b11", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_settings_updated_at_sync_tick"], "alias": "source_not_null_tamanu_settings_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5061238, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_not_null_tamanu_settings_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"settings\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_settings_scope.64d1f26cf2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_settings_scope", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_settings_scope.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_settings_scope.64d1f26cf2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_settings_scope"], "alias": "source_not_null_tamanu_settings_scope", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5078824, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_not_null_tamanu_settings_scope.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect scope\nfrom \"central\".\"public\".\"settings\"\nwhere scope is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "scope", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "scope", "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_settings_scope__global__central__facility.5ddc355de8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_settings_scope__global__central__facility", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__d09e2a950f2e92ca2ed5e37588c7fe84.sql", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_settings_scope__global__central__facility.5ddc355de8", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_settings_scope__global__central__facility"], "alias": "source_accepted_values_tamanu__d09e2a950f2e92ca2ed5e37588c7fe84", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__d09e2a950f2e92ca2ed5e37588c7fe84", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__d09e2a950f2e92ca2ed5e37588c7fe84"}, "created_at": 1775621422.5096276, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__d09e2a950f2e92ca2ed5e37588c7fe84\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "settings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.settings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/settings.yml/source_accepted_values_tamanu__d09e2a950f2e92ca2ed5e37588c7fe84.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        scope as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"settings\"\n    group by scope\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'global','central','facility'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "scope", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "scope", "values": ["global", "central", "facility"], "model": "{{ get_where_subquery(source('tamanu', 'settings')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_test_panel_requests_id.fa501ddd2c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_test_panel_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_test_panel_requests_id.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_test_panel_requests_id.fa501ddd2c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_test_panel_requests_id"], "alias": "source_unique_tamanu_lab_test_panel_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.515166, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_unique_tamanu_lab_test_panel_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_id.41fa505d02": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_requests_id.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_id.41fa505d02", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_requests_id"], "alias": "source_not_null_tamanu_lab_test_panel_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5169501, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_not_null_tamanu_lab_test_panel_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_created_at.8a393e3d79": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_requests_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_requests_created_at.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_created_at.8a393e3d79", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_requests_created_at"], "alias": "source_not_null_tamanu_lab_test_panel_requests_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5186732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_not_null_tamanu_lab_test_panel_requests_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at.f165e4a05b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_requests_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_requests_updated_at.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at.f165e4a05b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_requests_updated_at"], "alias": "source_not_null_tamanu_lab_test_panel_requests_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5203564, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_not_null_tamanu_lab_test_panel_requests_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id.e533aeba03": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tes_49126af370f2ef154963960347d1266b.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id.e533aeba03", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id"], "alias": "source_not_null_tamanu_lab_tes_49126af370f2ef154963960347d1266b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_lab_tes_49126af370f2ef154963960347d1266b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_lab_tes_49126af370f2ef154963960347d1266b"}, "created_at": 1775621422.5220706, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_lab_tes_49126af370f2ef154963960347d1266b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_not_null_tamanu_lab_tes_49126af370f2ef154963960347d1266b.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect lab_test_panel_id\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere lab_test_panel_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_panel_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "lab_test_panel_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_.1bf2e5a1ff": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_72fcfa621ed5492abd990ec25888b6bc.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_.1bf2e5a1ff", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_"], "alias": "source_relationships_tamanu_la_72fcfa621ed5492abd990ec25888b6bc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_72fcfa621ed5492abd990ec25888b6bc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_72fcfa621ed5492abd990ec25888b6bc"}, "created_at": 1775621422.5246437, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_72fcfa621ed5492abd990ec25888b6bc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"], ["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels", "source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_relationships_tamanu_la_72fcfa621ed5492abd990ec25888b6bc.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_test_panel_id as from_field\n    from \"central\".\"public\".\"lab_test_panel_requests\"\n    where lab_test_panel_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_test_panels\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_panel_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_test_panel_id", "to": "source('tamanu', 'lab_test_panels')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_encounter_id.ffb89736d8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_requests_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_requests_encounter_id.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_encounter_id.ffb89736d8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_requests_encounter_id"], "alias": "source_not_null_tamanu_lab_test_panel_requests_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5301952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_not_null_tamanu_lab_test_panel_requests_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_.01f5be3602": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_0d9f27f60350cb540a459507877b95ba.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_.01f5be3602", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_la_0d9f27f60350cb540a459507877b95ba", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_0d9f27f60350cb540a459507877b95ba", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_0d9f27f60350cb540a459507877b95ba"}, "created_at": 1775621422.532146, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_0d9f27f60350cb540a459507877b95ba\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_relationships_tamanu_la_0d9f27f60350cb540a459507877b95ba.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"lab_test_panel_requests\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick.c176776d9d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tes_3aba46af31a2eee1e3c65aa28b89428d.sql", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick.c176776d9d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_tes_3aba46af31a2eee1e3c65aa28b89428d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_lab_tes_3aba46af31a2eee1e3c65aa28b89428d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_lab_tes_3aba46af31a2eee1e3c65aa28b89428d"}, "created_at": 1775621422.5370417, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_lab_tes_3aba46af31a2eee1e3c65aa28b89428d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_requests.yml/source_not_null_tamanu_lab_tes_3aba46af31a2eee1e3c65aa28b89428d.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_test_panel_requests\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_vitals_id.fd030294af": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_vitals_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_vitals_id.sql", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "test.tamanu.source_unique_tamanu_vitals_id.fd030294af", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_vitals_id"], "alias": "source_unique_tamanu_vitals_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5395422, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vitals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vitals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vitals.yml/source_unique_tamanu_vitals_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"vitals\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'vitals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vitals_id.18a9bbf45f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vitals_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vitals_id.sql", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vitals_id.18a9bbf45f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vitals_id"], "alias": "source_not_null_tamanu_vitals_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.541293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vitals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vitals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vitals.yml/source_not_null_tamanu_vitals_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"vitals\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'vitals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vitals_created_at.16b6f3a14f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vitals_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vitals_created_at.sql", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vitals_created_at.16b6f3a14f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vitals_created_at"], "alias": "source_not_null_tamanu_vitals_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5430183, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vitals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vitals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vitals.yml/source_not_null_tamanu_vitals_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"vitals\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'vitals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vitals_updated_at.a07980dfdb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vitals_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vitals_updated_at.sql", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vitals_updated_at.a07980dfdb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vitals_updated_at"], "alias": "source_not_null_tamanu_vitals_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5447567, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vitals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vitals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vitals.yml/source_not_null_tamanu_vitals_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"vitals\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'vitals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vitals_date_recorded.0d32b23c9f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vitals_date_recorded", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vitals_date_recorded.sql", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vitals_date_recorded.0d32b23c9f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vitals_date_recorded"], "alias": "source_not_null_tamanu_vitals_date_recorded", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5464435, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vitals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vitals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vitals.yml/source_not_null_tamanu_vitals_date_recorded.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date_recorded\nfrom \"central\".\"public\".\"vitals\"\nwhere date_recorded is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_recorded", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_recorded", "model": "{{ get_where_subquery(source('tamanu', 'vitals')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vitals_updated_at_sync_tick.9962306ac1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vitals_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vitals_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vitals_updated_at_sync_tick.9962306ac1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vitals_updated_at_sync_tick"], "alias": "source_not_null_tamanu_vitals_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5482545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vitals"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vitals"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vitals.yml/source_not_null_tamanu_vitals_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"vitals\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'vitals')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_imaging_type_external_codes_id.99627516fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_imaging_type_external_codes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_imaging_type_external_codes_id.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_unique_tamanu_imaging_type_external_codes_id.99627516fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_imaging_type_external_codes_id"], "alias": "source_unique_tamanu_imaging_type_external_codes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5506663, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_unique_tamanu_imaging_type_external_codes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_id.ad31be3508": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_type_external_codes_id.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_id.ad31be3508", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_id"], "alias": "source_not_null_tamanu_imaging_type_external_codes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5524573, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_type_external_codes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_created_at.e2ccce310c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_type_external_codes_created_at.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_created_at.e2ccce310c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_created_at"], "alias": "source_not_null_tamanu_imaging_type_external_codes_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5542047, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_type_external_codes_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at.f2a8814402": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_type_external_codes_updated_at.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at.f2a8814402", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_updated_at"], "alias": "source_not_null_tamanu_imaging_type_external_codes_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5560374, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_type_external_codes_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_visibility_status.3ef76c80ff": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_98a787e9ac00a6d0baf47258f2b7b804.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_visibility_status.3ef76c80ff", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_visibility_status"], "alias": "source_not_null_tamanu_imaging_98a787e9ac00a6d0baf47258f2b7b804", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_imaging_98a787e9ac00a6d0baf47258f2b7b804", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_imaging_98a787e9ac00a6d0baf47258f2b7b804"}, "created_at": 1775621422.557761, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_imaging_98a787e9ac00a6d0baf47258f2b7b804\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_98a787e9ac00a6d0baf47258f2b7b804.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_imaging_type_code.6104c70b98": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_imaging_type_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_373baf34e4baa1d32de80325f0bc175a.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_imaging_type_code.6104c70b98", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_imaging_type_code"], "alias": "source_not_null_tamanu_imaging_373baf34e4baa1d32de80325f0bc175a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_imaging_373baf34e4baa1d32de80325f0bc175a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_imaging_373baf34e4baa1d32de80325f0bc175a"}, "created_at": 1775621422.5594537, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_imaging_373baf34e4baa1d32de80325f0bc175a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_373baf34e4baa1d32de80325f0bc175a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect imaging_type_code\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere imaging_type_code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "imaging_type_code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "imaging_type_code", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_code.527d0ff6f5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_type_external_codes_code.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_code.527d0ff6f5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_code"], "alias": "source_not_null_tamanu_imaging_type_external_codes_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5611858, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_type_external_codes_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick.447d3995ee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_34469d4bbdbd68c469cd712b71de1d85.sql", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick.447d3995ee", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick"], "alias": "source_not_null_tamanu_imaging_34469d4bbdbd68c469cd712b71de1d85", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_imaging_34469d4bbdbd68c469cd712b71de1d85", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_imaging_34469d4bbdbd68c469cd712b71de1d85"}, "created_at": 1775621422.5629153, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_imaging_34469d4bbdbd68c469cd712b71de1d85\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_type_external_codes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_type_external_codes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_type_external_codes.yml/source_not_null_tamanu_imaging_34469d4bbdbd68c469cd712b71de1d85.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"imaging_type_external_codes\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'imaging_type_external_codes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_contributing_death_causes_id.626611e2fa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_contributing_death_causes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_contributing_death_causes_id.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_unique_tamanu_contributing_death_causes_id.626611e2fa", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_contributing_death_causes_id"], "alias": "source_unique_tamanu_contributing_death_causes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.565279, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_unique_tamanu_contributing_death_causes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"contributing_death_causes\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_contributing_death_causes_id.0c8b2503cb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_contributing_death_causes_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_contributing_death_causes_id.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_contributing_death_causes_id.0c8b2503cb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_contributing_death_causes_id"], "alias": "source_not_null_tamanu_contributing_death_causes_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.567032, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_not_null_tamanu_contributing_death_causes_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"contributing_death_causes\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_contributing_death_causes_time_after_onset.aaabeca43d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_contributing_death_causes_time_after_onset", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_contrib_5d5a7e80ef08ec17c56726c48a135617.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_contributing_death_causes_time_after_onset.aaabeca43d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_contributing_death_causes_time_after_onset"], "alias": "source_not_null_tamanu_contrib_5d5a7e80ef08ec17c56726c48a135617", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_contrib_5d5a7e80ef08ec17c56726c48a135617", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_contrib_5d5a7e80ef08ec17c56726c48a135617"}, "created_at": 1775621422.568758, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_contrib_5d5a7e80ef08ec17c56726c48a135617\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_not_null_tamanu_contrib_5d5a7e80ef08ec17c56726c48a135617.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect time_after_onset\nfrom \"central\".\"public\".\"contributing_death_causes\"\nwhere time_after_onset is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "time_after_onset", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "time_after_onset", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_contributing_death_causes_patient_death_data_id.d0b021dec5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_contributing_death_causes_patient_death_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_contrib_b7a13a5ebb62b2fb7e6b604de40b223b.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_contributing_death_causes_patient_death_data_id.d0b021dec5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_contributing_death_causes_patient_death_data_id"], "alias": "source_not_null_tamanu_contrib_b7a13a5ebb62b2fb7e6b604de40b223b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_contrib_b7a13a5ebb62b2fb7e6b604de40b223b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_contrib_b7a13a5ebb62b2fb7e6b604de40b223b"}, "created_at": 1775621422.5704684, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_contrib_b7a13a5ebb62b2fb7e6b604de40b223b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_not_null_tamanu_contrib_b7a13a5ebb62b2fb7e6b604de40b223b.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_death_data_id\nfrom \"central\".\"public\".\"contributing_death_causes\"\nwhere patient_death_data_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_death_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_death_data_id", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_.404540bf0a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_co_8145a3f4d489e04b6654fb4e861d3396.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_.404540bf0a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_"], "alias": "source_relationships_tamanu_co_8145a3f4d489e04b6654fb4e861d3396", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_co_8145a3f4d489e04b6654fb4e861d3396", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_co_8145a3f4d489e04b6654fb4e861d3396"}, "created_at": 1775621422.5722225, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_co_8145a3f4d489e04b6654fb4e861d3396\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"], ["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_relationships_tamanu_co_8145a3f4d489e04b6654fb4e861d3396.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_death_data_id as from_field\n    from \"central\".\"public\".\"contributing_death_causes\"\n    where patient_death_data_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patient_death_data\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_death_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_death_data_id", "to": "source('tamanu', 'patient_death_data')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_contributing_death_causes_condition_id.7888faae6b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_contributing_death_causes_condition_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_contributing_death_causes_condition_id.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_contributing_death_causes_condition_id.7888faae6b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_contributing_death_causes_condition_id"], "alias": "source_not_null_tamanu_contributing_death_causes_condition_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5777152, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_not_null_tamanu_contributing_death_causes_condition_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect condition_id\nfrom \"central\".\"public\".\"contributing_death_causes\"\nwhere condition_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "condition_id", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_.677e6eaf1b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_12fef80b3b86d7b9f38d90b77c9225da.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_.677e6eaf1b", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_12fef80b3b86d7b9f38d90b77c9225da", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_12fef80b3b86d7b9f38d90b77c9225da", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_12fef80b3b86d7b9f38d90b77c9225da"}, "created_at": 1775621422.579547, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_12fef80b3b86d7b9f38d90b77c9225da\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/dbt_utils_source_relationships_12fef80b3b86d7b9f38d90b77c9225da.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    condition_id as id\n\n  from \"central\".\"public\".\"contributing_death_causes\"\n\n  where condition_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "condition_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick.082b545b7a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_contrib_7a706c62f0cc8a462b4a13b405ae4e8a.sql", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "test.tamanu.source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick.082b545b7a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick"], "alias": "source_not_null_tamanu_contrib_7a706c62f0cc8a462b4a13b405ae4e8a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_contrib_7a706c62f0cc8a462b4a13b405ae4e8a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_contrib_7a706c62f0cc8a462b4a13b405ae4e8a"}, "created_at": 1775621422.584745, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_contrib_7a706c62f0cc8a462b4a13b405ae4e8a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "contributing_death_causes"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.contributing_death_causes"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/contributing_death_causes.yml/source_not_null_tamanu_contrib_7a706c62f0cc8a462b4a13b405ae4e8a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"contributing_death_causes\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'contributing_death_causes')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_login_attempts_id.5f14bcd808": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_login_attempts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_login_attempts_id.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_login_attempts_id.5f14bcd808", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_login_attempts_id"], "alias": "source_unique_tamanu_user_login_attempts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.587043, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_unique_tamanu_user_login_attempts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_login_attempts_id.41946400e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_login_attempts_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_login_attempts_id.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_login_attempts_id.41946400e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_login_attempts_id"], "alias": "source_not_null_tamanu_user_login_attempts_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5888042, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_not_null_tamanu_user_login_attempts_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_login_attempts_created_at.6e8a042c51": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_login_attempts_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_login_attempts_created_at.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_login_attempts_created_at.6e8a042c51", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_login_attempts_created_at"], "alias": "source_not_null_tamanu_user_login_attempts_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5907788, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_not_null_tamanu_user_login_attempts_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at.d3d764c50c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_login_attempts_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_login_attempts_updated_at.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at.d3d764c50c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_login_attempts_updated_at"], "alias": "source_not_null_tamanu_user_login_attempts_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5925195, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_not_null_tamanu_user_login_attempts_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_login_attempts_outcome.75b959648c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_login_attempts_outcome", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_login_attempts_outcome.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_login_attempts_outcome.75b959648c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_login_attempts_outcome"], "alias": "source_not_null_tamanu_user_login_attempts_outcome", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.5942678, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_not_null_tamanu_user_login_attempts_outcome.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect outcome\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere outcome is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "outcome", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "outcome", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_.caa8944999": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_us_dff488d3ef570250809bf70a91c34293.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_.caa8944999", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_"], "alias": "source_relationships_tamanu_us_dff488d3ef570250809bf70a91c34293", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_us_dff488d3ef570250809bf70a91c34293", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_us_dff488d3ef570250809bf70a91c34293"}, "created_at": 1775621422.5960143, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_us_dff488d3ef570250809bf70a91c34293\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"], ["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices", "source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_relationships_tamanu_us_dff488d3ef570250809bf70a91c34293.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select device_id as from_field\n    from \"central\".\"public\".\"user_login_attempts\"\n    where device_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"devices\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "device_id", "to": "source('tamanu', 'devices')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_login_attempts_user_id.51a52b5106": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_login_attempts_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_login_attempts_user_id.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_login_attempts_user_id.51a52b5106", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_login_attempts_user_id"], "alias": "source_not_null_tamanu_user_login_attempts_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6012456, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_not_null_tamanu_user_login_attempts_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_.e19bccc1a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_us_f3d365e59652ac11ae8c06093564f0ce.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_.e19bccc1a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_us_f3d365e59652ac11ae8c06093564f0ce", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_us_f3d365e59652ac11ae8c06093564f0ce", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_us_f3d365e59652ac11ae8c06093564f0ce"}, "created_at": 1775621422.6030416, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_us_f3d365e59652ac11ae8c06093564f0ce\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_relationships_tamanu_us_f3d365e59652ac11ae8c06093564f0ce.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select user_id as from_field\n    from \"central\".\"public\".\"user_login_attempts\"\n    where user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.4f8f310f05": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_login_attempts_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.4f8f310f05", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_login_attempts_updated_at_sync_tick"], "alias": "source_not_null_tamanu_user_login_attempts_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6081676, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_login_attempts"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_login_attempts"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_login_attempts.yml/source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"user_login_attempts\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'user_login_attempts')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_notes_legacy_id.b36a7a24dd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_notes_legacy_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_notes_legacy_id.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_unique_tamanu_notes_legacy_id.b36a7a24dd", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_notes_legacy_id"], "alias": "source_unique_tamanu_notes_legacy_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6104698, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_unique_tamanu_notes_legacy_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_id.0ca554e30e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_id.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_id.0ca554e30e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_id"], "alias": "source_not_null_tamanu_notes_legacy_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6122124, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_created_at.1614bfff1e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_created_at.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_created_at.1614bfff1e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_created_at"], "alias": "source_not_null_tamanu_notes_legacy_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6139245, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at.9cb08b5b1d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_updated_at.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at.9cb08b5b1d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_updated_at"], "alias": "source_not_null_tamanu_notes_legacy_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.615757, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_record_id.e04f2d4fd5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_record_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_record_id.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_record_id.e04f2d4fd5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_record_id"], "alias": "source_not_null_tamanu_notes_legacy_record_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6174808, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_record_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_id\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere record_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_id", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_record_type.c368d7d085": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_record_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_record_type.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_record_type.c368d7d085", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_record_type"], "alias": "source_not_null_tamanu_notes_legacy_record_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6191752, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_record_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_type\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere record_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_type", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_date.ebfcb3c49c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_date.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_date.ebfcb3c49c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_date"], "alias": "source_not_null_tamanu_notes_legacy_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6208775, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_content.88552a0676": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_content", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_content.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_content.88552a0676", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_content"], "alias": "source_not_null_tamanu_notes_legacy_content", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6225927, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_content.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect content\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere content is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "content", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "content", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at_sync_tick.935e8256d0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notes_legacy_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notes_legacy_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at_sync_tick.935e8256d0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notes_legacy_updated_at_sync_tick"], "alias": "source_not_null_tamanu_notes_legacy_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6250525, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notes_legacy"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notes_legacy"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notes_legacy.yml/source_not_null_tamanu_notes_legacy_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"notes_legacy\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'notes_legacy')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_users_id.b46294f196": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_users_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_users_id.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_unique_tamanu_users_id.b46294f196", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_users_id"], "alias": "source_unique_tamanu_users_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6273658, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_unique_tamanu_users_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"users\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_id.7a4497a05a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_id.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_id.7a4497a05a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_id"], "alias": "source_not_null_tamanu_users_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6291084, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"users\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_created_at.7bde2fabde": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_created_at.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_created_at.7bde2fabde", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_created_at"], "alias": "source_not_null_tamanu_users_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6308362, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"users\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_updated_at.63853dad90": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_updated_at.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_updated_at.63853dad90", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_updated_at"], "alias": "source_not_null_tamanu_users_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6325197, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"users\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_users_email.e8d696ebe0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_users_email", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_users_email.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_unique_tamanu_users_email.e8d696ebe0", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_users_email"], "alias": "source_unique_tamanu_users_email", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6343508, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_unique_tamanu_users_email.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    email as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"users\"\nwhere email is not null\ngroup by email\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_email.c9dd9cef8c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_email", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_email.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_email.c9dd9cef8c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_email"], "alias": "source_not_null_tamanu_users_email", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6360507, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_email.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect email\nfrom \"central\".\"public\".\"users\"\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_display_name.86d7ca2504": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_display_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_display_name.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_display_name.86d7ca2504", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_display_name"], "alias": "source_not_null_tamanu_users_display_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6377473, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_display_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect display_name\nfrom \"central\".\"public\".\"users\"\nwhere display_name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "display_name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "display_name", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_role.553b7aa11f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_role", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_role.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_role.553b7aa11f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_role"], "alias": "source_not_null_tamanu_users_role", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6394317, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_role.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect role\nfrom \"central\".\"public\".\"users\"\nwhere role is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "role", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "role", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_updated_at_sync_tick.ddaa25a636": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_updated_at_sync_tick.ddaa25a636", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_updated_at_sync_tick"], "alias": "source_not_null_tamanu_users_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6411233, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"users\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_visibility_status.48d8ce74c3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_visibility_status.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_visibility_status.48d8ce74c3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_visibility_status"], "alias": "source_not_null_tamanu_users_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6429286, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"users\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_users_device_registration_quota.06b86bd62e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_users_device_registration_quota", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_users_device_registration_quota.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_users_device_registration_quota.06b86bd62e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_users_device_registration_quota"], "alias": "source_not_null_tamanu_users_device_registration_quota", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.644757, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/source_not_null_tamanu_users_device_registration_quota.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect device_registration_quota\nfrom \"central\".\"public\".\"users\"\nwhere device_registration_quota is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_registration_quota", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "device_registration_quota", "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0.fdd0e2e704": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_accepted_rang_582fdc17e1da62c414afe0e52fdca979.sql", "original_file_path": "../../database/model/public/users.yml", "unique_id": "test.tamanu.dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0.fdd0e2e704", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0"], "alias": "dbt_utils_source_accepted_rang_582fdc17e1da62c414afe0e52fdca979", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_accepted_rang_582fdc17e1da62c414afe0e52fdca979", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_accepted_rang_582fdc17e1da62c414afe0e52fdca979"}, "created_at": 1775621422.646472, "relation_name": null, "raw_code": "{{ dbt_utils.test_accepted_range(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_accepted_rang_582fdc17e1da62c414afe0e52fdca979\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_accepted_range", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/users.yml/dbt_utils_source_accepted_rang_582fdc17e1da62c414afe0e52fdca979.sql", "compiled": true, "compiled_code": "\n\nwith meet_condition as(\n  select *\n  from \"central\".\"public\".\"users\"\n),\n\nvalidation_errors as (\n  select *\n  from meet_condition\n  where\n    -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n    1 = 2\n    -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n    or not device_registration_quota >= 0\n)\n\nselect *\nfrom validation_errors\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_registration_quota", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_range", "kwargs": {"column_name": "device_registration_quota", "min_value": 0, "model": "{{ get_where_subquery(source('tamanu', 'users')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_unique_tamanu_location_assignments_id.d7960bf1a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_location_assignments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_location_assignments_id.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_unique_tamanu_location_assignments_id.d7960bf1a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_location_assignments_id"], "alias": "source_unique_tamanu_location_assignments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6557393, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_unique_tamanu_location_assignments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"location_assignments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_id.f9c655fff8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_id.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_id.f9c655fff8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_id"], "alias": "source_not_null_tamanu_location_assignments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6574986, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"location_assignments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_user_id.49ff1e2e9a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_user_id.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_user_id.49ff1e2e9a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_user_id"], "alias": "source_not_null_tamanu_location_assignments_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6592336, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"location_assignments\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_location_id.4ec3093145": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_location_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_location_id.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_location_id.4ec3093145", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_location_id"], "alias": "source_not_null_tamanu_location_assignments_location_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6610148, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_location_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect location_id\nfrom \"central\".\"public\".\"location_assignments\"\nwhere location_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "location_id", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_date.41611197a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_date.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_date.41611197a6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_date"], "alias": "source_not_null_tamanu_location_assignments_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6629198, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"location_assignments\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_start_time.3eaa8dd9bd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_start_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_start_time.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_start_time.3eaa8dd9bd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_start_time"], "alias": "source_not_null_tamanu_location_assignments_start_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6646214, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_start_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect start_time\nfrom \"central\".\"public\".\"location_assignments\"\nwhere start_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "start_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_time", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_end_time.1d084e0550": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_end_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_end_time.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_end_time.1d084e0550", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_end_time"], "alias": "source_not_null_tamanu_location_assignments_end_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6663296, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_end_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect end_time\nfrom \"central\".\"public\".\"location_assignments\"\nwhere end_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "end_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "end_time", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_created_at.df3be173f2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_created_at.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_created_at.df3be173f2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_created_at"], "alias": "source_not_null_tamanu_location_assignments_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6680377, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"location_assignments\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_updated_at.31f65e2832": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_location_assignments_updated_at.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_updated_at.31f65e2832", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_updated_at"], "alias": "source_not_null_tamanu_location_assignments_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6697433, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_location_assignments_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"location_assignments\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_location_assignments_updated_at_sync_tick.b44f74a24f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_location_assignments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locatio_5d42155e50faddea8898718637e3d766.sql", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_location_assignments_updated_at_sync_tick.b44f74a24f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_location_assignments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_locatio_5d42155e50faddea8898718637e3d766", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_locatio_5d42155e50faddea8898718637e3d766", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_locatio_5d42155e50faddea8898718637e3d766"}, "created_at": 1775621422.6715562, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_locatio_5d42155e50faddea8898718637e3d766\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/location_assignments.yml/source_not_null_tamanu_locatio_5d42155e50faddea8898718637e3d766.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"location_assignments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'location_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_survey_screen_components_id.83c6daf387": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_survey_screen_components_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_survey_screen_components_id.sql", "original_file_path": "../../database/model/public/survey_screen_components.yml", "unique_id": "test.tamanu.source_unique_tamanu_survey_screen_components_id.83c6daf387", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_survey_screen_components_id"], "alias": "source_unique_tamanu_survey_screen_components_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6738286, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_screen_components"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_screen_components"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_screen_components.yml/source_unique_tamanu_survey_screen_components_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"survey_screen_components\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_screen_components')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_screen_components_id.f2559a7214": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_screen_components_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_screen_components_id.sql", "original_file_path": "../../database/model/public/survey_screen_components.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_screen_components_id.f2559a7214", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_screen_components_id"], "alias": "source_not_null_tamanu_survey_screen_components_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6755872, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_screen_components"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_screen_components"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_screen_components.yml/source_not_null_tamanu_survey_screen_components_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"survey_screen_components\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_screen_components')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_screen_components_created_at.e0b4cb2d3f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_screen_components_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_screen_components_created_at.sql", "original_file_path": "../../database/model/public/survey_screen_components.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_screen_components_created_at.e0b4cb2d3f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_screen_components_created_at"], "alias": "source_not_null_tamanu_survey_screen_components_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6772833, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_screen_components"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_screen_components"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_screen_components.yml/source_not_null_tamanu_survey_screen_components_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"survey_screen_components\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'survey_screen_components')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at.87177a4413": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_screen_components_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_screen_components_updated_at.sql", "original_file_path": "../../database/model/public/survey_screen_components.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at.87177a4413", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_screen_components_updated_at"], "alias": "source_not_null_tamanu_survey_screen_components_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6791482, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_screen_components"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_screen_components"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_screen_components.yml/source_not_null_tamanu_survey_screen_components_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"survey_screen_components\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'survey_screen_components')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at_sync_tick.ac240e6aaa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_screen_components_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey__9ff1b196021da7b7c574cfc16944b444.sql", "original_file_path": "../../database/model/public/survey_screen_components.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at_sync_tick.ac240e6aaa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_screen_components_updated_at_sync_tick"], "alias": "source_not_null_tamanu_survey__9ff1b196021da7b7c574cfc16944b444", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_survey__9ff1b196021da7b7c574cfc16944b444", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_survey__9ff1b196021da7b7c574cfc16944b444"}, "created_at": 1775621422.6809127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_survey__9ff1b196021da7b7c574cfc16944b444\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_screen_components"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_screen_components"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_screen_components.yml/source_not_null_tamanu_survey__9ff1b196021da7b7c574cfc16944b444.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"survey_screen_components\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'survey_screen_components')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_tasks_id.78245a380c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_tasks_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_tasks_id.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_unique_tamanu_tasks_id.78245a380c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_tasks_id"], "alias": "source_unique_tamanu_tasks_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.683231, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_unique_tamanu_tasks_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"tasks\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_id.5bf790bd4a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_id.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_id.5bf790bd4a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_id"], "alias": "source_not_null_tamanu_tasks_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.684979, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"tasks\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_encounter_id.a10fb48922": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_encounter_id.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_encounter_id.a10fb48922", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_encounter_id"], "alias": "source_not_null_tamanu_tasks_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6868196, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"tasks\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_name.2bd48eee09": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_name.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_name.2bd48eee09", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_name"], "alias": "source_not_null_tamanu_tasks_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6885338, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"tasks\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_due_time.786df1eb28": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_due_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_due_time.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_due_time.786df1eb28", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_due_time"], "alias": "source_not_null_tamanu_tasks_due_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6902792, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_due_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect due_time\nfrom \"central\".\"public\".\"tasks\"\nwhere due_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "due_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "due_time", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_requested_by_user_id.952e010b84": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_requested_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_requested_by_user_id.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_requested_by_user_id.952e010b84", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_requested_by_user_id"], "alias": "source_not_null_tamanu_tasks_requested_by_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.691988, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_requested_by_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect requested_by_user_id\nfrom \"central\".\"public\".\"tasks\"\nwhere requested_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "requested_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "requested_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_request_time.23dfcbcfc2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_request_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_request_time.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_request_time.23dfcbcfc2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_request_time"], "alias": "source_not_null_tamanu_tasks_request_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6937113, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_request_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect request_time\nfrom \"central\".\"public\".\"tasks\"\nwhere request_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "request_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "request_time", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_status.bac3beba06": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_status.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_status.bac3beba06", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_status"], "alias": "source_not_null_tamanu_tasks_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6954262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"tasks\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_created_at.75a1e0c186": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_created_at.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_created_at.75a1e0c186", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_created_at"], "alias": "source_not_null_tamanu_tasks_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6972642, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"tasks\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_updated_at.6e16335296": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_updated_at.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_updated_at.6e16335296", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_updated_at"], "alias": "source_not_null_tamanu_tasks_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.6989539, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"tasks\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_updated_at_sync_tick.1b04cf33ee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_updated_at_sync_tick.1b04cf33ee", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_updated_at_sync_tick"], "alias": "source_not_null_tamanu_tasks_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7006462, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"tasks\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_tasks_task_type.4d57fb7d6d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_tasks_task_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_tasks_task_type.sql", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_tasks_task_type.4d57fb7d6d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_tasks_task_type"], "alias": "source_not_null_tamanu_tasks_task_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7023213, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "tasks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.tasks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/tasks.yml/source_not_null_tamanu_tasks_task_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect task_type\nfrom \"central\".\"public\".\"tasks\"\nwhere task_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "task_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_type", "model": "{{ get_where_subquery(source('tamanu', 'tasks')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_imaging_request_areas_id.b9f4c605b2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_imaging_request_areas_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_imaging_request_areas_id.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_unique_tamanu_imaging_request_areas_id.b9f4c605b2", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_imaging_request_areas_id"], "alias": "source_unique_tamanu_imaging_request_areas_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7047837, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_unique_tamanu_imaging_request_areas_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_request_areas_id.3b96eae2fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_request_areas_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_request_areas_id.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_request_areas_id.3b96eae2fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_request_areas_id"], "alias": "source_not_null_tamanu_imaging_request_areas_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7064927, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_not_null_tamanu_imaging_request_areas_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_request_areas_created_at.bbbd373fe1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_request_areas_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_request_areas_created_at.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_request_areas_created_at.bbbd373fe1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_request_areas_created_at"], "alias": "source_not_null_tamanu_imaging_request_areas_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7082145, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_not_null_tamanu_imaging_request_areas_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at.aab4a9c280": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_request_areas_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_request_areas_updated_at.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at.aab4a9c280", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_request_areas_updated_at"], "alias": "source_not_null_tamanu_imaging_request_areas_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.709936, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_not_null_tamanu_imaging_request_areas_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_request_areas_imaging_request_id.c75e5d81dd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_request_areas_imaging_request_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_request_areas_imaging_request_id.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_request_areas_imaging_request_id.c75e5d81dd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_request_areas_imaging_request_id"], "alias": "source_not_null_tamanu_imaging_request_areas_imaging_request_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.711722, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_not_null_tamanu_imaging_request_areas_imaging_request_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect imaging_request_id\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere imaging_request_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "imaging_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "imaging_request_id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_.ea8a5a0600": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_0465e87fe241b66c7f71cdc1b6e494e6.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_.ea8a5a0600", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_"], "alias": "source_relationships_tamanu_im_0465e87fe241b66c7f71cdc1b6e494e6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_0465e87fe241b66c7f71cdc1b6e494e6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_0465e87fe241b66c7f71cdc1b6e494e6"}, "created_at": 1775621422.7134671, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_0465e87fe241b66c7f71cdc1b6e494e6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_requests"], ["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_relationships_tamanu_im_0465e87fe241b66c7f71cdc1b6e494e6.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select imaging_request_id as from_field\n    from \"central\".\"public\".\"imaging_request_areas\"\n    where imaging_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"imaging_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "imaging_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "imaging_request_id", "to": "source('tamanu', 'imaging_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_request_areas_area_id.e9e04e2311": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_request_areas_area_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_request_areas_area_id.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_request_areas_area_id.e9e04e2311", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_request_areas_area_id"], "alias": "source_not_null_tamanu_imaging_request_areas_area_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7188318, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_not_null_tamanu_imaging_request_areas_area_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect area_id\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere area_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "area_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "area_id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_.6afdf29a06": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_im_27f7127d31a2d9a34a6803aa45ae1e55.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_.6afdf29a06", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_"], "alias": "source_relationships_tamanu_im_27f7127d31a2d9a34a6803aa45ae1e55", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_im_27f7127d31a2d9a34a6803aa45ae1e55", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_im_27f7127d31a2d9a34a6803aa45ae1e55"}, "created_at": 1775621422.7208521, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_im_27f7127d31a2d9a34a6803aa45ae1e55\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_relationships_tamanu_im_27f7127d31a2d9a34a6803aa45ae1e55.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select area_id as from_field\n    from \"central\".\"public\".\"imaging_request_areas\"\n    where area_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"reference_data\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "area_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "area_id", "to": "source('tamanu', 'reference_data')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick.cdbd0a0462": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_imaging_6297633ac354d8d30be1f15d8121c760.sql", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick.cdbd0a0462", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick"], "alias": "source_not_null_tamanu_imaging_6297633ac354d8d30be1f15d8121c760", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_imaging_6297633ac354d8d30be1f15d8121c760", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_imaging_6297633ac354d8d30be1f15d8121c760"}, "created_at": 1775621422.7258232, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_imaging_6297633ac354d8d30be1f15d8121c760\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "imaging_request_areas"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.imaging_request_areas"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/imaging_request_areas.yml/source_not_null_tamanu_imaging_6297633ac354d8d30be1f15d8121c760.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"imaging_request_areas\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'imaging_request_areas')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_assets_id.0b004e27a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_assets_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_assets_id.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_unique_tamanu_assets_id.0b004e27a6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_assets_id"], "alias": "source_unique_tamanu_assets_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7287672, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_unique_tamanu_assets_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"assets\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_assets_id.5903661f6e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_assets_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_assets_id.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_assets_id.5903661f6e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_assets_id"], "alias": "source_not_null_tamanu_assets_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7305267, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_not_null_tamanu_assets_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"assets\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_assets_name.9ccba2d3d2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_assets_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_assets_name.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_assets_name.9ccba2d3d2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_assets_name"], "alias": "source_not_null_tamanu_assets_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7322361, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_not_null_tamanu_assets_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"assets\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_assets_type.a71e515992": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_assets_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_assets_type.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_assets_type.a71e515992", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_assets_type"], "alias": "source_not_null_tamanu_assets_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7339556, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_not_null_tamanu_assets_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"assets\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_assets_type__image_png__image_svg.4ac901bedb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_assets_type__image_png__image_svg", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu_assets_type__image_png__image_svg.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_assets_type__image_png__image_svg.4ac901bedb", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_assets_type__image_png__image_svg"], "alias": "source_accepted_values_tamanu_assets_type__image_png__image_svg", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7356796, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_accepted_values_tamanu_assets_type__image_png__image_svg.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"assets\"\n    group by type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'image/png','image/svg'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "type", "values": ["image/png", "image/svg"], "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_assets_data.58f7384f54": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_assets_data", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_assets_data.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_assets_data.58f7384f54", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_assets_data"], "alias": "source_not_null_tamanu_assets_data", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.740913, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_not_null_tamanu_assets_data.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect data\nfrom \"central\".\"public\".\"assets\"\nwhere data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "data", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "data", "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_assets_updated_at_sync_tick.6baf11bd0b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_assets_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_assets_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "test.tamanu.source_not_null_tamanu_assets_updated_at_sync_tick.6baf11bd0b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_assets_updated_at_sync_tick"], "alias": "source_not_null_tamanu_assets_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7427056, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "assets"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.assets"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/assets.yml/source_not_null_tamanu_assets_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"assets\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'assets')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drug_facilities_reference_drug_id.358fa51efa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drug_facilities_reference_drug_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_a85329f24a02d8a266ae910b0c808eca.sql", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drug_facilities_reference_drug_id.358fa51efa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drug_facilities_reference_drug_id"], "alias": "source_not_null_tamanu_referen_a85329f24a02d8a266ae910b0c808eca", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_a85329f24a02d8a266ae910b0c808eca", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_a85329f24a02d8a266ae910b0c808eca"}, "created_at": 1775621422.7450817, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_a85329f24a02d8a266ae910b0c808eca\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drug_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drug_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drug_facilities.yml/source_not_null_tamanu_referen_a85329f24a02d8a266ae910b0c808eca.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect reference_drug_id\nfrom \"central\".\"public\".\"reference_drug_facilities\"\nwhere reference_drug_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reference_drug_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "reference_drug_id", "model": "{{ get_where_subquery(source('tamanu', 'reference_drug_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drug_facilities_facility_id.5012dd6aea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drug_facilities_facility_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drug_facilities_facility_id.sql", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drug_facilities_facility_id.5012dd6aea", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drug_facilities_facility_id"], "alias": "source_not_null_tamanu_reference_drug_facilities_facility_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7470253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drug_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drug_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drug_facilities.yml/source_not_null_tamanu_reference_drug_facilities_facility_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect facility_id\nfrom \"central\".\"public\".\"reference_drug_facilities\"\nwhere facility_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "facility_id", "model": "{{ get_where_subquery(source('tamanu', 'reference_drug_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drug_facilities_created_at.8b63abec3a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drug_facilities_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drug_facilities_created_at.sql", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drug_facilities_created_at.8b63abec3a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drug_facilities_created_at"], "alias": "source_not_null_tamanu_reference_drug_facilities_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.748781, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drug_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drug_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drug_facilities.yml/source_not_null_tamanu_reference_drug_facilities_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"reference_drug_facilities\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_drug_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at.978a5d4017": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drug_facilities_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drug_facilities_updated_at.sql", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at.978a5d4017", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drug_facilities_updated_at"], "alias": "source_not_null_tamanu_reference_drug_facilities_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.750506, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drug_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drug_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drug_facilities.yml/source_not_null_tamanu_reference_drug_facilities_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"reference_drug_facilities\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_drug_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick.26b8e76f96": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_b4bf525cb27a74fbe2fad4a7072b224a.sql", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick.26b8e76f96", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick"], "alias": "source_not_null_tamanu_referen_b4bf525cb27a74fbe2fad4a7072b224a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_b4bf525cb27a74fbe2fad4a7072b224a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_b4bf525cb27a74fbe2fad4a7072b224a"}, "created_at": 1775621422.7522254, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_b4bf525cb27a74fbe2fad4a7072b224a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drug_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drug_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drug_facilities.yml/source_not_null_tamanu_referen_b4bf525cb27a74fbe2fad4a7072b224a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"reference_drug_facilities\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'reference_drug_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_drug_facilities_stock_status.290bc96370": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_drug_facilities_stock_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_drug_facilities_stock_status.sql", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_drug_facilities_stock_status.290bc96370", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_drug_facilities_stock_status"], "alias": "source_not_null_tamanu_reference_drug_facilities_stock_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7539725, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_drug_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_drug_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_drug_facilities.yml/source_not_null_tamanu_reference_drug_facilities_stock_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect stock_status\nfrom \"central\".\"public\".\"reference_drug_facilities\"\nwhere stock_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stock_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stock_status", "model": "{{ get_where_subquery(source('tamanu', 'reference_drug_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_vrs_data_id.23cca07715": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_vrs_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_vrs_data_id.sql", "original_file_path": "../../database/model/public/patient_vrs_data.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_vrs_data_id.23cca07715", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_vrs_data_id"], "alias": "source_unique_tamanu_patient_vrs_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7563396, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_vrs_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_vrs_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_vrs_data.yml/source_unique_tamanu_patient_vrs_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_vrs_data\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_vrs_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_vrs_data_id.4cc64fcbe6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_vrs_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_vrs_data_id.sql", "original_file_path": "../../database/model/public/patient_vrs_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_vrs_data_id.4cc64fcbe6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_vrs_data_id"], "alias": "source_not_null_tamanu_patient_vrs_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7580726, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_vrs_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_vrs_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_vrs_data.yml/source_not_null_tamanu_patient_vrs_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_vrs_data\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_vrs_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_.a8a8eb7561": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_8e72551999606f3ac0ad694f02d2b37a.sql", "original_file_path": "../../database/model/public/patient_vrs_data.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_.a8a8eb7561", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_8e72551999606f3ac0ad694f02d2b37a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_8e72551999606f3ac0ad694f02d2b37a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_8e72551999606f3ac0ad694f02d2b37a"}, "created_at": 1775621422.7598004, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_8e72551999606f3ac0ad694f02d2b37a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_vrs_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_vrs_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_vrs_data.yml/source_relationships_tamanu_pa_8e72551999606f3ac0ad694f02d2b37a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_vrs_data\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_vrs_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.37fb7ca437": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.sql", "original_file_path": "../../database/model/public/patient_vrs_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.37fb7ca437", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote"], "alias": "source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.765179, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_vrs_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_vrs_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_vrs_data.yml/source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_deleted_by_remote\nfrom \"central\".\"public\".\"patient_vrs_data\"\nwhere is_deleted_by_remote is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_deleted_by_remote", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_deleted_by_remote", "model": "{{ get_where_subquery(source('tamanu', 'patient_vrs_data')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounter_pause_prescriptions_id.41bdc9747d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounter_pause_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounter_pause_prescriptions_id.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounter_pause_prescriptions_id.41bdc9747d", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounter_pause_prescriptions_id"], "alias": "source_unique_tamanu_encounter_pause_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7675261, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_unique_tamanu_encounter_pause_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_id.e57a9fc1b3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_pause_prescriptions_id.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_id.e57a9fc1b3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_id"], "alias": "source_not_null_tamanu_encounter_pause_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7692702, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encounter_pause_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id.fbd245146d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_9a64a18275dbccf86970633bcee907c1.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id.fbd245146d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id"], "alias": "source_not_null_tamanu_encount_9a64a18275dbccf86970633bcee907c1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_9a64a18275dbccf86970633bcee907c1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_9a64a18275dbccf86970633bcee907c1"}, "created_at": 1775621422.771163, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_9a64a18275dbccf86970633bcee907c1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encount_9a64a18275dbccf86970633bcee907c1.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_prescription_id\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere encounter_prescription_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_prescription_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_prescription_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_duration.dbd59b4962": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_pause_duration", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_0e3f0f5bf7a967a5d1a0aaaceb7dca2f.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_duration.dbd59b4962", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_pause_duration"], "alias": "source_not_null_tamanu_encount_0e3f0f5bf7a967a5d1a0aaaceb7dca2f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_0e3f0f5bf7a967a5d1a0aaaceb7dca2f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_0e3f0f5bf7a967a5d1a0aaaceb7dca2f"}, "created_at": 1775621422.7729676, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_0e3f0f5bf7a967a5d1a0aaaceb7dca2f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encount_0e3f0f5bf7a967a5d1a0aaaceb7dca2f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect pause_duration\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere pause_duration is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pause_duration", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pause_duration", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit.d2004436c1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_ada94f6eebab22f9ca0b527d737830cd.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit.d2004436c1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit"], "alias": "source_not_null_tamanu_encount_ada94f6eebab22f9ca0b527d737830cd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_ada94f6eebab22f9ca0b527d737830cd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_ada94f6eebab22f9ca0b527d737830cd"}, "created_at": 1775621422.774705, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_ada94f6eebab22f9ca0b527d737830cd\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encount_ada94f6eebab22f9ca0b527d737830cd.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect pause_time_unit\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere pause_time_unit is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pause_time_unit", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pause_time_unit", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date.e8ca98a8ab": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_42705cf7c6542d71a20652516373c5f0.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date.e8ca98a8ab", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date"], "alias": "source_not_null_tamanu_encount_42705cf7c6542d71a20652516373c5f0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_42705cf7c6542d71a20652516373c5f0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_42705cf7c6542d71a20652516373c5f0"}, "created_at": 1775621422.776404, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_42705cf7c6542d71a20652516373c5f0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encount_42705cf7c6542d71a20652516373c5f0.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect pause_start_date\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere pause_start_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pause_start_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pause_start_date", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date.7bc8a722ce": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_f85d28735b13d4ffe2b7225869bdd176.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date.7bc8a722ce", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date"], "alias": "source_not_null_tamanu_encount_f85d28735b13d4ffe2b7225869bdd176", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_f85d28735b13d4ffe2b7225869bdd176", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_f85d28735b13d4ffe2b7225869bdd176"}, "created_at": 1775621422.7782383, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_f85d28735b13d4ffe2b7225869bdd176\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encount_f85d28735b13d4ffe2b7225869bdd176.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect pause_end_date\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere pause_end_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pause_end_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pause_end_date", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_created_at.ad1eb449bc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_pause_prescriptions_created_at.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_created_at.ad1eb449bc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_created_at"], "alias": "source_not_null_tamanu_encounter_pause_prescriptions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7799404, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encounter_pause_prescriptions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at.b6f63cea98": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_pause_prescriptions_updated_at.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at.b6f63cea98", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_updated_at"], "alias": "source_not_null_tamanu_encounter_pause_prescriptions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7817466, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encounter_pause_prescriptions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick.242bd8180f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_09d2d7e2e4a39d02d1e644024822b8df.sql", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick.242bd8180f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encount_09d2d7e2e4a39d02d1e644024822b8df", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_09d2d7e2e4a39d02d1e644024822b8df", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_09d2d7e2e4a39d02d1e644024822b8df"}, "created_at": 1775621422.7834742, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_09d2d7e2e4a39d02d1e644024822b8df\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_pause_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_pause_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_pause_prescriptions.yml/source_not_null_tamanu_encount_09d2d7e2e4a39d02d1e644024822b8df.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounter_pause_prescriptions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounter_pause_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_pharmacy_orders_id.8a0e450c16": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_pharmacy_orders_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_pharmacy_orders_id.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_unique_tamanu_pharmacy_orders_id.8a0e450c16", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_pharmacy_orders_id"], "alias": "source_unique_tamanu_pharmacy_orders_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7858, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_unique_tamanu_pharmacy_orders_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_id.a04c130d73": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_id.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_id.a04c130d73", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_id"], "alias": "source_not_null_tamanu_pharmacy_orders_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7875235, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.51e116019a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_ordering_clinician_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.51e116019a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_ordering_clinician_id"], "alias": "source_not_null_tamanu_pharmacy_orders_ordering_clinician_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.789375, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect ordering_clinician_id\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere ordering_clinician_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ordering_clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ordering_clinician_id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_encounter_id.5425699795": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_encounter_id.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_encounter_id.5425699795", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_encounter_id"], "alias": "source_not_null_tamanu_pharmacy_orders_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7910767, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_created_at.c5c0ae80b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_created_at.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_created_at.c5c0ae80b6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_created_at"], "alias": "source_not_null_tamanu_pharmacy_orders_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.79278, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at.5cbf7e3b7d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_updated_at.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at.5cbf7e3b7d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_updated_at"], "alias": "source_not_null_tamanu_pharmacy_orders_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.794475, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.bc9433fa8e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.bc9433fa8e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick"], "alias": "source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.796205, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_is_discharge_prescription.3adc7ce103": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_is_discharge_prescription", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmac_7803503b753c14e99185cf602b5e07b9.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_is_discharge_prescription.3adc7ce103", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_is_discharge_prescription"], "alias": "source_not_null_tamanu_pharmac_7803503b753c14e99185cf602b5e07b9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_pharmac_7803503b753c14e99185cf602b5e07b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_pharmac_7803503b753c14e99185cf602b5e07b9"}, "created_at": 1775621422.7980149, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_pharmac_7803503b753c14e99185cf602b5e07b9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmac_7803503b753c14e99185cf602b5e07b9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_discharge_prescription\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere is_discharge_prescription is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_discharge_prescription", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_discharge_prescription", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_date.d54f107a00": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_date.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_date.d54f107a00", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_date"], "alias": "source_not_null_tamanu_pharmacy_orders_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.7998354, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_pharmacy_orders_facility_id.9a63aff904": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_pharmacy_orders_facility_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_pharmacy_orders_facility_id.sql", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "test.tamanu.source_not_null_tamanu_pharmacy_orders_facility_id.9a63aff904", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_pharmacy_orders_facility_id"], "alias": "source_not_null_tamanu_pharmacy_orders_facility_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8015401, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "pharmacy_orders"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.pharmacy_orders"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/pharmacy_orders.yml/source_not_null_tamanu_pharmacy_orders_facility_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect facility_id\nfrom \"central\".\"public\".\"pharmacy_orders\"\nwhere facility_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "facility_id", "model": "{{ get_where_subquery(source('tamanu', 'pharmacy_orders')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_portal_survey_assignments_id.07592792ba": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_portal_survey_assignments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_portal_survey_assignments_id.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_unique_tamanu_portal_survey_assignments_id.07592792ba", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_portal_survey_assignments_id"], "alias": "source_unique_tamanu_portal_survey_assignments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.80382, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_unique_tamanu_portal_survey_assignments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_id.493854cb01": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_id.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_id.493854cb01", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_id"], "alias": "source_not_null_tamanu_portal_survey_assignments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8055482, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_created_at.28c46a0f38": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_created_at.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_created_at.28c46a0f38", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_created_at"], "alias": "source_not_null_tamanu_portal_survey_assignments_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8074179, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at.fba08a91b8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_updated_at.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at.fba08a91b8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_updated_at"], "alias": "source_not_null_tamanu_portal_survey_assignments_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8091187, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_patient_id.4d329cbe3d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_patient_id.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_patient_id.4d329cbe3d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_patient_id"], "alias": "source_not_null_tamanu_portal_survey_assignments_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8108406, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_survey_id.4c38bb901d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_survey_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_survey_id.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_survey_id.4c38bb901d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_survey_id"], "alias": "source_not_null_tamanu_portal_survey_assignments_survey_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8125286, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_survey_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect survey_id\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere survey_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "survey_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "survey_id", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_status.cbc3f2b455": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_status.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_status.cbc3f2b455", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_status"], "alias": "source_not_null_tamanu_portal_survey_assignments_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8142316, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_by_id.0e7bb7620f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_assigned_by_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_assigned_by_id.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_by_id.0e7bb7620f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_assigned_by_id"], "alias": "source_not_null_tamanu_portal_survey_assignments_assigned_by_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8160205, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_assigned_by_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect assigned_by_id\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere assigned_by_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "assigned_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "assigned_by_id", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick.71bac26d85": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal__97281f9b4a17aedd3f69aa37f98a01b2.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick.71bac26d85", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_portal__97281f9b4a17aedd3f69aa37f98a01b2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_portal__97281f9b4a17aedd3f69aa37f98a01b2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_portal__97281f9b4a17aedd3f69aa37f98a01b2"}, "created_at": 1775621422.8177454, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_portal__97281f9b4a17aedd3f69aa37f98a01b2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal__97281f9b4a17aedd3f69aa37f98a01b2.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_at.368a678108": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_assigned_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_assigned_at.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_at.368a678108", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_assigned_at"], "alias": "source_not_null_tamanu_portal_survey_assignments_assigned_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8194168, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_assigned_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect assigned_at\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere assigned_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "assigned_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "assigned_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_survey_assignments_facility_id.635b864bd0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_survey_assignments_facility_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_survey_assignments_facility_id.sql", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_survey_assignments_facility_id.635b864bd0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_survey_assignments_facility_id"], "alias": "source_not_null_tamanu_portal_survey_assignments_facility_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8210962, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_survey_assignments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_survey_assignments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_survey_assignments.yml/source_not_null_tamanu_portal_survey_assignments_facility_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect facility_id\nfrom \"central\".\"public\".\"portal_survey_assignments\"\nwhere facility_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "facility_id", "model": "{{ get_where_subquery(source('tamanu', 'portal_survey_assignments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.a16be69527": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_lab_test_types_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.a16be69527", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_lab_test_types_created_at"], "alias": "source_not_null_tamanu_lab_test_panel_lab_test_types_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8236434, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_test_panel_lab_test_types\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.92a5a89a02": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.92a5a89a02", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at"], "alias": "source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8253627, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_test_panel_lab_test_types\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id.35608ab0f8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tes_8e7c6807308c22538914333539151a2f.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id.35608ab0f8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id"], "alias": "source_not_null_tamanu_lab_tes_8e7c6807308c22538914333539151a2f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_lab_tes_8e7c6807308c22538914333539151a2f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_lab_tes_8e7c6807308c22538914333539151a2f"}, "created_at": 1775621422.8270917, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_lab_tes_8e7c6807308c22538914333539151a2f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_not_null_tamanu_lab_tes_8e7c6807308c22538914333539151a2f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect lab_test_panel_id\nfrom \"central\".\"public\".\"lab_test_panel_lab_test_types\"\nwhere lab_test_panel_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_panel_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "lab_test_panel_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_.930e94d56c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_ef4c88f2acf07aa612fb52ded2ca3394.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_.930e94d56c", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_"], "alias": "source_relationships_tamanu_la_ef4c88f2acf07aa612fb52ded2ca3394", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_ef4c88f2acf07aa612fb52ded2ca3394", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_ef4c88f2acf07aa612fb52ded2ca3394"}, "created_at": 1775621422.8288412, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_ef4c88f2acf07aa612fb52ded2ca3394\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"], ["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels", "source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_relationships_tamanu_la_ef4c88f2acf07aa612fb52ded2ca3394.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_test_panel_id as from_field\n    from \"central\".\"public\".\"lab_test_panel_lab_test_types\"\n    where lab_test_panel_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_test_panels\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_panel_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_test_panel_id", "to": "source('tamanu', 'lab_test_panels')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id.69ea8c29b8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tes_db27b94c531fa498ab1ef02bd5a11587.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id.69ea8c29b8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id"], "alias": "source_not_null_tamanu_lab_tes_db27b94c531fa498ab1ef02bd5a11587", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_lab_tes_db27b94c531fa498ab1ef02bd5a11587", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_lab_tes_db27b94c531fa498ab1ef02bd5a11587"}, "created_at": 1775621422.8348043, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_lab_tes_db27b94c531fa498ab1ef02bd5a11587\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_not_null_tamanu_lab_tes_db27b94c531fa498ab1ef02bd5a11587.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect lab_test_type_id\nfrom \"central\".\"public\".\"lab_test_panel_lab_test_types\"\nwhere lab_test_type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "lab_test_type_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_.ca4f2c354a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_e392665d7fa59eb3bd49f0acf984b2de.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_.ca4f2c354a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_"], "alias": "source_relationships_tamanu_la_e392665d7fa59eb3bd49f0acf984b2de", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_e392665d7fa59eb3bd49f0acf984b2de", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_e392665d7fa59eb3bd49f0acf984b2de"}, "created_at": 1775621422.836623, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_e392665d7fa59eb3bd49f0acf984b2de\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_types"], ["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_types", "source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_relationships_tamanu_la_e392665d7fa59eb3bd49f0acf984b2de.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_test_type_id as from_field\n    from \"central\".\"public\".\"lab_test_panel_lab_test_types\"\n    where lab_test_type_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_test_types\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_test_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_test_type_id", "to": "source('tamanu', 'lab_test_types')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_order.d0f90d653c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_lab_test_types_order", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panel_lab_test_types_order.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_order.d0f90d653c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_lab_test_types_order"], "alias": "source_not_null_tamanu_lab_test_panel_lab_test_types_order", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8418655, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_not_null_tamanu_lab_test_panel_lab_test_types_order.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect order\nfrom \"central\".\"public\".\"lab_test_panel_lab_test_types\"\nwhere order is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "order", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "order", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick.539440bb36": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_tes_d0add5176e8dfca528420a37631e6055.sql", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick.539440bb36", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_tes_d0add5176e8dfca528420a37631e6055", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_lab_tes_d0add5176e8dfca528420a37631e6055", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_lab_tes_d0add5176e8dfca528420a37631e6055"}, "created_at": 1775621422.843655, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_lab_tes_d0add5176e8dfca528420a37631e6055\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panel_lab_test_types"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panel_lab_test_types.yml/source_not_null_tamanu_lab_tes_d0add5176e8dfca528420a37631e6055.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_test_panel_lab_test_types\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panel_lab_test_types')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_programs_id.62a81a7e37": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_programs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_programs_id.sql", "original_file_path": "../../database/model/public/programs.yml", "unique_id": "test.tamanu.source_unique_tamanu_programs_id.62a81a7e37", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_programs_id"], "alias": "source_unique_tamanu_programs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8459795, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "programs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.programs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/programs.yml/source_unique_tamanu_programs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"programs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'programs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_programs_id.30041338c4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_programs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_programs_id.sql", "original_file_path": "../../database/model/public/programs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_programs_id.30041338c4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_programs_id"], "alias": "source_not_null_tamanu_programs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.847744, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "programs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.programs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/programs.yml/source_not_null_tamanu_programs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"programs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'programs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_programs_created_at.9b5a061fef": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_programs_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_programs_created_at.sql", "original_file_path": "../../database/model/public/programs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_programs_created_at.9b5a061fef", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_programs_created_at"], "alias": "source_not_null_tamanu_programs_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.849588, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "programs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.programs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/programs.yml/source_not_null_tamanu_programs_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"programs\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'programs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_programs_updated_at.1fdd112a50": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_programs_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_programs_updated_at.sql", "original_file_path": "../../database/model/public/programs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_programs_updated_at.1fdd112a50", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_programs_updated_at"], "alias": "source_not_null_tamanu_programs_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.851271, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "programs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.programs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/programs.yml/source_not_null_tamanu_programs_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"programs\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'programs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_programs_updated_at_sync_tick.b90cb49ae9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_programs_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_programs_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/programs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_programs_updated_at_sync_tick.b90cb49ae9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_programs_updated_at_sync_tick"], "alias": "source_not_null_tamanu_programs_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8530014, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "programs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.programs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/programs.yml/source_not_null_tamanu_programs_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"programs\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'programs')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.fad79e2999": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.sql", "original_file_path": "../../database/model/public/sync_device_ticks.yml", "unique_id": "test.tamanu.source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.fad79e2999", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick"], "alias": "source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8552508, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_device_ticks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_device_ticks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_device_ticks.yml/source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    persisted_at_sync_tick as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"sync_device_ticks\"\nwhere persisted_at_sync_tick is not null\ngroup by persisted_at_sync_tick\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "persisted_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "persisted_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_device_ticks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.70f0dcb68a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.sql", "original_file_path": "../../database/model/public/sync_device_ticks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.70f0dcb68a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick"], "alias": "source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8569746, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_device_ticks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_device_ticks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_device_ticks.yml/source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect persisted_at_sync_tick\nfrom \"central\".\"public\".\"sync_device_ticks\"\nwhere persisted_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "persisted_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "persisted_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_device_ticks')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_device_ticks_device_id.6e51235a41": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_device_ticks_device_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_device_ticks_device_id.sql", "original_file_path": "../../database/model/public/sync_device_ticks.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_device_ticks_device_id.6e51235a41", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_device_ticks_device_id"], "alias": "source_not_null_tamanu_sync_device_ticks_device_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.858795, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_device_ticks"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_device_ticks"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_device_ticks.yml/source_not_null_tamanu_sync_device_ticks_device_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect device_id\nfrom \"central\".\"public\".\"sync_device_ticks\"\nwhere device_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "device_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "device_id", "model": "{{ get_where_subquery(source('tamanu', 'sync_device_ticks')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_sync_sessions_id.889d1d85c3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_sync_sessions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_sync_sessions_id.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_unique_tamanu_sync_sessions_id.889d1d85c3", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_sync_sessions_id"], "alias": "source_unique_tamanu_sync_sessions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8610206, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_unique_tamanu_sync_sessions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_sessions_id.0f66f04bf1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_sessions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_sessions_id.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_sessions_id.0f66f04bf1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_sessions_id"], "alias": "source_not_null_tamanu_sync_sessions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8627293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_not_null_tamanu_sync_sessions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_sessions_created_at.0c852b71e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_sessions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_sessions_created_at.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_sessions_created_at.0c852b71e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_sessions_created_at"], "alias": "source_not_null_tamanu_sync_sessions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8644357, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_not_null_tamanu_sync_sessions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_sessions_updated_at.807ac1b19c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_sessions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_sessions_updated_at.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_sessions_updated_at.807ac1b19c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_sessions_updated_at"], "alias": "source_not_null_tamanu_sync_sessions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8661416, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_not_null_tamanu_sync_sessions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_sessions_start_time.10e3f256db": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_sessions_start_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_sessions_start_time.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_sessions_start_time.10e3f256db", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_sessions_start_time"], "alias": "source_not_null_tamanu_sync_sessions_start_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8679824, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_not_null_tamanu_sync_sessions_start_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect start_time\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere start_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "start_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "start_time", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_sessions_last_connection_time.c7679203ab": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_sessions_last_connection_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_sessions_last_connection_time.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_sessions_last_connection_time.c7679203ab", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_sessions_last_connection_time"], "alias": "source_not_null_tamanu_sync_sessions_last_connection_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.869703, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_not_null_tamanu_sync_sessions_last_connection_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_connection_time\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere last_connection_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_connection_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_connection_time", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_sessions_parameters.f21c74e9cb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_sessions_parameters", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_sessions_parameters.sql", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_sessions_parameters.f21c74e9cb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_sessions_parameters"], "alias": "source_not_null_tamanu_sync_sessions_parameters", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.871628, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_sessions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_sessions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_sessions.yml/source_not_null_tamanu_sync_sessions_parameters.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect parameters\nfrom \"central\".\"public\".\"sync_sessions\"\nwhere parameters is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "parameters", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "parameters", "model": "{{ get_where_subquery(source('tamanu', 'sync_sessions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_patient_payments_id.31f94704f5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_patient_payments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_patient_payments_id.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_patient_payments_id.31f94704f5", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_patient_payments_id"], "alias": "source_unique_tamanu_invoice_patient_payments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8739102, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_unique_tamanu_invoice_patient_payments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_patient_payments_id.a2e9c179c4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_patient_payments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_patient_payments_id.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_patient_payments_id.a2e9c179c4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_patient_payments_id"], "alias": "source_not_null_tamanu_invoice_patient_payments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8757668, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_not_null_tamanu_invoice_patient_payments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_patient_payments_invoice_payment_id.6379289247": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_patient_payments_invoice_payment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_p_1aa0e611a3519c89055180dfbe7408c7.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_patient_payments_invoice_payment_id.6379289247", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_patient_payments_invoice_payment_id"], "alias": "source_unique_tamanu_invoice_p_1aa0e611a3519c89055180dfbe7408c7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_unique_tamanu_invoice_p_1aa0e611a3519c89055180dfbe7408c7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_unique_tamanu_invoice_p_1aa0e611a3519c89055180dfbe7408c7"}, "created_at": 1775621422.8774834, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_unique_tamanu_invoice_p_1aa0e611a3519c89055180dfbe7408c7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_unique_tamanu_invoice_p_1aa0e611a3519c89055180dfbe7408c7.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    invoice_payment_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere invoice_payment_id is not null\ngroup by invoice_payment_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "invoice_payment_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_patient_payments_invoice_payment_id.b24d465eaf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_patient_payments_invoice_payment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_166108b7670f067441de68d2351adf80.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_patient_payments_invoice_payment_id.b24d465eaf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_patient_payments_invoice_payment_id"], "alias": "source_not_null_tamanu_invoice_166108b7670f067441de68d2351adf80", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_166108b7670f067441de68d2351adf80", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_166108b7670f067441de68d2351adf80"}, "created_at": 1775621422.8792002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_166108b7670f067441de68d2351adf80\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_not_null_tamanu_invoice_166108b7670f067441de68d2351adf80.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_payment_id\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere invoice_payment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_payment_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.e12c61546e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_in_d5cfe189c00d884b66146447018c3270.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.e12c61546e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_"], "alias": "source_relationships_tamanu_in_d5cfe189c00d884b66146447018c3270", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_in_d5cfe189c00d884b66146447018c3270", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_in_d5cfe189c00d884b66146447018c3270"}, "created_at": 1775621422.880946, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_in_d5cfe189c00d884b66146447018c3270\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_payments"], ["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_payments", "source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_relationships_tamanu_in_d5cfe189c00d884b66146447018c3270.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select invoice_payment_id as from_field\n    from \"central\".\"public\".\"invoice_patient_payments\"\n    where invoice_payment_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"invoice_payments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_payment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "invoice_payment_id", "to": "source('tamanu', 'invoice_payments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_patient_payments_method_id.49c2b4bb2d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_patient_payments_method_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_patient_payments_method_id.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_patient_payments_method_id.49c2b4bb2d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_patient_payments_method_id"], "alias": "source_not_null_tamanu_invoice_patient_payments_method_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8863466, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_not_null_tamanu_invoice_patient_payments_method_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect method_id\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere method_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "method_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "method_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_.0c32c0d3e1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_9564c833f21ab7df1899acc03abd6bba.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_.0c32c0d3e1", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_"], "alias": "dbt_utils_source_relationships_9564c833f21ab7df1899acc03abd6bba", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_9564c833f21ab7df1899acc03abd6bba", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_9564c833f21ab7df1899acc03abd6bba"}, "created_at": 1775621422.8881166, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_9564c833f21ab7df1899acc03abd6bba\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/dbt_utils_source_relationships_9564c833f21ab7df1899acc03abd6bba.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    method_id as id\n\n  from \"central\".\"public\".\"invoice_patient_payments\"\n\n  where method_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'paymentMethod'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "method_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "method_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'paymentMethod'", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_invoice_patient_payments_created_at.2612097232": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_patient_payments_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_patient_payments_created_at.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_patient_payments_created_at.2612097232", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_patient_payments_created_at"], "alias": "source_not_null_tamanu_invoice_patient_payments_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.8937342, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_not_null_tamanu_invoice_patient_payments_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick.9cbc6365e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_4ff9253104ad2bf5d7a753f4573d9bfa.sql", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick.9cbc6365e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_4ff9253104ad2bf5d7a753f4573d9bfa", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_4ff9253104ad2bf5d7a753f4573d9bfa", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_4ff9253104ad2bf5d7a753f4573d9bfa"}, "created_at": 1775621422.8954809, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_4ff9253104ad2bf5d7a753f4573d9bfa\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_patient_payments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_patient_payments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_patient_payments.yml/source_not_null_tamanu_invoice_4ff9253104ad2bf5d7a753f4573d9bfa.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_patient_payments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_patient_payments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_locations_id.09af17ade1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_locations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_locations_id.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_unique_tamanu_locations_id.09af17ade1", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_locations_id"], "alias": "source_unique_tamanu_locations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.897781, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_unique_tamanu_locations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"locations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_locations_id.406e448574": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_locations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locations_id.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_locations_id.406e448574", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_locations_id"], "alias": "source_not_null_tamanu_locations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.899682, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_not_null_tamanu_locations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"locations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_locations_code.dffad8f5ce": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_locations_code", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_locations_code.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_unique_tamanu_locations_code.dffad8f5ce", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_locations_code"], "alias": "source_unique_tamanu_locations_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.90142, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_unique_tamanu_locations_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    code as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"locations\"\nwhere code is not null\ngroup by code\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_locations_code.5c9a7f01c2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_locations_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locations_code.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_locations_code.5c9a7f01c2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_locations_code"], "alias": "source_not_null_tamanu_locations_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9031396, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_not_null_tamanu_locations_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"locations\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_locations_name.b6c0a3d9c2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_locations_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locations_name.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_locations_name.b6c0a3d9c2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_locations_name"], "alias": "source_not_null_tamanu_locations_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9048505, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_not_null_tamanu_locations_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"locations\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_.def8603286": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_lo_04639952f9cab8b1912c3aad10cf2955.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_.def8603286", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_lo_04639952f9cab8b1912c3aad10cf2955", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_lo_04639952f9cab8b1912c3aad10cf2955", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_lo_04639952f9cab8b1912c3aad10cf2955"}, "created_at": 1775621422.9065897, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_lo_04639952f9cab8b1912c3aad10cf2955\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_relationships_tamanu_lo_04639952f9cab8b1912c3aad10cf2955.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"locations\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_locations_visibility_status__current__historical.8ec0690204": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_locations_visibility_status__current__historical", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__25bd1c58e7a57665c2c011a7d6056f2b.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_locations_visibility_status__current__historical.8ec0690204", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_locations_visibility_status__current__historical"], "alias": "source_accepted_values_tamanu__25bd1c58e7a57665c2c011a7d6056f2b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__25bd1c58e7a57665c2c011a7d6056f2b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__25bd1c58e7a57665c2c011a7d6056f2b"}, "created_at": 1775621422.9119039, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__25bd1c58e7a57665c2c011a7d6056f2b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_accepted_values_tamanu__25bd1c58e7a57665c2c011a7d6056f2b.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        visibility_status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"locations\"\n    group by visibility_status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'current','historical'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "visibility_status", "values": ["current", "historical"], "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_.351ebd459e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_lo_651f6f8670aadefc9d724a200c207f69.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_.351ebd459e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_"], "alias": "source_relationships_tamanu_lo_651f6f8670aadefc9d724a200c207f69", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_lo_651f6f8670aadefc9d724a200c207f69", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_lo_651f6f8670aadefc9d724a200c207f69"}, "created_at": 1775621422.9168026, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_lo_651f6f8670aadefc9d724a200c207f69\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"], ["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups", "source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_relationships_tamanu_lo_651f6f8670aadefc9d724a200c207f69.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_group_id as from_field\n    from \"central\".\"public\".\"locations\"\n    where location_group_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"location_groups\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_group_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_group_id", "to": "source('tamanu', 'location_groups')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_locations_updated_at_sync_tick.3e72adcac5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_locations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_locations_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_locations_updated_at_sync_tick.3e72adcac5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_locations_updated_at_sync_tick"], "alias": "source_not_null_tamanu_locations_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9217138, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/locations.yml/source_not_null_tamanu_locations_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"locations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'locations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_portal_users_id.2af5302ce1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_portal_users_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_portal_users_id.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_unique_tamanu_portal_users_id.2af5302ce1", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_portal_users_id"], "alias": "source_unique_tamanu_portal_users_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.924244, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_unique_tamanu_portal_users_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"portal_users\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_id.5d79991deb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_id.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_id.5d79991deb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_id"], "alias": "source_not_null_tamanu_portal_users_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.926008, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"portal_users\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_created_at.dd512de83d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_created_at.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_created_at.dd512de83d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_created_at"], "alias": "source_not_null_tamanu_portal_users_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9277396, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"portal_users\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_updated_at.5a6d07bf8a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_updated_at.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_updated_at.5a6d07bf8a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_updated_at"], "alias": "source_not_null_tamanu_portal_users_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.929424, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"portal_users\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_patient_id.f2014094b2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_patient_id.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_patient_id.f2014094b2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_patient_id"], "alias": "source_not_null_tamanu_portal_users_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9311566, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"portal_users\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_portal_users_email.4ffb54b9ac": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_portal_users_email", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_portal_users_email.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_unique_tamanu_portal_users_email.4ffb54b9ac", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_portal_users_email"], "alias": "source_unique_tamanu_portal_users_email", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.933619, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_unique_tamanu_portal_users_email.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    email as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"portal_users\"\nwhere email is not null\ngroup by email\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_email.46b31ee79f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_email", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_email.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_email.46b31ee79f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_email"], "alias": "source_not_null_tamanu_portal_users_email", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.935407, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_email.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect email\nfrom \"central\".\"public\".\"portal_users\"\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_status.1904f1c6d7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_status.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_status.1904f1c6d7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_status"], "alias": "source_not_null_tamanu_portal_users_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9371202, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"portal_users\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_portal_users_updated_at_sync_tick.b6190d5108": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_portal_users_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_portal_users_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "test.tamanu.source_not_null_tamanu_portal_users_updated_at_sync_tick.b6190d5108", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_portal_users_updated_at_sync_tick"], "alias": "source_not_null_tamanu_portal_users_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9388578, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "portal_users"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.portal_users"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/portal_users.yml/source_not_null_tamanu_portal_users_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"portal_users\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'portal_users')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_invoice_item_finalised_insurances_id.7d268a7e0a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_invoice_item_finalised_insurances_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_invoice_item_finalised_insurances_id.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_unique_tamanu_invoice_item_finalised_insurances_id.7d268a7e0a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_invoice_item_finalised_insurances_id"], "alias": "source_unique_tamanu_invoice_item_finalised_insurances_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9412897, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_unique_tamanu_invoice_item_finalised_insurances_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_id.c00db5ebff": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_item_finalised_insurances_id.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_id.c00db5ebff", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_id"], "alias": "source_not_null_tamanu_invoice_item_finalised_insurances_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9431908, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_item_finalised_insurances_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_created_at.c2d663353d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_f54971eab00cb6a0f462bf65df782cfc.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_created_at.c2d663353d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_created_at"], "alias": "source_not_null_tamanu_invoice_f54971eab00cb6a0f462bf65df782cfc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_f54971eab00cb6a0f462bf65df782cfc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_f54971eab00cb6a0f462bf65df782cfc"}, "created_at": 1775621422.944915, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_f54971eab00cb6a0f462bf65df782cfc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_f54971eab00cb6a0f462bf65df782cfc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at.eaa471bbcf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_7c5e6c11a6f4751087acac89e486a0b2.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at.eaa471bbcf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_updated_at"], "alias": "source_not_null_tamanu_invoice_7c5e6c11a6f4751087acac89e486a0b2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_7c5e6c11a6f4751087acac89e486a0b2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_7c5e6c11a6f4751087acac89e486a0b2"}, "created_at": 1775621422.9466221, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_7c5e6c11a6f4751087acac89e486a0b2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_7c5e6c11a6f4751087acac89e486a0b2.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick.b75138b334": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_971be7805449de9c1f341fbfae327da2.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick.b75138b334", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick"], "alias": "source_not_null_tamanu_invoice_971be7805449de9c1f341fbfae327da2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_971be7805449de9c1f341fbfae327da2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_971be7805449de9c1f341fbfae327da2"}, "created_at": 1775621422.9483013, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_971be7805449de9c1f341fbfae327da2\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_971be7805449de9c1f341fbfae327da2.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id.705d63f383": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_8acbf1c0dc48294b369e9adf4df1f7c8.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id.705d63f383", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id"], "alias": "source_not_null_tamanu_invoice_8acbf1c0dc48294b369e9adf4df1f7c8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_8acbf1c0dc48294b369e9adf4df1f7c8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_8acbf1c0dc48294b369e9adf4df1f7c8"}, "created_at": 1775621422.950009, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_8acbf1c0dc48294b369e9adf4df1f7c8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_8acbf1c0dc48294b369e9adf4df1f7c8.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_item_id\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere invoice_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_item_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_item_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final.21d527ca7b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_28dea00218802bfd720c5aff04cfc098.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final.21d527ca7b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final"], "alias": "source_not_null_tamanu_invoice_28dea00218802bfd720c5aff04cfc098", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_28dea00218802bfd720c5aff04cfc098", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_28dea00218802bfd720c5aff04cfc098"}, "created_at": 1775621422.9518414, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_28dea00218802bfd720c5aff04cfc098\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_28dea00218802bfd720c5aff04cfc098.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect coverage_value_final\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere coverage_value_final is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "coverage_value_final", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "coverage_value_final", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id.61feb9231c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_invoice_f202aba7fb5eaffa7fcedfd832387d45.sql", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id.61feb9231c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id"], "alias": "source_not_null_tamanu_invoice_f202aba7fb5eaffa7fcedfd832387d45", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_invoice_f202aba7fb5eaffa7fcedfd832387d45", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_invoice_f202aba7fb5eaffa7fcedfd832387d45"}, "created_at": 1775621422.9535394, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_invoice_f202aba7fb5eaffa7fcedfd832387d45\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "invoice_item_finalised_insurances"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.invoice_item_finalised_insurances"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/invoice_item_finalised_insurances.yml/source_not_null_tamanu_invoice_f202aba7fb5eaffa7fcedfd832387d45.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_insurance_plan_id\nfrom \"central\".\"public\".\"invoice_item_finalised_insurances\"\nwhere invoice_insurance_plan_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_insurance_plan_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_insurance_plan_id", "model": "{{ get_where_subquery(source('tamanu', 'invoice_item_finalised_insurances')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_task_templates_id.f452d2227f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_task_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_task_templates_id.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_unique_tamanu_task_templates_id.f452d2227f", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_task_templates_id"], "alias": "source_unique_tamanu_task_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9558108, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_unique_tamanu_task_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"task_templates\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_templates_id.0933c9bcea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_templates_id.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_templates_id.0933c9bcea", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_templates_id"], "alias": "source_not_null_tamanu_task_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9575303, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_not_null_tamanu_task_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"task_templates\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_task_templates_reference_data_id.7d4341b2a8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_task_templates_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_task_templates_reference_data_id.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_unique_tamanu_task_templates_reference_data_id.7d4341b2a8", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_task_templates_reference_data_id"], "alias": "source_unique_tamanu_task_templates_reference_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9592447, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_unique_tamanu_task_templates_reference_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    reference_data_id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"task_templates\"\nwhere reference_data_id is not null\ngroup by reference_data_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reference_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "reference_data_id", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_templates_reference_data_id.7d5a72304e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_templates_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_templates_reference_data_id.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_templates_reference_data_id.7d5a72304e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_templates_reference_data_id"], "alias": "source_not_null_tamanu_task_templates_reference_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9611106, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_not_null_tamanu_task_templates_reference_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect reference_data_id\nfrom \"central\".\"public\".\"task_templates\"\nwhere reference_data_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reference_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "reference_data_id", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_templates_created_at.dc5ea6d6ea": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_templates_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_templates_created_at.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_templates_created_at.dc5ea6d6ea", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_templates_created_at"], "alias": "source_not_null_tamanu_task_templates_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.962829, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_not_null_tamanu_task_templates_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"task_templates\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_templates_updated_at.4ff8103b44": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_templates_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_templates_updated_at.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_templates_updated_at.4ff8103b44", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_templates_updated_at"], "alias": "source_not_null_tamanu_task_templates_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9645205, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_not_null_tamanu_task_templates_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"task_templates\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_templates_updated_at_sync_tick.91bfaac2c6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_templates_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_templates_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_templates_updated_at_sync_tick.91bfaac2c6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_templates_updated_at_sync_tick"], "alias": "source_not_null_tamanu_task_templates_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9662194, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_templates.yml/source_not_null_tamanu_task_templates_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"task_templates\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'task_templates')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_attachments_id.58d67f1227": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_attachments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_attachments_id.sql", "original_file_path": "../../database/model/public/attachments.yml", "unique_id": "test.tamanu.source_unique_tamanu_attachments_id.58d67f1227", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_attachments_id"], "alias": "source_unique_tamanu_attachments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9686193, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/attachments.yml/source_unique_tamanu_attachments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"attachments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_attachments_id.89138b8f9e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_attachments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_attachments_id.sql", "original_file_path": "../../database/model/public/attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_attachments_id.89138b8f9e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_attachments_id"], "alias": "source_not_null_tamanu_attachments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9703188, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/attachments.yml/source_not_null_tamanu_attachments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"attachments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_attachments_type.3fa788a0f1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_attachments_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_attachments_type.sql", "original_file_path": "../../database/model/public/attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_attachments_type.3fa788a0f1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_attachments_type"], "alias": "source_not_null_tamanu_attachments_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9720364, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/attachments.yml/source_not_null_tamanu_attachments_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"attachments\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_attachments_data.d8f00c841e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_attachments_data", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_attachments_data.sql", "original_file_path": "../../database/model/public/attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_attachments_data.d8f00c841e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_attachments_data"], "alias": "source_not_null_tamanu_attachments_data", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.973742, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/attachments.yml/source_not_null_tamanu_attachments_data.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect data\nfrom \"central\".\"public\".\"attachments\"\nwhere data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "data", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "data", "model": "{{ get_where_subquery(source('tamanu', 'attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_attachments_updated_at_sync_tick.964e5f600d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_attachments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_attachments_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_attachments_updated_at_sync_tick.964e5f600d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_attachments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_attachments_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.975451, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/attachments.yml/source_not_null_tamanu_attachments_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"attachments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_translated_strings_string_id.7e37c8c4ad": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_translated_strings_string_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_translated_strings_string_id.sql", "original_file_path": "../../database/model/public/translated_strings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_translated_strings_string_id.7e37c8c4ad", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_translated_strings_string_id"], "alias": "source_not_null_tamanu_translated_strings_string_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9778032, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "translated_strings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.translated_strings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/translated_strings.yml/source_not_null_tamanu_translated_strings_string_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect string_id\nfrom \"central\".\"public\".\"translated_strings\"\nwhere string_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "string_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "string_id", "model": "{{ get_where_subquery(source('tamanu', 'translated_strings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_translated_strings_language.5db2b5e2e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_translated_strings_language", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_translated_strings_language.sql", "original_file_path": "../../database/model/public/translated_strings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_translated_strings_language.5db2b5e2e8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_translated_strings_language"], "alias": "source_not_null_tamanu_translated_strings_language", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9795215, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "translated_strings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.translated_strings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/translated_strings.yml/source_not_null_tamanu_translated_strings_language.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect language\nfrom \"central\".\"public\".\"translated_strings\"\nwhere language is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "language", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "language", "model": "{{ get_where_subquery(source('tamanu', 'translated_strings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_translated_strings_created_at.07e267913e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_translated_strings_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_translated_strings_created_at.sql", "original_file_path": "../../database/model/public/translated_strings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_translated_strings_created_at.07e267913e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_translated_strings_created_at"], "alias": "source_not_null_tamanu_translated_strings_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.981269, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "translated_strings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.translated_strings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/translated_strings.yml/source_not_null_tamanu_translated_strings_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"translated_strings\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'translated_strings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_translated_strings_updated_at.d1e4d3b582": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_translated_strings_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_translated_strings_updated_at.sql", "original_file_path": "../../database/model/public/translated_strings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_translated_strings_updated_at.d1e4d3b582", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_translated_strings_updated_at"], "alias": "source_not_null_tamanu_translated_strings_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.982985, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "translated_strings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.translated_strings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/translated_strings.yml/source_not_null_tamanu_translated_strings_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"translated_strings\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'translated_strings')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_translated_strings_updated_at_sync_tick.25a430f1e2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_translated_strings_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_translated_strings_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/translated_strings.yml", "unique_id": "test.tamanu.source_not_null_tamanu_translated_strings_updated_at_sync_tick.25a430f1e2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_translated_strings_updated_at_sync_tick"], "alias": "source_not_null_tamanu_translated_strings_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9847023, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "translated_strings"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.translated_strings"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/translated_strings.yml/source_not_null_tamanu_translated_strings_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"translated_strings\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'translated_strings')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_survey_responses_id.7d37627ac3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_survey_responses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_survey_responses_id.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_unique_tamanu_survey_responses_id.7d37627ac3", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_survey_responses_id"], "alias": "source_unique_tamanu_survey_responses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.987036, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_unique_tamanu_survey_responses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"survey_responses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_responses_id.89723bde14": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_responses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_responses_id.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_responses_id.89723bde14", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_responses_id"], "alias": "source_not_null_tamanu_survey_responses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9887629, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_not_null_tamanu_survey_responses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"survey_responses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_responses_created_at.49ae85efe6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_responses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_responses_created_at.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_responses_created_at.49ae85efe6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_responses_created_at"], "alias": "source_not_null_tamanu_survey_responses_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9905002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_not_null_tamanu_survey_responses_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"survey_responses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_responses_updated_at.1ac4070914": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_responses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_responses_updated_at.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_responses_updated_at.1ac4070914", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_responses_updated_at"], "alias": "source_not_null_tamanu_survey_responses_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621422.9922328, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_not_null_tamanu_survey_responses_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"survey_responses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_.f0ce4a9c90": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_su_895e4158164f4758d12db6b338c6c90e.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_.f0ce4a9c90", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_"], "alias": "source_relationships_tamanu_su_895e4158164f4758d12db6b338c6c90e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_su_895e4158164f4758d12db6b338c6c90e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_su_895e4158164f4758d12db6b338c6c90e"}, "created_at": 1775621422.994167, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_su_895e4158164f4758d12db6b338c6c90e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "surveys"], ["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.surveys", "source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_relationships_tamanu_su_895e4158164f4758d12db6b338c6c90e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select survey_id as from_field\n    from \"central\".\"public\".\"survey_responses\"\n    where survey_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"surveys\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "survey_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "survey_id", "to": "source('tamanu', 'surveys')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_.5fa54101ad": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_su_c5a4c7d9712d12478b7352a879b17f34.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_.5fa54101ad", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_su_c5a4c7d9712d12478b7352a879b17f34", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_su_c5a4c7d9712d12478b7352a879b17f34", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_su_c5a4c7d9712d12478b7352a879b17f34"}, "created_at": 1775621422.999533, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_su_c5a4c7d9712d12478b7352a879b17f34\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_relationships_tamanu_su_c5a4c7d9712d12478b7352a879b17f34.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"survey_responses\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_.2aef705f04": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_su_d3e5b91e2f0c24d0433feacb80a4ea74.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_.2aef705f04", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_su_d3e5b91e2f0c24d0433feacb80a4ea74", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_su_d3e5b91e2f0c24d0433feacb80a4ea74", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_su_d3e5b91e2f0c24d0433feacb80a4ea74"}, "created_at": 1775621423.0047495, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_su_d3e5b91e2f0c24d0433feacb80a4ea74\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_relationships_tamanu_su_d3e5b91e2f0c24d0433feacb80a4ea74.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select user_id as from_field\n    from \"central\".\"public\".\"survey_responses\"\n    where user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_responses_updated_at_sync_tick.d413782924": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_responses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_responses_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_responses_updated_at_sync_tick.d413782924", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_responses_updated_at_sync_tick"], "alias": "source_not_null_tamanu_survey_responses_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0098743, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_responses.yml/source_not_null_tamanu_survey_responses_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"survey_responses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'survey_responses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_devices_id.0507752158": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_devices_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_devices_id.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_unique_tamanu_devices_id.0507752158", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_devices_id"], "alias": "source_unique_tamanu_devices_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0122268, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_unique_tamanu_devices_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"devices\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_devices_id.5c11d14906": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_devices_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_devices_id.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_devices_id.5c11d14906", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_devices_id"], "alias": "source_not_null_tamanu_devices_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0139847, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_not_null_tamanu_devices_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"devices\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_devices_created_at.f353e449ee": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_devices_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_devices_created_at.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_devices_created_at.f353e449ee", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_devices_created_at"], "alias": "source_not_null_tamanu_devices_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0159316, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_not_null_tamanu_devices_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"devices\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_devices_updated_at.9667683ae2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_devices_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_devices_updated_at.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_devices_updated_at.9667683ae2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_devices_updated_at"], "alias": "source_not_null_tamanu_devices_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.01777, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_not_null_tamanu_devices_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"devices\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_devices_last_seen_at.940293bbb4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_devices_last_seen_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_devices_last_seen_at.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_devices_last_seen_at.940293bbb4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_devices_last_seen_at"], "alias": "source_not_null_tamanu_devices_last_seen_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0195024, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_not_null_tamanu_devices_last_seen_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_seen_at\nfrom \"central\".\"public\".\"devices\"\nwhere last_seen_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_seen_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_seen_at", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_devices_registered_by_id.99c3580040": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_devices_registered_by_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_devices_registered_by_id.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_devices_registered_by_id.99c3580040", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_devices_registered_by_id"], "alias": "source_not_null_tamanu_devices_registered_by_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0212002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_not_null_tamanu_devices_registered_by_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect registered_by_id\nfrom \"central\".\"public\".\"devices\"\nwhere registered_by_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "registered_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "registered_by_id", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_.b7e1d90812": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_de_d7a378dc5fe60f1196e84e672a6d8160.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_.b7e1d90812", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_de_d7a378dc5fe60f1196e84e672a6d8160", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_de_d7a378dc5fe60f1196e84e672a6d8160", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_de_d7a378dc5fe60f1196e84e672a6d8160"}, "created_at": 1775621423.022958, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_de_d7a378dc5fe60f1196e84e672a6d8160\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_relationships_tamanu_de_d7a378dc5fe60f1196e84e672a6d8160.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select registered_by_id as from_field\n    from \"central\".\"public\".\"devices\"\n    where registered_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "registered_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"to": "source('tamanu', 'users')", "field": "id", "column_name": "registered_by_id", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_devices_scopes.a34bba28b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_devices_scopes", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_devices_scopes.sql", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_devices_scopes.a34bba28b6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_devices_scopes"], "alias": "source_not_null_tamanu_devices_scopes", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.028152, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/devices.yml/source_not_null_tamanu_devices_scopes.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect scopes\nfrom \"central\".\"public\".\"devices\"\nwhere scopes is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "scopes", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "scopes", "model": "{{ get_where_subquery(source('tamanu', 'devices')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_invoice_insurance_plans_id.d4e0a2e211": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_invoice_insurance_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_invoice_insurance_plans_id.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_invoice_insurance_plans_id.d4e0a2e211", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_invoice_insurance_plans_id"], "alias": "source_unique_tamanu_patient_invoice_insurance_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0304425, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_unique_tamanu_patient_invoice_insurance_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_id.67fd40be6c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_invoice_insurance_plans_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_invoice_insurance_plans_id.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_id.67fd40be6c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_invoice_insurance_plans_id"], "alias": "source_not_null_tamanu_patient_invoice_insurance_plans_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.032202, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_not_null_tamanu_patient_invoice_insurance_plans_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_created_at.558236cf0c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_invoice_insurance_plans_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_c621d39834127885a3d682112e870216.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_created_at.558236cf0c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_invoice_insurance_plans_created_at"], "alias": "source_not_null_tamanu_patient_c621d39834127885a3d682112e870216", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_c621d39834127885a3d682112e870216", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_c621d39834127885a3d682112e870216"}, "created_at": 1775621423.0339265, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_c621d39834127885a3d682112e870216\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_not_null_tamanu_patient_c621d39834127885a3d682112e870216.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at.46249b6ee1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_invoice_insurance_plans_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_e1584ff14012da6d131ce03835abfdd6.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at.46249b6ee1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_invoice_insurance_plans_updated_at"], "alias": "source_not_null_tamanu_patient_e1584ff14012da6d131ce03835abfdd6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_e1584ff14012da6d131ce03835abfdd6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_e1584ff14012da6d131ce03835abfdd6"}, "created_at": 1775621423.0362718, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_e1584ff14012da6d131ce03835abfdd6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_not_null_tamanu_patient_e1584ff14012da6d131ce03835abfdd6.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_patient_id.88ff695295": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_invoice_insurance_plans_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_20a0e331101747851e9cd32cda1cc7c4.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_patient_id.88ff695295", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_invoice_insurance_plans_patient_id"], "alias": "source_not_null_tamanu_patient_20a0e331101747851e9cd32cda1cc7c4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_20a0e331101747851e9cd32cda1cc7c4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_20a0e331101747851e9cd32cda1cc7c4"}, "created_at": 1775621423.0379887, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_20a0e331101747851e9cd32cda1cc7c4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_not_null_tamanu_patient_20a0e331101747851e9cd32cda1cc7c4.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id.2ce603fd96": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_39a4388f3a6e82c85cc49888d52f51b9.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id.2ce603fd96", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id"], "alias": "source_not_null_tamanu_patient_39a4388f3a6e82c85cc49888d52f51b9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_39a4388f3a6e82c85cc49888d52f51b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_39a4388f3a6e82c85cc49888d52f51b9"}, "created_at": 1775621423.0397265, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_39a4388f3a6e82c85cc49888d52f51b9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_not_null_tamanu_patient_39a4388f3a6e82c85cc49888d52f51b9.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect invoice_insurance_plan_id\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere invoice_insurance_plan_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "invoice_insurance_plan_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "invoice_insurance_plan_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick.0c00fa1166": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_7ae5d72167e4b7c0eff8fe134938c272.sql", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick.0c00fa1166", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_7ae5d72167e4b7c0eff8fe134938c272", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_7ae5d72167e4b7c0eff8fe134938c272", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_7ae5d72167e4b7c0eff8fe134938c272"}, "created_at": 1775621423.0414162, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_7ae5d72167e4b7c0eff8fe134938c272\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_invoice_insurance_plans"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_invoice_insurance_plans"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_invoice_insurance_plans.yml/source_not_null_tamanu_patient_7ae5d72167e4b7c0eff8fe134938c272.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_invoice_insurance_plans\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_invoice_insurance_plans')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_death_data_id.2155f2b6c6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_death_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_death_data_id.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_death_data_id.2155f2b6c6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_death_data_id"], "alias": "source_unique_tamanu_patient_death_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0437672, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_unique_tamanu_patient_death_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_death_data\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_death_data_id.61b8d549ff": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_death_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_death_data_id.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_death_data_id.61b8d549ff", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_death_data_id"], "alias": "source_not_null_tamanu_patient_death_data_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0455198, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_not_null_tamanu_patient_death_data_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_death_data\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_death_data_patient_id.fa93535dcf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_death_data_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_death_data_patient_id.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_death_data_patient_id.fa93535dcf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_death_data_patient_id"], "alias": "source_not_null_tamanu_patient_death_data_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0472283, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_not_null_tamanu_patient_death_data_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_death_data\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_.2640b3d741": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_c96c1aca5f3fed71b1aa2fcef745159c.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_.2640b3d741", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_c96c1aca5f3fed71b1aa2fcef745159c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_c96c1aca5f3fed71b1aa2fcef745159c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_c96c1aca5f3fed71b1aa2fcef745159c"}, "created_at": 1775621423.048959, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_c96c1aca5f3fed71b1aa2fcef745159c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_relationships_tamanu_pa_c96c1aca5f3fed71b1aa2fcef745159c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_death_data\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_death_data_clinician_id.419275886d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_death_data_clinician_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_death_data_clinician_id.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_death_data_clinician_id.419275886d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_death_data_clinician_id"], "alias": "source_not_null_tamanu_patient_death_data_clinician_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.054231, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_not_null_tamanu_patient_death_data_clinician_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect clinician_id\nfrom \"central\".\"public\".\"patient_death_data\"\nwhere clinician_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "clinician_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_.12e92239d7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_905c78bf8f7f3284333db634b4b88a79.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_.12e92239d7", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pa_905c78bf8f7f3284333db634b4b88a79", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_905c78bf8f7f3284333db634b4b88a79", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_905c78bf8f7f3284333db634b4b88a79"}, "created_at": 1775621423.0560074, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_905c78bf8f7f3284333db634b4b88a79\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_relationships_tamanu_pa_905c78bf8f7f3284333db634b4b88a79.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select clinician_id as from_field\n    from \"central\".\"public\".\"patient_death_data\"\n    where clinician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "clinician_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_.d81577e3c0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_4dacd179c28058072b48eb5f5ae4622f.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_.d81577e3c0", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_pa_4dacd179c28058072b48eb5f5ae4622f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_4dacd179c28058072b48eb5f5ae4622f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_4dacd179c28058072b48eb5f5ae4622f"}, "created_at": 1775621423.0611343, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_4dacd179c28058072b48eb5f5ae4622f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_relationships_tamanu_pa_4dacd179c28058072b48eb5f5ae4622f.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"patient_death_data\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_.f3a9b1a797": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_0e46a17abe0ad1338384c03ce59faf5d.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_.f3a9b1a797", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_0e46a17abe0ad1338384c03ce59faf5d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_0e46a17abe0ad1338384c03ce59faf5d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_0e46a17abe0ad1338384c03ce59faf5d"}, "created_at": 1775621423.066105, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_0e46a17abe0ad1338384c03ce59faf5d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/dbt_utils_source_relationships_0e46a17abe0ad1338384c03ce59faf5d.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    last_surgery_reason_id as id\n\n  from \"central\".\"public\".\"patient_death_data\"\n\n  where last_surgery_reason_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_surgery_reason_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "last_surgery_reason_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_.27473a57dc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_fa3b8f64d15a4340fddf0e3879f1a40c.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_.27473a57dc", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_fa3b8f64d15a4340fddf0e3879f1a40c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_fa3b8f64d15a4340fddf0e3879f1a40c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_fa3b8f64d15a4340fddf0e3879f1a40c"}, "created_at": 1775621423.0712757, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_fa3b8f64d15a4340fddf0e3879f1a40c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/dbt_utils_source_relationships_fa3b8f64d15a4340fddf0e3879f1a40c.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    primary_cause_condition_id as id\n\n  from \"central\".\"public\".\"patient_death_data\"\n\n  where primary_cause_condition_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "primary_cause_condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "primary_cause_condition_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_.7ace974f49": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_f5fd564cabe36c9cd3fbbfaf0f1c88aa.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_.7ace974f49", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_f5fd564cabe36c9cd3fbbfaf0f1c88aa", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_f5fd564cabe36c9cd3fbbfaf0f1c88aa", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_f5fd564cabe36c9cd3fbbfaf0f1c88aa"}, "created_at": 1775621423.076493, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_f5fd564cabe36c9cd3fbbfaf0f1c88aa\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/dbt_utils_source_relationships_f5fd564cabe36c9cd3fbbfaf0f1c88aa.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    antecedent_cause1_condition_id as id\n\n  from \"central\".\"public\".\"patient_death_data\"\n\n  where antecedent_cause1_condition_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "antecedent_cause1_condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "antecedent_cause1_condition_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_.1dea4f8138": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_e9968183cba4f4b7a404a9cba4788ea6.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_.1dea4f8138", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_e9968183cba4f4b7a404a9cba4788ea6", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_e9968183cba4f4b7a404a9cba4788ea6", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_e9968183cba4f4b7a404a9cba4788ea6"}, "created_at": 1775621423.0815032, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_e9968183cba4f4b7a404a9cba4788ea6\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/dbt_utils_source_relationships_e9968183cba4f4b7a404a9cba4788ea6.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    antecedent_cause2_condition_id as id\n\n  from \"central\".\"public\".\"patient_death_data\"\n\n  where antecedent_cause2_condition_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "antecedent_cause2_condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "antecedent_cause2_condition_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_patient_death_data_updated_at_sync_tick.74f83a5b18": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_death_data_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_death_data_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_death_data_updated_at_sync_tick.74f83a5b18", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_death_data_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_death_data_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0866792, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_not_null_tamanu_patient_death_data_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_death_data\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_death_data_is_final.f258620126": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_death_data_is_final", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_death_data_is_final.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_death_data_is_final.f258620126", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_death_data_is_final"], "alias": "source_not_null_tamanu_patient_death_data_is_final", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0884085, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/source_not_null_tamanu_patient_death_data_is_final.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_final\nfrom \"central\".\"public\".\"patient_death_data\"\nwhere is_final is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_final", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_final", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_.c7596dc8de": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_b4b9d8d1ebf44b05c32b479f86d99338.sql", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_.c7596dc8de", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_b4b9d8d1ebf44b05c32b479f86d99338", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_b4b9d8d1ebf44b05c32b479f86d99338", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_b4b9d8d1ebf44b05c32b479f86d99338"}, "created_at": 1775621423.0901911, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_b4b9d8d1ebf44b05c32b479f86d99338\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_death_data"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_death_data"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_death_data.yml/dbt_utils_source_relationships_b4b9d8d1ebf44b05c32b479f86d99338.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    antecedent_cause3_condition_id as id\n\n  from \"central\".\"public\".\"patient_death_data\"\n\n  where antecedent_cause3_condition_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "antecedent_cause3_condition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "antecedent_cause3_condition_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'patient_death_data')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_unique_tamanu_procedure_assistant_clinicians_id.c47366f5e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_procedure_assistant_clinicians_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_procedure_assistant_clinicians_id.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_unique_tamanu_procedure_assistant_clinicians_id.c47366f5e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_procedure_assistant_clinicians_id"], "alias": "source_unique_tamanu_procedure_assistant_clinicians_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0961957, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_unique_tamanu_procedure_assistant_clinicians_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_id.5e29573c0c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_assistant_clinicians_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_assistant_clinicians_id.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_id.5e29573c0c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_assistant_clinicians_id"], "alias": "source_not_null_tamanu_procedure_assistant_clinicians_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.0979793, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_not_null_tamanu_procedure_assistant_clinicians_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_procedure_id.d372d78257": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_assistant_clinicians_procedure_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_e2064b298ed13be6e056a8e59995e186.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_procedure_id.d372d78257", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_assistant_clinicians_procedure_id"], "alias": "source_not_null_tamanu_procedu_e2064b298ed13be6e056a8e59995e186", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_e2064b298ed13be6e056a8e59995e186", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_e2064b298ed13be6e056a8e59995e186"}, "created_at": 1775621423.0997267, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_e2064b298ed13be6e056a8e59995e186\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_not_null_tamanu_procedu_e2064b298ed13be6e056a8e59995e186.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect procedure_id\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere procedure_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "procedure_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "procedure_id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_user_id.1c73aa9d80": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_assistant_clinicians_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_assistant_clinicians_user_id.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_user_id.1c73aa9d80", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_assistant_clinicians_user_id"], "alias": "source_not_null_tamanu_procedure_assistant_clinicians_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1014152, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_not_null_tamanu_procedure_assistant_clinicians_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_created_at.6b6e8d8caf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_assistant_clinicians_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_905b8ae19c0a560f3af293ecff7eb9fe.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_created_at.6b6e8d8caf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_assistant_clinicians_created_at"], "alias": "source_not_null_tamanu_procedu_905b8ae19c0a560f3af293ecff7eb9fe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_905b8ae19c0a560f3af293ecff7eb9fe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_905b8ae19c0a560f3af293ecff7eb9fe"}, "created_at": 1775621423.1031399, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_905b8ae19c0a560f3af293ecff7eb9fe\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_not_null_tamanu_procedu_905b8ae19c0a560f3af293ecff7eb9fe.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at.29771b97a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_assistant_clinicians_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_93084fa47a1a0b145ba568e84bd0244b.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at.29771b97a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_assistant_clinicians_updated_at"], "alias": "source_not_null_tamanu_procedu_93084fa47a1a0b145ba568e84bd0244b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_93084fa47a1a0b145ba568e84bd0244b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_93084fa47a1a0b145ba568e84bd0244b"}, "created_at": 1775621423.1049628, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_93084fa47a1a0b145ba568e84bd0244b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_not_null_tamanu_procedu_93084fa47a1a0b145ba568e84bd0244b.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick.874770378e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_78dc2ab8983cace3db5895264bd83e41.sql", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick.874770378e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick"], "alias": "source_not_null_tamanu_procedu_78dc2ab8983cace3db5895264bd83e41", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_78dc2ab8983cace3db5895264bd83e41", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_78dc2ab8983cace3db5895264bd83e41"}, "created_at": 1775621423.1066868, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_78dc2ab8983cace3db5895264bd83e41\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_assistant_clinicians"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_assistant_clinicians"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_assistant_clinicians.yml/source_not_null_tamanu_procedu_78dc2ab8983cace3db5895264bd83e41.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"procedure_assistant_clinicians\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'procedure_assistant_clinicians')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_facilities_id.30936aeb5a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_facilities_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_facilities_id.sql", "original_file_path": "../../database/model/public/user_facilities.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_facilities_id.30936aeb5a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_facilities_id"], "alias": "source_unique_tamanu_user_facilities_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1089568, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_facilities.yml/source_unique_tamanu_user_facilities_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_facilities\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_facilities_id.b28d1c6ab3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_facilities_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_facilities_id.sql", "original_file_path": "../../database/model/public/user_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_facilities_id.b28d1c6ab3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_facilities_id"], "alias": "source_not_null_tamanu_user_facilities_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1107035, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_facilities.yml/source_not_null_tamanu_user_facilities_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_facilities\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_facilities_updated_at_sync_tick.14851edb16": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_facilities_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_facilities_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/user_facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_facilities_updated_at_sync_tick.14851edb16", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_facilities_updated_at_sync_tick"], "alias": "source_not_null_tamanu_user_facilities_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.112393, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_facilities.yml/source_not_null_tamanu_user_facilities_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"user_facilities\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'user_facilities')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_document_metadata_id.25fbd602e6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_document_metadata_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_document_metadata_id.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_unique_tamanu_document_metadata_id.25fbd602e6", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_document_metadata_id"], "alias": "source_unique_tamanu_document_metadata_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.114806, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_unique_tamanu_document_metadata_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"document_metadata\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_id.df7500e31c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_id.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_id.df7500e31c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_id"], "alias": "source_not_null_tamanu_document_metadata_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.116522, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"document_metadata\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_name.1e7e44b11e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_name.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_name.1e7e44b11e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_name"], "alias": "source_not_null_tamanu_document_metadata_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1182556, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"document_metadata\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_type.ad3c33203c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_type.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_type.ad3c33203c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_type"], "alias": "source_not_null_tamanu_document_metadata_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1199927, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"document_metadata\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_document_uploaded_at.3e699cede3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_document_uploaded_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_document_uploaded_at.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_document_uploaded_at.3e699cede3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_document_uploaded_at"], "alias": "source_not_null_tamanu_document_metadata_document_uploaded_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1217136, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_document_uploaded_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect document_uploaded_at\nfrom \"central\".\"public\".\"document_metadata\"\nwhere document_uploaded_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "document_uploaded_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "document_uploaded_at", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_.697577ed3b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_do_20161140ec18a6a23a065465ad6ee8c9.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_.697577ed3b", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_do_20161140ec18a6a23a065465ad6ee8c9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_do_20161140ec18a6a23a065465ad6ee8c9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_do_20161140ec18a6a23a065465ad6ee8c9"}, "created_at": 1775621423.1235569, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_do_20161140ec18a6a23a065465ad6ee8c9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_relationships_tamanu_do_20161140ec18a6a23a065465ad6ee8c9.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"document_metadata\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_.58f844c909": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_do_02f551d80abecf58d973c9334597801a.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_.58f844c909", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_do_02f551d80abecf58d973c9334597801a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_do_02f551d80abecf58d973c9334597801a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_do_02f551d80abecf58d973c9334597801a"}, "created_at": 1775621423.1289248, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_do_02f551d80abecf58d973c9334597801a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_relationships_tamanu_do_02f551d80abecf58d973c9334597801a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"document_metadata\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_attachment_id.73279e3459": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_attachment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_attachment_id.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_attachment_id.73279e3459", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_attachment_id"], "alias": "source_not_null_tamanu_document_metadata_attachment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1347585, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_attachment_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect attachment_id\nfrom \"central\".\"public\".\"document_metadata\"\nwhere attachment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "attachment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attachment_id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_.422a5cdedd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_do_8cd52ffeba14e9e2f53e95596317806d.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_.422a5cdedd", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_"], "alias": "source_relationships_tamanu_do_8cd52ffeba14e9e2f53e95596317806d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_do_8cd52ffeba14e9e2f53e95596317806d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_do_8cd52ffeba14e9e2f53e95596317806d"}, "created_at": 1775621423.136518, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_do_8cd52ffeba14e9e2f53e95596317806d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"], ["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments", "source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_relationships_tamanu_do_8cd52ffeba14e9e2f53e95596317806d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select attachment_id as from_field\n    from \"central\".\"public\".\"document_metadata\"\n    where attachment_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"attachments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "attachment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "attachment_id", "to": "source('tamanu', 'attachments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_.5942352785": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_do_005f8a825dc7f67945bf1b91663cb4d4.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_.5942352785", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_"], "alias": "source_relationships_tamanu_do_005f8a825dc7f67945bf1b91663cb4d4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_do_005f8a825dc7f67945bf1b91663cb4d4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_do_005f8a825dc7f67945bf1b91663cb4d4"}, "created_at": 1775621423.1415894, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_do_005f8a825dc7f67945bf1b91663cb4d4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"], ["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_relationships_tamanu_do_005f8a825dc7f67945bf1b91663cb4d4.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select department_id as from_field\n    from \"central\".\"public\".\"document_metadata\"\n    where department_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"departments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "department_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "department_id", "to": "source('tamanu', 'departments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_updated_at_sync_tick.818184c71a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_updated_at_sync_tick.818184c71a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_updated_at_sync_tick"], "alias": "source_not_null_tamanu_document_metadata_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1467383, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"document_metadata\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_document_metadata_source.c7dde3dea4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_document_metadata_source", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_document_metadata_source.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_not_null_tamanu_document_metadata_source.c7dde3dea4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_document_metadata_source"], "alias": "source_not_null_tamanu_document_metadata_source", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1484816, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_not_null_tamanu_document_metadata_source.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect source\nfrom \"central\".\"public\".\"document_metadata\"\nwhere source is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "source", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "source", "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded.d562bb3947": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__4a25f4b11ec2def8ec64a93b547d0383.sql", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded.d562bb3947", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded"], "alias": "source_accepted_values_tamanu__4a25f4b11ec2def8ec64a93b547d0383", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__4a25f4b11ec2def8ec64a93b547d0383", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__4a25f4b11ec2def8ec64a93b547d0383"}, "created_at": 1775621423.1502032, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__4a25f4b11ec2def8ec64a93b547d0383\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "document_metadata"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.document_metadata"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/document_metadata.yml/source_accepted_values_tamanu__4a25f4b11ec2def8ec64a93b547d0383.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        source as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"document_metadata\"\n    group by source\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'patient_letter','uploaded'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "source", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "source", "values": ["patient_letter", "uploaded"], "model": "{{ get_where_subquery(source('tamanu', 'document_metadata')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_procedure_type_surveys_id.4813977d15": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_procedure_type_surveys_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_procedure_type_surveys_id.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_unique_tamanu_procedure_type_surveys_id.4813977d15", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_procedure_type_surveys_id"], "alias": "source_unique_tamanu_procedure_type_surveys_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1559272, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_unique_tamanu_procedure_type_surveys_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_type_surveys_id.846fa7b74b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_type_surveys_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_type_surveys_id.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_type_surveys_id.846fa7b74b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_type_surveys_id"], "alias": "source_not_null_tamanu_procedure_type_surveys_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1577213, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_not_null_tamanu_procedure_type_surveys_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_type_surveys_procedure_type_id.05c245e1bc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_type_surveys_procedure_type_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_type_surveys_procedure_type_id.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_type_surveys_procedure_type_id.05c245e1bc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_type_surveys_procedure_type_id"], "alias": "source_not_null_tamanu_procedure_type_surveys_procedure_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1594439, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_not_null_tamanu_procedure_type_surveys_procedure_type_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect procedure_type_id\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere procedure_type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "procedure_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "procedure_type_id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_type_surveys_survey_id.8490b1ab3d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_type_surveys_survey_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_type_surveys_survey_id.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_type_surveys_survey_id.8490b1ab3d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_type_surveys_survey_id"], "alias": "source_not_null_tamanu_procedure_type_surveys_survey_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.161167, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_not_null_tamanu_procedure_type_surveys_survey_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect survey_id\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere survey_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "survey_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "survey_id", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_type_surveys_created_at.f34e2e523c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_type_surveys_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_type_surveys_created_at.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_type_surveys_created_at.f34e2e523c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_type_surveys_created_at"], "alias": "source_not_null_tamanu_procedure_type_surveys_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1630561, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_not_null_tamanu_procedure_type_surveys_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at.b5a09d255c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_type_surveys_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedure_type_surveys_updated_at.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at.b5a09d255c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_type_surveys_updated_at"], "alias": "source_not_null_tamanu_procedure_type_surveys_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1647651, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_not_null_tamanu_procedure_type_surveys_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick.d37ec82a41": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_procedu_977927964e2861f5a7c410668aa7a21e.sql", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick.d37ec82a41", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick"], "alias": "source_not_null_tamanu_procedu_977927964e2861f5a7c410668aa7a21e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_procedu_977927964e2861f5a7c410668aa7a21e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_procedu_977927964e2861f5a7c410668aa7a21e"}, "created_at": 1775621423.1664786, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_procedu_977927964e2861f5a7c410668aa7a21e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "procedure_type_surveys"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.procedure_type_surveys"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/procedure_type_surveys.yml/source_not_null_tamanu_procedu_977927964e2861f5a7c410668aa7a21e.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"procedure_type_surveys\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'procedure_type_surveys')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_administered_vaccines_id.1b16daae05": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_administered_vaccines_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_administered_vaccines_id.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_unique_tamanu_administered_vaccines_id.1b16daae05", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_administered_vaccines_id"], "alias": "source_unique_tamanu_administered_vaccines_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.16874, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_unique_tamanu_administered_vaccines_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"administered_vaccines\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_administered_vaccines_id.71c049c95c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_administered_vaccines_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_administered_vaccines_id.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_administered_vaccines_id.71c049c95c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_administered_vaccines_id"], "alias": "source_not_null_tamanu_administered_vaccines_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1706002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_not_null_tamanu_administered_vaccines_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"administered_vaccines\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_administered_vaccines_created_at.311e25104e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_administered_vaccines_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_administered_vaccines_created_at.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_administered_vaccines_created_at.311e25104e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_administered_vaccines_created_at"], "alias": "source_not_null_tamanu_administered_vaccines_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1723127, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_not_null_tamanu_administered_vaccines_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"administered_vaccines\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at.81a714c41e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_administered_vaccines_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_administered_vaccines_updated_at.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at.81a714c41e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_administered_vaccines_updated_at"], "alias": "source_not_null_tamanu_administered_vaccines_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.1740077, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_not_null_tamanu_administered_vaccines_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"administered_vaccines\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_administered_vaccines_status.3bf7e20f14": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_administered_vaccines_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_administered_vaccines_status.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_administered_vaccines_status.3bf7e20f14", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_administered_vaccines_status"], "alias": "source_not_null_tamanu_administered_vaccines_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.175689, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_not_null_tamanu_administered_vaccines_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"administered_vaccines\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING.8b8a9d77fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__eca002619343f7b579dceee6a0b93178.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING.8b8a9d77fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING"], "alias": "source_accepted_values_tamanu__eca002619343f7b579dceee6a0b93178", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__eca002619343f7b579dceee6a0b93178", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__eca002619343f7b579dceee6a0b93178"}, "created_at": 1775621423.1774395, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__eca002619343f7b579dceee6a0b93178\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_accepted_values_tamanu__eca002619343f7b579dceee6a0b93178.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"administered_vaccines\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'DUE','GIVEN','HISTORICAL','MISSED','NOT_GIVEN','OVERDUE','RECORDED_IN_ERROR','SCHEDULED','UNKNOWN','UPCOMING'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["DUE", "GIVEN", "HISTORICAL", "MISSED", "NOT_GIVEN", "OVERDUE", "RECORDED_IN_ERROR", "SCHEDULED", "UNKNOWN", "UPCOMING"], "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.7bc6d9cb6e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ad_0b6a3e9e4e95a5c1ab4b913751db69bd.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.7bc6d9cb6e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_"], "alias": "source_relationships_tamanu_ad_0b6a3e9e4e95a5c1ab4b913751db69bd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ad_0b6a3e9e4e95a5c1ab4b913751db69bd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ad_0b6a3e9e4e95a5c1ab4b913751db69bd"}, "created_at": 1775621423.1846333, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ad_0b6a3e9e4e95a5c1ab4b913751db69bd\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "scheduled_vaccines"], ["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.scheduled_vaccines", "source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_relationships_tamanu_ad_0b6a3e9e4e95a5c1ab4b913751db69bd.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select scheduled_vaccine_id as from_field\n    from \"central\".\"public\".\"administered_vaccines\"\n    where scheduled_vaccine_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"scheduled_vaccines\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "scheduled_vaccine_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "scheduled_vaccine_id", "to": "source('tamanu', 'scheduled_vaccines')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_.1ab396ce2d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ad_7aaf964bf8da393b1f62c434ad1c28b9.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_.1ab396ce2d", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_ad_7aaf964bf8da393b1f62c434ad1c28b9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ad_7aaf964bf8da393b1f62c434ad1c28b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ad_7aaf964bf8da393b1f62c434ad1c28b9"}, "created_at": 1775621423.1897602, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ad_7aaf964bf8da393b1f62c434ad1c28b9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_relationships_tamanu_ad_7aaf964bf8da393b1f62c434ad1c28b9.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"administered_vaccines\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other.a34597923c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__dc7be7e03f56f41762aac86d8b244c8e.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other.a34597923c", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other"], "alias": "source_accepted_values_tamanu__dc7be7e03f56f41762aac86d8b244c8e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__dc7be7e03f56f41762aac86d8b244c8e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__dc7be7e03f56f41762aac86d8b244c8e"}, "created_at": 1775621423.1948693, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__dc7be7e03f56f41762aac86d8b244c8e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_accepted_values_tamanu__dc7be7e03f56f41762aac86d8b244c8e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        injection_site as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"administered_vaccines\"\n    group by injection_site\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'left_arm','right_arm','left_thigh','right_thigh','oral','other'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "injection_site", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "injection_site", "values": ["left_arm", "right_arm", "left_thigh", "right_thigh", "oral", "other"], "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at_sync_tick.1f4a79d8c1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_administered_vaccines_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_adminis_fa025d03582b8577644e880861ddccb7.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at_sync_tick.1f4a79d8c1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_administered_vaccines_updated_at_sync_tick"], "alias": "source_not_null_tamanu_adminis_fa025d03582b8577644e880861ddccb7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_adminis_fa025d03582b8577644e880861ddccb7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_adminis_fa025d03582b8577644e880861ddccb7"}, "created_at": 1775621423.2008142, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_adminis_fa025d03582b8577644e880861ddccb7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/source_not_null_tamanu_adminis_fa025d03582b8577644e880861ddccb7.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"administered_vaccines\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_.8bc715362f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_6f63962dacc62493b35f6e2fbc7e89ce.sql", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_.8bc715362f", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_"], "alias": "dbt_utils_source_relationships_6f63962dacc62493b35f6e2fbc7e89ce", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_6f63962dacc62493b35f6e2fbc7e89ce", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_6f63962dacc62493b35f6e2fbc7e89ce"}, "created_at": 1775621423.2026181, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_6f63962dacc62493b35f6e2fbc7e89ce\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "administered_vaccines"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.administered_vaccines"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/administered_vaccines.yml/dbt_utils_source_relationships_6f63962dacc62493b35f6e2fbc7e89ce.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    not_given_reason_id as id\n\n  from \"central\".\"public\".\"administered_vaccines\"\n\n  where not_given_reason_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'vaccineNotGivenReason'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "not_given_reason_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "not_given_reason_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'vaccineNotGivenReason'", "model": "{{ get_where_subquery(source('tamanu', 'administered_vaccines')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_unique_tamanu_report_definition_versions_id.fc34f6d49c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_report_definition_versions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_report_definition_versions_id.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_unique_tamanu_report_definition_versions_id.fc34f6d49c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_report_definition_versions_id"], "alias": "source_unique_tamanu_report_definition_versions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2087295, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_unique_tamanu_report_definition_versions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"report_definition_versions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definition_versions_id.aeefc85efc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definition_versions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definition_versions_id.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definition_versions_id.aeefc85efc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definition_versions_id"], "alias": "source_not_null_tamanu_report_definition_versions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2104821, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_not_null_tamanu_report_definition_versions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"report_definition_versions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definition_versions_version_number.a1c7832d22": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definition_versions_version_number", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report__ed416d07e81fc4b4afe6895aef3eca64.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definition_versions_version_number.a1c7832d22", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definition_versions_version_number"], "alias": "source_not_null_tamanu_report__ed416d07e81fc4b4afe6895aef3eca64", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_report__ed416d07e81fc4b4afe6895aef3eca64", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_report__ed416d07e81fc4b4afe6895aef3eca64"}, "created_at": 1775621423.2122307, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_report__ed416d07e81fc4b4afe6895aef3eca64\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_not_null_tamanu_report__ed416d07e81fc4b4afe6895aef3eca64.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect version_number\nfrom \"central\".\"public\".\"report_definition_versions\"\nwhere version_number is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_number", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_number", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definition_versions_status.b2ccf6ba31": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definition_versions_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definition_versions_status.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definition_versions_status.b2ccf6ba31", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definition_versions_status"], "alias": "source_not_null_tamanu_report_definition_versions_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2140627, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_not_null_tamanu_report_definition_versions_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"report_definition_versions\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_report_definition_versions_status__draft__published.7b945f9a74": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_report_definition_versions_status__draft__published", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__ab42f0393d707c008d76d55ee8dae00a.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_report_definition_versions_status__draft__published.7b945f9a74", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_report_definition_versions_status__draft__published"], "alias": "source_accepted_values_tamanu__ab42f0393d707c008d76d55ee8dae00a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__ab42f0393d707c008d76d55ee8dae00a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__ab42f0393d707c008d76d55ee8dae00a"}, "created_at": 1775621423.215824, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__ab42f0393d707c008d76d55ee8dae00a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_accepted_values_tamanu__ab42f0393d707c008d76d55ee8dae00a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"report_definition_versions\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'draft','published'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["draft", "published"], "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_.b208147bc2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_9ce80923810fa2afed323e2d0d069c96.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_.b208147bc2", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_"], "alias": "source_relationships_tamanu_re_9ce80923810fa2afed323e2d0d069c96", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_9ce80923810fa2afed323e2d0d069c96", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_9ce80923810fa2afed323e2d0d069c96"}, "created_at": 1775621423.2203877, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_9ce80923810fa2afed323e2d0d069c96\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definitions"], ["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definitions", "source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_relationships_tamanu_re_9ce80923810fa2afed323e2d0d069c96.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select report_definition_id as from_field\n    from \"central\".\"public\".\"report_definition_versions\"\n    where report_definition_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"report_definitions\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "report_definition_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "report_definition_id", "to": "source('tamanu', 'report_definitions')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definition_versions_user_id.c3351f91fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definition_versions_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report_definition_versions_user_id.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definition_versions_user_id.c3351f91fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definition_versions_user_id"], "alias": "source_not_null_tamanu_report_definition_versions_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2261102, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_not_null_tamanu_report_definition_versions_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"report_definition_versions\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_.53887ef192": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_re_e952ab9d0a604644196bf80eb50efd1f.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_.53887ef192", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_re_e952ab9d0a604644196bf80eb50efd1f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_re_e952ab9d0a604644196bf80eb50efd1f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_re_e952ab9d0a604644196bf80eb50efd1f"}, "created_at": 1775621423.2279062, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_re_e952ab9d0a604644196bf80eb50efd1f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_relationships_tamanu_re_e952ab9d0a604644196bf80eb50efd1f.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select user_id as from_field\n    from \"central\".\"public\".\"report_definition_versions\"\n    where user_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "user_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_report_definition_versions_updated_at_sync_tick.c11a1df762": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_report_definition_versions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_report__7d8650ed4f6189543ec687ec254075a8.sql", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_report_definition_versions_updated_at_sync_tick.c11a1df762", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_report_definition_versions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_report__7d8650ed4f6189543ec687ec254075a8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_report__7d8650ed4f6189543ec687ec254075a8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_report__7d8650ed4f6189543ec687ec254075a8"}, "created_at": 1775621423.2329323, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_report__7d8650ed4f6189543ec687ec254075a8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "report_definition_versions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.report_definition_versions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/report_definition_versions.yml/source_not_null_tamanu_report__7d8650ed4f6189543ec687ec254075a8.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"report_definition_versions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'report_definition_versions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_sync_lookup_id.dc05d15b43": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_sync_lookup_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_sync_lookup_id.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_unique_tamanu_sync_lookup_id.dc05d15b43", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_sync_lookup_id"], "alias": "source_unique_tamanu_sync_lookup_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.235222, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_unique_tamanu_sync_lookup_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_id.e77326bde2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_id.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_id.e77326bde2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_id"], "alias": "source_not_null_tamanu_sync_lookup_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2369773, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_record_id.39e7bce4d2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_record_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_record_id.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_record_id.39e7bce4d2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_record_id"], "alias": "source_not_null_tamanu_sync_lookup_record_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2388694, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_record_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_id\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere record_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_id", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_record_type.f0bc60b21f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_record_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_record_type.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_record_type.f0bc60b21f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_record_type"], "alias": "source_not_null_tamanu_sync_lookup_record_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2405605, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_record_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect record_type\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere record_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "record_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "record_type", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_data.aadfed61f6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_data", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_data.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_data.aadfed61f6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_data"], "alias": "source_not_null_tamanu_sync_lookup_data", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2422776, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_data.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect data\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "data", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "data", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_updated_at_sync_tick.902ae4ae9c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_updated_at_sync_tick.902ae4ae9c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_updated_at_sync_tick"], "alias": "source_not_null_tamanu_sync_lookup_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2439985, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_.07efccc886": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_sy_2336e1407af420ceca3b4d4452200cd8.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_.07efccc886", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_sy_2336e1407af420ceca3b4d4452200cd8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_sy_2336e1407af420ceca3b4d4452200cd8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_sy_2336e1407af420ceca3b4d4452200cd8"}, "created_at": 1775621423.2457638, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_sy_2336e1407af420ceca3b4d4452200cd8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_relationships_tamanu_sy_2336e1407af420ceca3b4d4452200cd8.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"sync_lookup\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_.f3141bec3e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_sy_5d305b97136c018b26a52273906e2c6a.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_.f3141bec3e", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_sy_5d305b97136c018b26a52273906e2c6a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_sy_5d305b97136c018b26a52273906e2c6a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_sy_5d305b97136c018b26a52273906e2c6a"}, "created_at": 1775621423.2509553, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_sy_5d305b97136c018b26a52273906e2c6a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_relationships_tamanu_sy_5d305b97136c018b26a52273906e2c6a.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"sync_lookup\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_.c67a117f63": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_sy_2dbba204e9e53f0eedaddb61c753c0b9.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_.c67a117f63", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_sy_2dbba204e9e53f0eedaddb61c753c0b9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_sy_2dbba204e9e53f0eedaddb61c753c0b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_sy_2dbba204e9e53f0eedaddb61c753c0b9"}, "created_at": 1775621423.2560763, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_sy_2dbba204e9e53f0eedaddb61c753c0b9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_relationships_tamanu_sy_2dbba204e9e53f0eedaddb61c753c0b9.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"sync_lookup\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_is_lab_request.dbe4ce8b63": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_is_lab_request", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_is_lab_request.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_is_lab_request.dbe4ce8b63", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_is_lab_request"], "alias": "source_not_null_tamanu_sync_lookup_is_lab_request", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2609544, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_is_lab_request.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_lab_request\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere is_lab_request is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_lab_request", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_lab_request", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_lookup_is_deleted.356b4fa211": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_lookup_is_deleted", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_lookup_is_deleted.sql", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_lookup_is_deleted.356b4fa211", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_lookup_is_deleted"], "alias": "source_not_null_tamanu_sync_lookup_is_deleted", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2629545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_lookup"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_lookup"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_lookup.yml/source_not_null_tamanu_sync_lookup_is_deleted.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_deleted\nfrom \"central\".\"public\".\"sync_lookup\"\nwhere is_deleted is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_deleted", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_deleted", "model": "{{ get_where_subquery(source('tamanu', 'sync_lookup')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounter_prescriptions_id.6371d45cc1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounter_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounter_prescriptions_id.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounter_prescriptions_id.6371d45cc1", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounter_prescriptions_id"], "alias": "source_unique_tamanu_encounter_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.265307, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_unique_tamanu_encounter_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_id.3be49c8399": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_prescriptions_id.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_id.3be49c8399", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_id"], "alias": "source_not_null_tamanu_encounter_prescriptions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2670457, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encounter_prescriptions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_encounter_id.ea618fdd05": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_prescriptions_encounter_id.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_encounter_id.ea618fdd05", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_encounter_id"], "alias": "source_not_null_tamanu_encounter_prescriptions_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2687404, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encounter_prescriptions_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_prescription_id.485995235b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_prescription_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_prescriptions_prescription_id.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_prescription_id.485995235b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_prescription_id"], "alias": "source_not_null_tamanu_encounter_prescriptions_prescription_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2704504, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encounter_prescriptions_prescription_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect prescription_id\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere prescription_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "prescription_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "prescription_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge.621eb1bc4b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_1ee0fd9065d5d575facf3a3364eee90b.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge.621eb1bc4b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge"], "alias": "source_not_null_tamanu_encount_1ee0fd9065d5d575facf3a3364eee90b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_1ee0fd9065d5d575facf3a3364eee90b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_1ee0fd9065d5d575facf3a3364eee90b"}, "created_at": 1775621423.2723165, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_1ee0fd9065d5d575facf3a3364eee90b\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encount_1ee0fd9065d5d575facf3a3364eee90b.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_selected_for_discharge\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere is_selected_for_discharge is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_selected_for_discharge", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_selected_for_discharge", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_created_at.777fb22523": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_prescriptions_created_at.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_created_at.777fb22523", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_created_at"], "alias": "source_not_null_tamanu_encounter_prescriptions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2740517, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encounter_prescriptions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at.cc684b1350": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_prescriptions_updated_at.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at.cc684b1350", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_updated_at"], "alias": "source_not_null_tamanu_encounter_prescriptions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.275755, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encounter_prescriptions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick.b07eb557ab": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encount_78ba745983e7c4b97420f52e319f9388.sql", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick.b07eb557ab", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encount_78ba745983e7c4b97420f52e319f9388", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_encount_78ba745983e7c4b97420f52e319f9388", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_encount_78ba745983e7c4b97420f52e319f9388"}, "created_at": 1775621423.2774634, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_encount_78ba745983e7c4b97420f52e319f9388\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_prescriptions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_prescriptions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_prescriptions.yml/source_not_null_tamanu_encount_78ba745983e7c4b97420f52e319f9388.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounter_prescriptions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounter_prescriptions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_notifications_id.51d3db417b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_notifications_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_notifications_id.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_unique_tamanu_notifications_id.51d3db417b", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_notifications_id"], "alias": "source_unique_tamanu_notifications_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2798455, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_unique_tamanu_notifications_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"notifications\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_id.04c2f24f06": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_id.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_id.04c2f24f06", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_id"], "alias": "source_not_null_tamanu_notifications_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.281585, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"notifications\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_type.a007c8bb26": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_type.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_type.a007c8bb26", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_type"], "alias": "source_not_null_tamanu_notifications_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2832806, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"notifications\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_status.74f6b456fc": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_status.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_status.74f6b456fc", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_status"], "alias": "source_not_null_tamanu_notifications_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2850487, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"notifications\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_user_id.72a5473ae9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_user_id.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_user_id.72a5473ae9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_user_id"], "alias": "source_not_null_tamanu_notifications_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.286828, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"notifications\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_created_time.5a54e4d785": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_created_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_created_time.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_created_time.5a54e4d785", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_created_time"], "alias": "source_not_null_tamanu_notifications_created_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2886453, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_created_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_time\nfrom \"central\".\"public\".\"notifications\"\nwhere created_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_time", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_metadata.054778f4a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_metadata", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_metadata.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_metadata.054778f4a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_metadata"], "alias": "source_not_null_tamanu_notifications_metadata", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.290345, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_metadata.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect metadata\nfrom \"central\".\"public\".\"notifications\"\nwhere metadata is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "metadata", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "metadata", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_created_at.8d2ded1ce7": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_created_at.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_created_at.8d2ded1ce7", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_created_at"], "alias": "source_not_null_tamanu_notifications_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2920358, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"notifications\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_updated_at.ae82c65f62": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_updated_at.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_updated_at.ae82c65f62", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_updated_at"], "alias": "source_not_null_tamanu_notifications_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2937486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"notifications\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_notifications_updated_at_sync_tick.9098dc98f2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_notifications_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_notifications_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "test.tamanu.source_not_null_tamanu_notifications_updated_at_sync_tick.9098dc98f2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_notifications_updated_at_sync_tick"], "alias": "source_not_null_tamanu_notifications_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2954404, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "notifications"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.notifications"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/notifications.yml/source_not_null_tamanu_notifications_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"notifications\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'notifications')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_reference_medication_templates_id.9c50848c51": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_reference_medication_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_reference_medication_templates_id.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_unique_tamanu_reference_medication_templates_id.9c50848c51", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_reference_medication_templates_id"], "alias": "source_unique_tamanu_reference_medication_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2978578, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_unique_tamanu_reference_medication_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_id.f4e40f0746": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_medication_templates_id.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_id.f4e40f0746", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_id"], "alias": "source_not_null_tamanu_reference_medication_templates_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.2996273, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_reference_medication_templates_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_reference_data_id.655683c6a0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_reference_data_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_4b587921cea1c081c1877ed79180dad8.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_reference_data_id.655683c6a0", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_reference_data_id"], "alias": "source_not_null_tamanu_referen_4b587921cea1c081c1877ed79180dad8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_4b587921cea1c081c1877ed79180dad8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_4b587921cea1c081c1877ed79180dad8"}, "created_at": 1775621423.3013499, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_4b587921cea1c081c1877ed79180dad8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_4b587921cea1c081c1877ed79180dad8.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect reference_data_id\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere reference_data_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reference_data_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "reference_data_id", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_medication_id.050df86e27": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_medication_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_9832446b4446a89d5bfae765b3726e08.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_medication_id.050df86e27", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_medication_id"], "alias": "source_not_null_tamanu_referen_9832446b4446a89d5bfae765b3726e08", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_9832446b4446a89d5bfae765b3726e08", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_9832446b4446a89d5bfae765b3726e08"}, "created_at": 1775621423.3030834, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_9832446b4446a89d5bfae765b3726e08\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_9832446b4446a89d5bfae765b3726e08.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect medication_id\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere medication_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "medication_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "medication_id", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_variable_dose.13556de3df": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_is_variable_dose", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_c91b73a0f7138a3d251efd3548b80c83.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_variable_dose.13556de3df", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_is_variable_dose"], "alias": "source_not_null_tamanu_referen_c91b73a0f7138a3d251efd3548b80c83", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_c91b73a0f7138a3d251efd3548b80c83", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_c91b73a0f7138a3d251efd3548b80c83"}, "created_at": 1775621423.3047862, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_c91b73a0f7138a3d251efd3548b80c83\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_c91b73a0f7138a3d251efd3548b80c83.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_variable_dose\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere is_variable_dose is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_variable_dose", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_variable_dose", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_prn.6fb35e8eed": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_is_prn", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_medication_templates_is_prn.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_prn.6fb35e8eed", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_is_prn"], "alias": "source_not_null_tamanu_reference_medication_templates_is_prn", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3066032, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_reference_medication_templates_is_prn.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_prn\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere is_prn is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_prn", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_prn", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_units.692f7068eb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_units", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_medication_templates_units.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_units.692f7068eb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_units"], "alias": "source_not_null_tamanu_reference_medication_templates_units", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3082952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_reference_medication_templates_units.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect units\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere units is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "units", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "units", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_frequency.af51280e00": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_frequency", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_medication_templates_frequency.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_frequency.af51280e00", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_frequency"], "alias": "source_not_null_tamanu_reference_medication_templates_frequency", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.309989, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_reference_medication_templates_frequency.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect frequency\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere frequency is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "frequency", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "frequency", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_route.a182c49081": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_route", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_medication_templates_route.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_route.a182c49081", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_route"], "alias": "source_not_null_tamanu_reference_medication_templates_route", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3117025, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_reference_medication_templates_route.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect route\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere route is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "route", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "route", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_created_at.f610fc9916": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_7801f11da6d8089c215ad4fde7902f4c.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_created_at.f610fc9916", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_created_at"], "alias": "source_not_null_tamanu_referen_7801f11da6d8089c215ad4fde7902f4c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_7801f11da6d8089c215ad4fde7902f4c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_7801f11da6d8089c215ad4fde7902f4c"}, "created_at": 1775621423.313399, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_7801f11da6d8089c215ad4fde7902f4c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_7801f11da6d8089c215ad4fde7902f4c.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at.b43c9d5e62": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_92867e68db3b698d92819df62a513e26.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at.b43c9d5e62", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_updated_at"], "alias": "source_not_null_tamanu_referen_92867e68db3b698d92819df62a513e26", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_92867e68db3b698d92819df62a513e26", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_92867e68db3b698d92819df62a513e26"}, "created_at": 1775621423.3152156, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_92867e68db3b698d92819df62a513e26\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_92867e68db3b698d92819df62a513e26.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick.cd13e259c4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_2aea13ddb9f31f038797d517752519f8.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick.cd13e259c4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick"], "alias": "source_not_null_tamanu_referen_2aea13ddb9f31f038797d517752519f8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_2aea13ddb9f31f038797d517752519f8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_2aea13ddb9f31f038797d517752519f8"}, "created_at": 1775621423.3169222, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_2aea13ddb9f31f038797d517752519f8\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_2aea13ddb9f31f038797d517752519f8.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_ongoing.a2332da0d1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_medication_templates_is_ongoing", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_607287a71f873b793a8936fce54239fb.sql", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_ongoing.a2332da0d1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_medication_templates_is_ongoing"], "alias": "source_not_null_tamanu_referen_607287a71f873b793a8936fce54239fb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_607287a71f873b793a8936fce54239fb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_607287a71f873b793a8936fce54239fb"}, "created_at": 1775621423.318639, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_607287a71f873b793a8936fce54239fb\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_medication_templates"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_medication_templates"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_medication_templates.yml/source_not_null_tamanu_referen_607287a71f873b793a8936fce54239fb.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_ongoing\nfrom \"central\".\"public\".\"reference_medication_templates\"\nwhere is_ongoing is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_ongoing", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_ongoing", "model": "{{ get_where_subquery(source('tamanu', 'reference_medication_templates')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_conditions_id.1b1daf4d86": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_conditions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_conditions_id.sql", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_conditions_id.1b1daf4d86", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_conditions_id"], "alias": "source_unique_tamanu_patient_conditions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3209426, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_conditions.yml/source_unique_tamanu_patient_conditions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_conditions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_conditions_id.5d2e0fb3a9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_conditions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_conditions_id.sql", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_conditions_id.5d2e0fb3a9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_conditions_id"], "alias": "source_not_null_tamanu_patient_conditions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.322668, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_conditions.yml/source_not_null_tamanu_patient_conditions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_conditions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_conditions_created_at.deda3b580a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_conditions_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_conditions_created_at.sql", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_conditions_created_at.deda3b580a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_conditions_created_at"], "alias": "source_not_null_tamanu_patient_conditions_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3250735, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_conditions.yml/source_not_null_tamanu_patient_conditions_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_conditions\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at.1dc42ed219": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_conditions_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_conditions_updated_at.sql", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at.1dc42ed219", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_conditions_updated_at"], "alias": "source_not_null_tamanu_patient_conditions_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3268142, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_conditions.yml/source_not_null_tamanu_patient_conditions_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_conditions\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_conditions_recorded_date.91d95abca2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_conditions_recorded_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_conditions_recorded_date.sql", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_conditions_recorded_date.91d95abca2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_conditions_recorded_date"], "alias": "source_not_null_tamanu_patient_conditions_recorded_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3286545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_conditions.yml/source_not_null_tamanu_patient_conditions_recorded_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect recorded_date\nfrom \"central\".\"public\".\"patient_conditions\"\nwhere recorded_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recorded_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "recorded_date", "model": "{{ get_where_subquery(source('tamanu', 'patient_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at_sync_tick.2e7535fcbb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_conditions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_conditions_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at_sync_tick.2e7535fcbb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_conditions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_conditions_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.3303916, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_conditions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_conditions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_conditions.yml/source_not_null_tamanu_patient_conditions_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_conditions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_conditions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_survey_response_answers_id.9ab12c2f4a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_survey_response_answers_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_survey_response_answers_id.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_unique_tamanu_survey_response_answers_id.9ab12c2f4a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_survey_response_answers_id"], "alias": "source_unique_tamanu_survey_response_answers_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4373286, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_unique_tamanu_survey_response_answers_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"survey_response_answers\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_response_answers_id.a1a5252fba": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_response_answers_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_response_answers_id.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_response_answers_id.a1a5252fba", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_response_answers_id"], "alias": "source_not_null_tamanu_survey_response_answers_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4393435, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_not_null_tamanu_survey_response_answers_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"survey_response_answers\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_response_answers_created_at.6a14b3247f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_response_answers_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_response_answers_created_at.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_response_answers_created_at.6a14b3247f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_response_answers_created_at"], "alias": "source_not_null_tamanu_survey_response_answers_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4411771, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_not_null_tamanu_survey_response_answers_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"survey_response_answers\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at.e9d87e13d5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_response_answers_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey_response_answers_updated_at.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at.e9d87e13d5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_response_answers_updated_at"], "alias": "source_not_null_tamanu_survey_response_answers_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.442964, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_not_null_tamanu_survey_response_answers_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"survey_response_answers\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_.f49aacfe3d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_su_ebabe73f2f65d4bdcdcf075510b21618.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_.f49aacfe3d", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_"], "alias": "source_relationships_tamanu_su_ebabe73f2f65d4bdcdcf075510b21618", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_su_ebabe73f2f65d4bdcdcf075510b21618", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_su_ebabe73f2f65d4bdcdcf075510b21618"}, "created_at": 1775621423.444941, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_su_ebabe73f2f65d4bdcdcf075510b21618\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_responses"], ["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_responses", "source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_relationships_tamanu_su_ebabe73f2f65d4bdcdcf075510b21618.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select response_id as from_field\n    from \"central\".\"public\".\"survey_response_answers\"\n    where response_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"survey_responses\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "response_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "response_id", "to": "source('tamanu', 'survey_responses')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_.a34b366f2b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_su_175e530dfd6be996063e2705e1a8a898.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_.a34b366f2b", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_"], "alias": "source_relationships_tamanu_su_175e530dfd6be996063e2705e1a8a898", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_su_175e530dfd6be996063e2705e1a8a898", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_su_175e530dfd6be996063e2705e1a8a898"}, "created_at": 1775621423.4503658, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_su_175e530dfd6be996063e2705e1a8a898\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_data_elements"], ["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_data_elements", "source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_relationships_tamanu_su_175e530dfd6be996063e2705e1a8a898.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select data_element_id as from_field\n    from \"central\".\"public\".\"survey_response_answers\"\n    where data_element_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"program_data_elements\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "data_element_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "data_element_id", "to": "source('tamanu', 'program_data_elements')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at_sync_tick.23337bdabf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_survey_response_answers_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_survey__70dfab34cc934909fe4894cbcc99d404.sql", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at_sync_tick.23337bdabf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_survey_response_answers_updated_at_sync_tick"], "alias": "source_not_null_tamanu_survey__70dfab34cc934909fe4894cbcc99d404", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_survey__70dfab34cc934909fe4894cbcc99d404", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_survey__70dfab34cc934909fe4894cbcc99d404"}, "created_at": 1775621423.4556327, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_survey__70dfab34cc934909fe4894cbcc99d404\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_response_answers"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_response_answers"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/survey_response_answers.yml/source_not_null_tamanu_survey__70dfab34cc934909fe4894cbcc99d404.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"survey_response_answers\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'survey_response_answers')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_reference_data_relations_id.0fd94d2b7e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_reference_data_relations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_reference_data_relations_id.sql", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "test.tamanu.source_unique_tamanu_reference_data_relations_id.0fd94d2b7e", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_reference_data_relations_id"], "alias": "source_unique_tamanu_reference_data_relations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4579835, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data_relations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data_relations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data_relations.yml/source_unique_tamanu_reference_data_relations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"reference_data_relations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_data_relations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_relations_id.6816cc32f5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_relations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_relations_id.sql", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_relations_id.6816cc32f5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_relations_id"], "alias": "source_not_null_tamanu_reference_data_relations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.459954, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data_relations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data_relations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data_relations.yml/source_not_null_tamanu_reference_data_relations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"reference_data_relations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'reference_data_relations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_relations_created_at.c605cb5fd3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_relations_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_relations_created_at.sql", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_relations_created_at.c605cb5fd3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_relations_created_at"], "alias": "source_not_null_tamanu_reference_data_relations_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4617043, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data_relations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data_relations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data_relations.yml/source_not_null_tamanu_reference_data_relations_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"reference_data_relations\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_data_relations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at.1731c2aeb8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_relations_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_relations_updated_at.sql", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at.1731c2aeb8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_relations_updated_at"], "alias": "source_not_null_tamanu_reference_data_relations_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.46344, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data_relations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data_relations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data_relations.yml/source_not_null_tamanu_reference_data_relations_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"reference_data_relations\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'reference_data_relations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_relations_type.16a6b96610": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_relations_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_reference_data_relations_type.sql", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_relations_type.16a6b96610", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_relations_type"], "alias": "source_not_null_tamanu_reference_data_relations_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4651697, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data_relations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data_relations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data_relations.yml/source_not_null_tamanu_reference_data_relations_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type\nfrom \"central\".\"public\".\"reference_data_relations\"\nwhere type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type", "model": "{{ get_where_subquery(source('tamanu', 'reference_data_relations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at_sync_tick.b7d71eb49b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_reference_data_relations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_referen_8011b7a9252ff0fdea21248282e062d1.sql", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at_sync_tick.b7d71eb49b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_reference_data_relations_updated_at_sync_tick"], "alias": "source_not_null_tamanu_referen_8011b7a9252ff0fdea21248282e062d1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_referen_8011b7a9252ff0fdea21248282e062d1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_referen_8011b7a9252ff0fdea21248282e062d1"}, "created_at": 1775621423.4669363, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_referen_8011b7a9252ff0fdea21248282e062d1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data_relations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data_relations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/reference_data_relations.yml/source_not_null_tamanu_referen_8011b7a9252ff0fdea21248282e062d1.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"reference_data_relations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'reference_data_relations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_task_template_designations_id.d2b5b4576a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_task_template_designations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_task_template_designations_id.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_unique_tamanu_task_template_designations_id.d2b5b4576a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_task_template_designations_id"], "alias": "source_unique_tamanu_task_template_designations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4693494, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_unique_tamanu_task_template_designations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_template_designations_id.b21ed442a4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_template_designations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_template_designations_id.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_template_designations_id.b21ed442a4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_template_designations_id"], "alias": "source_not_null_tamanu_task_template_designations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.471117, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_not_null_tamanu_task_template_designations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_template_designations_task_template_id.7cd91a06a9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_template_designations_task_template_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_te_62ea528aaa6c507a64186b3e3e80e44a.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_template_designations_task_template_id.7cd91a06a9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_template_designations_task_template_id"], "alias": "source_not_null_tamanu_task_te_62ea528aaa6c507a64186b3e3e80e44a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_task_te_62ea528aaa6c507a64186b3e3e80e44a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_task_te_62ea528aaa6c507a64186b3e3e80e44a"}, "created_at": 1775621423.4728656, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_task_te_62ea528aaa6c507a64186b3e3e80e44a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_not_null_tamanu_task_te_62ea528aaa6c507a64186b3e3e80e44a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect task_template_id\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere task_template_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "task_template_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_template_id", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_template_designations_designation_id.08e232161f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_template_designations_designation_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_te_cff933c930191116587c20b715a2f58f.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_template_designations_designation_id.08e232161f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_template_designations_designation_id"], "alias": "source_not_null_tamanu_task_te_cff933c930191116587c20b715a2f58f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_task_te_cff933c930191116587c20b715a2f58f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_task_te_cff933c930191116587c20b715a2f58f"}, "created_at": 1775621423.4746122, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_task_te_cff933c930191116587c20b715a2f58f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_not_null_tamanu_task_te_cff933c930191116587c20b715a2f58f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect designation_id\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere designation_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "designation_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "designation_id", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_template_designations_created_at.c02e7baa62": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_template_designations_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_template_designations_created_at.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_template_designations_created_at.c02e7baa62", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_template_designations_created_at"], "alias": "source_not_null_tamanu_task_template_designations_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.476351, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_not_null_tamanu_task_template_designations_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at.8c60186f8d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_template_designations_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_template_designations_updated_at.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at.8c60186f8d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_template_designations_updated_at"], "alias": "source_not_null_tamanu_task_template_designations_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4782104, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_not_null_tamanu_task_template_designations_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at_sync_tick.a7118edaf1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_task_template_designations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_task_te_8a12f2b889e62e6a749a784c31ec10c5.sql", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at_sync_tick.a7118edaf1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_task_template_designations_updated_at_sync_tick"], "alias": "source_not_null_tamanu_task_te_8a12f2b889e62e6a749a784c31ec10c5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_task_te_8a12f2b889e62e6a749a784c31ec10c5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_task_te_8a12f2b889e62e6a749a784c31ec10c5"}, "created_at": 1775621423.4799747, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_task_te_8a12f2b889e62e6a749a784c31ec10c5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "task_template_designations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.task_template_designations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/task_template_designations.yml/source_not_null_tamanu_task_te_8a12f2b889e62e6a749a784c31ec10c5.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"task_template_designations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'task_template_designations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_permissions_id.f42c77c5be": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_permissions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_permissions_id.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_unique_tamanu_permissions_id.f42c77c5be", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_permissions_id"], "alias": "source_unique_tamanu_permissions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4822812, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_unique_tamanu_permissions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"permissions\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_permissions_id.6ee02405bb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_permissions_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_permissions_id.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_permissions_id.6ee02405bb", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_permissions_id"], "alias": "source_not_null_tamanu_permissions_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.484066, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_not_null_tamanu_permissions_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"permissions\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_permissions_role_id.de3cb0b624": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_permissions_role_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_permissions_role_id.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_permissions_role_id.de3cb0b624", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_permissions_role_id"], "alias": "source_not_null_tamanu_permissions_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.485959, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_not_null_tamanu_permissions_role_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect role_id\nfrom \"central\".\"public\".\"permissions\"\nwhere role_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "role_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "role_id", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_.5a5a1be407": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pe_1a8dcc850df03a3ecc14b48122544963.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_.5a5a1be407", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_"], "alias": "source_relationships_tamanu_pe_1a8dcc850df03a3ecc14b48122544963", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pe_1a8dcc850df03a3ecc14b48122544963", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pe_1a8dcc850df03a3ecc14b48122544963"}, "created_at": 1775621423.4877527, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pe_1a8dcc850df03a3ecc14b48122544963\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "roles"], ["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.roles", "source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_relationships_tamanu_pe_1a8dcc850df03a3ecc14b48122544963.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select role_id as from_field\n    from \"central\".\"public\".\"permissions\"\n    where role_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"roles\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "role_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "role_id", "to": "source('tamanu', 'roles')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_permissions_noun.e00a302536": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_permissions_noun", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_permissions_noun.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_permissions_noun.e00a302536", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_permissions_noun"], "alias": "source_not_null_tamanu_permissions_noun", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4930594, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_not_null_tamanu_permissions_noun.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect noun\nfrom \"central\".\"public\".\"permissions\"\nwhere noun is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "noun", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "noun", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_permissions_verb.7e7206e395": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_permissions_verb", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_permissions_verb.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_permissions_verb.7e7206e395", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_permissions_verb"], "alias": "source_not_null_tamanu_permissions_verb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4952042, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_not_null_tamanu_permissions_verb.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect verb\nfrom \"central\".\"public\".\"permissions\"\nwhere verb is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "verb", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "verb", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_permissions_updated_at_sync_tick.cb90c585be": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_permissions_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_permissions_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "test.tamanu.source_not_null_tamanu_permissions_updated_at_sync_tick.cb90c585be", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_permissions_updated_at_sync_tick"], "alias": "source_not_null_tamanu_permissions_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4969978, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "permissions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.permissions"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/permissions.yml/source_not_null_tamanu_permissions_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"permissions\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'permissions')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_field_definition_categories_id.7b788d0c37": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_field_definition_categories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_field_definition_categories_id.sql", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_field_definition_categories_id.7b788d0c37", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_field_definition_categories_id"], "alias": "source_unique_tamanu_patient_field_definition_categories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.4993327, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definition_categories.yml/source_unique_tamanu_patient_field_definition_categories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_field_definition_categories\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_id.a80a45d121": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definition_categories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definition_categories_id.sql", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_id.a80a45d121", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definition_categories_id"], "alias": "source_not_null_tamanu_patient_field_definition_categories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5010962, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definition_categories.yml/source_not_null_tamanu_patient_field_definition_categories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_field_definition_categories\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_created_at.aca434dbf3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definition_categories_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_abf395cee2068f502fc2e358485115f4.sql", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_created_at.aca434dbf3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definition_categories_created_at"], "alias": "source_not_null_tamanu_patient_abf395cee2068f502fc2e358485115f4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_abf395cee2068f502fc2e358485115f4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_abf395cee2068f502fc2e358485115f4"}, "created_at": 1775621423.503041, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_abf395cee2068f502fc2e358485115f4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definition_categories.yml/source_not_null_tamanu_patient_abf395cee2068f502fc2e358485115f4.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_field_definition_categories\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at.f6f9f3ee6a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definition_categories_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_e2615e1e28eb778c127c208eabeece28.sql", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at.f6f9f3ee6a", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definition_categories_updated_at"], "alias": "source_not_null_tamanu_patient_e2615e1e28eb778c127c208eabeece28", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_e2615e1e28eb778c127c208eabeece28", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_e2615e1e28eb778c127c208eabeece28"}, "created_at": 1775621423.5047882, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_e2615e1e28eb778c127c208eabeece28\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definition_categories.yml/source_not_null_tamanu_patient_e2615e1e28eb778c127c208eabeece28.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_field_definition_categories\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_name.a7913c1d45": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definition_categories_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_field_definition_categories_name.sql", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_name.a7913c1d45", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definition_categories_name"], "alias": "source_not_null_tamanu_patient_field_definition_categories_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5065002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definition_categories.yml/source_not_null_tamanu_patient_field_definition_categories_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"patient_field_definition_categories\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick.e345b399c6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_cccdd8d27ac59a96674c575a309724b7.sql", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick.e345b399c6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_cccdd8d27ac59a96674c575a309724b7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_cccdd8d27ac59a96674c575a309724b7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_cccdd8d27ac59a96674c575a309724b7"}, "created_at": 1775621423.5082417, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_cccdd8d27ac59a96674c575a309724b7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_field_definition_categories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_field_definition_categories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_field_definition_categories.yml/source_not_null_tamanu_patient_cccdd8d27ac59a96674c575a309724b7.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_field_definition_categories\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_field_definition_categories')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_medication_administration_record_doses_id.433dfbdead": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_medication_administration_record_doses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_medication_administration_record_doses_id.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_unique_tamanu_medication_administration_record_doses_id.433dfbdead", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_medication_administration_record_doses_id"], "alias": "source_unique_tamanu_medication_administration_record_doses_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.510544, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_unique_tamanu_medication_administration_record_doses_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_id.a52e3aa0c8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_5ae282dc2dbe6ed8c6c0449c123e1285.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_id.a52e3aa0c8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_id"], "alias": "source_not_null_tamanu_medicat_5ae282dc2dbe6ed8c6c0449c123e1285", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_5ae282dc2dbe6ed8c6c0449c123e1285", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_5ae282dc2dbe6ed8c6c0449c123e1285"}, "created_at": 1775621423.512467, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_5ae282dc2dbe6ed8c6c0449c123e1285\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_5ae282dc2dbe6ed8c6c0449c123e1285.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_amount.331e93abb3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_dose_amount", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_b4c79a7df34f496e6c6583d07e8227d0.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_amount.331e93abb3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_dose_amount"], "alias": "source_not_null_tamanu_medicat_b4c79a7df34f496e6c6583d07e8227d0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_b4c79a7df34f496e6c6583d07e8227d0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_b4c79a7df34f496e6c6583d07e8227d0"}, "created_at": 1775621423.514244, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_b4c79a7df34f496e6c6583d07e8227d0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_b4c79a7df34f496e6c6583d07e8227d0.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect dose_amount\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere dose_amount is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "dose_amount", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "dose_amount", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_time.1ccce1a649": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_given_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_622d01db35b6429abdb1484053926169.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_time.1ccce1a649", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_given_time"], "alias": "source_not_null_tamanu_medicat_622d01db35b6429abdb1484053926169", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_622d01db35b6429abdb1484053926169", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_622d01db35b6429abdb1484053926169"}, "created_at": 1775621423.5159795, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_622d01db35b6429abdb1484053926169\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_622d01db35b6429abdb1484053926169.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect given_time\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere given_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "given_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "given_time", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_by_user_id.65d6a1441b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_given_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_b5a9a7862808019a4a02f75fc3772ba5.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_by_user_id.65d6a1441b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_given_by_user_id"], "alias": "source_not_null_tamanu_medicat_b5a9a7862808019a4a02f75fc3772ba5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_b5a9a7862808019a4a02f75fc3772ba5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_b5a9a7862808019a4a02f75fc3772ba5"}, "created_at": 1775621423.5176945, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_b5a9a7862808019a4a02f75fc3772ba5\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_b5a9a7862808019a4a02f75fc3772ba5.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect given_by_user_id\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere given_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "given_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "given_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id.a78608d49f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_1b3f5e7d5292bb2a4f0dd350b15726df.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id.a78608d49f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id"], "alias": "source_not_null_tamanu_medicat_1b3f5e7d5292bb2a4f0dd350b15726df", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_1b3f5e7d5292bb2a4f0dd350b15726df", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_1b3f5e7d5292bb2a4f0dd350b15726df"}, "created_at": 1775621423.519408, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_1b3f5e7d5292bb2a4f0dd350b15726df\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_1b3f5e7d5292bb2a4f0dd350b15726df.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect recorded_by_user_id\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere recorded_by_user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recorded_by_user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "recorded_by_user_id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_mar_id.5c2f68633d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_mar_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_c58e952ef6370722eba0a1134e35d38f.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_mar_id.5c2f68633d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_mar_id"], "alias": "source_not_null_tamanu_medicat_c58e952ef6370722eba0a1134e35d38f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_c58e952ef6370722eba0a1134e35d38f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_c58e952ef6370722eba0a1134e35d38f"}, "created_at": 1775621423.52126, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_c58e952ef6370722eba0a1134e35d38f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_c58e952ef6370722eba0a1134e35d38f.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect mar_id\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere mar_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "mar_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "mar_id", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_created_at.d2ae234e45": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_b8d92542dec53d43147ce9529191626a.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_created_at.d2ae234e45", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_created_at"], "alias": "source_not_null_tamanu_medicat_b8d92542dec53d43147ce9529191626a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_b8d92542dec53d43147ce9529191626a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_b8d92542dec53d43147ce9529191626a"}, "created_at": 1775621423.5229964, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_b8d92542dec53d43147ce9529191626a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_b8d92542dec53d43147ce9529191626a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at.3bad2c9822": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_c1091a085ea3bc2221b67ff4da35d509.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at.3bad2c9822", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_updated_at"], "alias": "source_not_null_tamanu_medicat_c1091a085ea3bc2221b67ff4da35d509", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_c1091a085ea3bc2221b67ff4da35d509", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_c1091a085ea3bc2221b67ff4da35d509"}, "created_at": 1775621423.5247347, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_c1091a085ea3bc2221b67ff4da35d509\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_c1091a085ea3bc2221b67ff4da35d509.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick.fc7397bf69": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_323ae863feace9128b25ca53926e61ea.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick.fc7397bf69", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick"], "alias": "source_not_null_tamanu_medicat_323ae863feace9128b25ca53926e61ea", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_323ae863feace9128b25ca53926e61ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_323ae863feace9128b25ca53926e61ea"}, "created_at": 1775621423.526448, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_323ae863feace9128b25ca53926e61ea\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_323ae863feace9128b25ca53926e61ea.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_index.c22ff9799c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_medication_administration_record_doses_dose_index", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_medicat_9c2a92300491d9cd5f407ea68d6f7d74.sql", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_index.c22ff9799c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_medication_administration_record_doses_dose_index"], "alias": "source_not_null_tamanu_medicat_9c2a92300491d9cd5f407ea68d6f7d74", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_medicat_9c2a92300491d9cd5f407ea68d6f7d74", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_medicat_9c2a92300491d9cd5f407ea68d6f7d74"}, "created_at": 1775621423.5281925, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_medicat_9c2a92300491d9cd5f407ea68d6f7d74\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "medication_administration_record_doses"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.medication_administration_record_doses"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/medication_administration_record_doses.yml/source_not_null_tamanu_medicat_9c2a92300491d9cd5f407ea68d6f7d74.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect dose_index\nfrom \"central\".\"public\".\"medication_administration_record_doses\"\nwhere dose_index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "dose_index", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "dose_index", "model": "{{ get_where_subquery(source('tamanu', 'medication_administration_record_doses')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_facilities_id.9e454badf4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_facilities_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_facilities_id.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_unique_tamanu_facilities_id.9e454badf4", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_facilities_id"], "alias": "source_unique_tamanu_facilities_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5306497, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_unique_tamanu_facilities_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"facilities\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_facilities_id.ad186295b9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_facilities_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_facilities_id.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_facilities_id.ad186295b9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_facilities_id"], "alias": "source_not_null_tamanu_facilities_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5324135, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_not_null_tamanu_facilities_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"facilities\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_facilities_code.55fbf8c36c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_facilities_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_facilities_code.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_facilities_code.55fbf8c36c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_facilities_code"], "alias": "source_not_null_tamanu_facilities_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5341697, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_not_null_tamanu_facilities_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"facilities\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_facilities_name.9ac276f33d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_facilities_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_facilities_name.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_facilities_name.9ac276f33d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_facilities_name"], "alias": "source_not_null_tamanu_facilities_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.535912, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_not_null_tamanu_facilities_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"facilities\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_facilities_visibility_status__current__historical.1f32aa4a9d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_facilities_visibility_status__current__historical", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__ce0d4ff270e4dd6acad8df864e06be83.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_facilities_visibility_status__current__historical.1f32aa4a9d", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_facilities_visibility_status__current__historical"], "alias": "source_accepted_values_tamanu__ce0d4ff270e4dd6acad8df864e06be83", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__ce0d4ff270e4dd6acad8df864e06be83", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__ce0d4ff270e4dd6acad8df864e06be83"}, "created_at": 1775621423.5376778, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__ce0d4ff270e4dd6acad8df864e06be83\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_accepted_values_tamanu__ce0d4ff270e4dd6acad8df864e06be83.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        visibility_status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"facilities\"\n    group by visibility_status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'current','historical'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "visibility_status", "values": ["current", "historical"], "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_.0a191fc0e4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_4e36c38d45264d0e0fe9353e8a21d88d.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_.0a191fc0e4", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_"], "alias": "dbt_utils_source_relationships_4e36c38d45264d0e0fe9353e8a21d88d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_4e36c38d45264d0e0fe9353e8a21d88d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_4e36c38d45264d0e0fe9353e8a21d88d"}, "created_at": 1775621423.5431018, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_4e36c38d45264d0e0fe9353e8a21d88d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/dbt_utils_source_relationships_4e36c38d45264d0e0fe9353e8a21d88d.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    catchment_id as id\n\n  from \"central\".\"public\".\"facilities\"\n\n  where catchment_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'catchment'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "catchment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "catchment_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'catchment'", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_facilities_updated_at_sync_tick.5ebc0505a1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_facilities_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_facilities_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_facilities_updated_at_sync_tick.5ebc0505a1", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_facilities_updated_at_sync_tick"], "alias": "source_not_null_tamanu_facilities_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5488968, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_not_null_tamanu_facilities_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"facilities\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_facilities_is_sensitive.83efc1299f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_facilities_is_sensitive", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_facilities_is_sensitive.sql", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "test.tamanu.source_not_null_tamanu_facilities_is_sensitive.83efc1299f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_facilities_is_sensitive"], "alias": "source_not_null_tamanu_facilities_is_sensitive", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5506904, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/facilities.yml/source_not_null_tamanu_facilities_is_sensitive.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_sensitive\nfrom \"central\".\"public\".\"facilities\"\nwhere is_sensitive is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_sensitive", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_sensitive", "model": "{{ get_where_subquery(source('tamanu', 'facilities')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_encounter_history_id.b5104bb3a4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_encounter_history_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_encounter_history_id.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_unique_tamanu_encounter_history_id.b5104bb3a4", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_encounter_history_id"], "alias": "source_unique_tamanu_encounter_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5530589, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_unique_tamanu_encounter_history_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"encounter_history\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_id.98f4907b32": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_id.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_id.98f4907b32", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_id"], "alias": "source_not_null_tamanu_encounter_history_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5550177, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"encounter_history\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_created_at.d7d91fd2e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_created_at.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_created_at.d7d91fd2e8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_created_at"], "alias": "source_not_null_tamanu_encounter_history_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5568378, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"encounter_history\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_updated_at.cafd8d5cb6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_updated_at.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_updated_at.cafd8d5cb6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_updated_at"], "alias": "source_not_null_tamanu_encounter_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5586097, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"encounter_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_date.5840578e29": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_date.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_date.5840578e29", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_date"], "alias": "source_not_null_tamanu_encounter_history_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5603504, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"encounter_history\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_encounter_id.5d9223d72c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_encounter_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_encounter_id.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_encounter_id.5d9223d72c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_encounter_id"], "alias": "source_not_null_tamanu_encounter_history_encounter_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5620918, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_encounter_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_id\nfrom \"central\".\"public\".\"encounter_history\"\nwhere encounter_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_.98ae5b7d3b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_81f7c46b7605420269fdd4eadc8092e1.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_.98ae5b7d3b", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_"], "alias": "source_relationships_tamanu_en_81f7c46b7605420269fdd4eadc8092e1", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_81f7c46b7605420269fdd4eadc8092e1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_81f7c46b7605420269fdd4eadc8092e1"}, "created_at": 1775621423.5638552, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_81f7c46b7605420269fdd4eadc8092e1\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounters"], ["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_relationships_tamanu_en_81f7c46b7605420269fdd4eadc8092e1.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select encounter_id as from_field\n    from \"central\".\"public\".\"encounter_history\"\n    where encounter_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"encounters\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "encounter_id", "to": "source('tamanu', 'encounters')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_department_id.2bf94ddc1c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_department_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_department_id.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_department_id.2bf94ddc1c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_department_id"], "alias": "source_not_null_tamanu_encounter_history_department_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5691884, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_department_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect department_id\nfrom \"central\".\"public\".\"encounter_history\"\nwhere department_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "department_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "department_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_.cc3dcc54fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_9559b570b08912110b9c0eda0b850095.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_.cc3dcc54fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_"], "alias": "source_relationships_tamanu_en_9559b570b08912110b9c0eda0b850095", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_9559b570b08912110b9c0eda0b850095", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_9559b570b08912110b9c0eda0b850095"}, "created_at": 1775621423.5709941, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_9559b570b08912110b9c0eda0b850095\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "departments"], ["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_relationships_tamanu_en_9559b570b08912110b9c0eda0b850095.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select department_id as from_field\n    from \"central\".\"public\".\"encounter_history\"\n    where department_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"departments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "department_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "department_id", "to": "source('tamanu', 'departments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_location_id.5b7796abc8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_location_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_location_id.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_location_id.5b7796abc8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_location_id"], "alias": "source_not_null_tamanu_encounter_history_location_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.576196, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_location_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect location_id\nfrom \"central\".\"public\".\"encounter_history\"\nwhere location_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "location_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_.c9d4f477fb": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_be319768c2bacab4a4eff3bc94b92d6c.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_.c9d4f477fb", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_"], "alias": "source_relationships_tamanu_en_be319768c2bacab4a4eff3bc94b92d6c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_be319768c2bacab4a4eff3bc94b92d6c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_be319768c2bacab4a4eff3bc94b92d6c"}, "created_at": 1775621423.578076, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_be319768c2bacab4a4eff3bc94b92d6c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"], ["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_relationships_tamanu_en_be319768c2bacab4a4eff3bc94b92d6c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_id as from_field\n    from \"central\".\"public\".\"encounter_history\"\n    where location_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"locations\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_id", "to": "source('tamanu', 'locations')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_examiner_id.96fc96334d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_examiner_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_examiner_id.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_examiner_id.96fc96334d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_examiner_id"], "alias": "source_not_null_tamanu_encounter_history_examiner_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5832841, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_examiner_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect examiner_id\nfrom \"central\".\"public\".\"encounter_history\"\nwhere examiner_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "examiner_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "examiner_id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_.b2d555c7b6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_6ad0a05d11fc4402385b1f3a39441a99.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_.b2d555c7b6", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_en_6ad0a05d11fc4402385b1f3a39441a99", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_6ad0a05d11fc4402385b1f3a39441a99", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_6ad0a05d11fc4402385b1f3a39441a99"}, "created_at": 1775621423.5850973, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_6ad0a05d11fc4402385b1f3a39441a99\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_relationships_tamanu_en_6ad0a05d11fc4402385b1f3a39441a99.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select examiner_id as from_field\n    from \"central\".\"public\".\"encounter_history\"\n    where examiner_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "examiner_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "examiner_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_encounter_type.a7b6e21a3c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_encounter_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_encounter_type.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_encounter_type.a7b6e21a3c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_encounter_type"], "alias": "source_not_null_tamanu_encounter_history_encounter_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.590346, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_encounter_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect encounter_type\nfrom \"central\".\"public\".\"encounter_history\"\nwhere encounter_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "encounter_type", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.af58070d62": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__00ad04c72cc0ab49990f16abcadc79a7.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.af58070d62", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination"], "alias": "source_accepted_values_tamanu__00ad04c72cc0ab49990f16abcadc79a7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__00ad04c72cc0ab49990f16abcadc79a7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__00ad04c72cc0ab49990f16abcadc79a7"}, "created_at": 1775621423.5921867, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__00ad04c72cc0ab49990f16abcadc79a7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_accepted_values_tamanu__00ad04c72cc0ab49990f16abcadc79a7.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        encounter_type as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"encounter_history\"\n    group by encounter_type\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'admission','clinic','imaging','emergency','observation','triage','surveyResponse','vaccination'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "encounter_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "encounter_type", "values": ["admission", "clinic", "imaging", "emergency", "observation", "triage", "surveyResponse", "vaccination"], "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_updated_at_sync_tick.6ea4b7b4cd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_updated_at_sync_tick.6ea4b7b4cd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_updated_at_sync_tick"], "alias": "source_not_null_tamanu_encounter_history_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.5969155, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"encounter_history\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_.fbf272ed47": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_en_03bed6c25cbc3fccbdc2ed0a6f6e2b9f.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_.fbf272ed47", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_en_03bed6c25cbc3fccbdc2ed0a6f6e2b9f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_en_03bed6c25cbc3fccbdc2ed0a6f6e2b9f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_en_03bed6c25cbc3fccbdc2ed0a6f6e2b9f"}, "created_at": 1775621423.598721, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_en_03bed6c25cbc3fccbdc2ed0a6f6e2b9f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_relationships_tamanu_en_03bed6c25cbc3fccbdc2ed0a6f6e2b9f.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select actor_id as from_field\n    from \"central\".\"public\".\"encounter_history\"\n    where actor_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "actor_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "actor_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_encounter_history_change_type.53d3e33bca": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_encounter_history_change_type", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_encounter_history_change_type.sql", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "test.tamanu.source_not_null_tamanu_encounter_history_change_type.53d3e33bca", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_encounter_history_change_type"], "alias": "source_not_null_tamanu_encounter_history_change_type", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": "change_type IS NOT NULL", "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"where": "change_type IS NOT NULL"}, "created_at": 1775621423.6043403, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(where=\"change_type IS NOT NULL\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "encounter_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.encounter_history"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/encounter_history.yml/source_not_null_tamanu_encounter_history_change_type.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect change_type\nfrom (select * from \"central\".\"public\".\"encounter_history\" where change_type IS NOT NULL) dbt_subquery\nwhere change_type is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "change_type", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "change_type", "model": "{{ get_where_subquery(source('tamanu', 'encounter_history')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_program_registrations_id.82d7fead9b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_program_registrations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_program_registrations_id.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_program_registrations_id.82d7fead9b", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_program_registrations_id"], "alias": "source_unique_tamanu_patient_program_registrations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6067834, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_unique_tamanu_patient_program_registrations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_id.3e27cbc953": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_program_registrations_id.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_id.3e27cbc953", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_id"], "alias": "source_not_null_tamanu_patient_program_registrations_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6085434, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_program_registrations_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_created_at.b6bbcb66a6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_program_registrations_created_at.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_created_at.b6bbcb66a6", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_created_at"], "alias": "source_not_null_tamanu_patient_program_registrations_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6103148, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_program_registrations_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at.7b0cb3a4d3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_program_registrations_updated_at.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at.7b0cb3a4d3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_updated_at"], "alias": "source_not_null_tamanu_patient_program_registrations_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6122296, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_program_registrations_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_date.ee77ca5f67": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_program_registrations_date.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_date.ee77ca5f67", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_date"], "alias": "source_not_null_tamanu_patient_program_registrations_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6140008, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_program_registrations_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_registration_status.f99db0e260": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_registration_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_0b4174385f5f0f26edf1b11ad8f250c7.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_registration_status.f99db0e260", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_registration_status"], "alias": "source_not_null_tamanu_patient_0b4174385f5f0f26edf1b11ad8f250c7", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_0b4174385f5f0f26edf1b11ad8f250c7", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_0b4174385f5f0f26edf1b11ad8f250c7"}, "created_at": 1775621423.6157818, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_0b4174385f5f0f26edf1b11ad8f250c7\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_0b4174385f5f0f26edf1b11ad8f250c7.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect registration_status\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere registration_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "registration_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "registration_status", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_patient_id.21a8bab832": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_program_registrations_patient_id.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_patient_id.21a8bab832", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_patient_id"], "alias": "source_not_null_tamanu_patient_program_registrations_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6174967, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_program_registrations_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_.edaef8726f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_67fe8431d317e60dd499b6095574d73c.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_.edaef8726f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_67fe8431d317e60dd499b6095574d73c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_67fe8431d317e60dd499b6095574d73c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_67fe8431d317e60dd499b6095574d73c"}, "created_at": 1775621423.6192482, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_67fe8431d317e60dd499b6095574d73c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_relationships_tamanu_pa_67fe8431d317e60dd499b6095574d73c.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_program_registrations\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_program_registry_id.c9b21e72ac": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_program_registry_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_b313c67021d77a35334c90202158b098.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_program_registry_id.c9b21e72ac", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_program_registry_id"], "alias": "source_not_null_tamanu_patient_b313c67021d77a35334c90202158b098", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_b313c67021d77a35334c90202158b098", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_b313c67021d77a35334c90202158b098"}, "created_at": 1775621423.6246955, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_b313c67021d77a35334c90202158b098\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_b313c67021d77a35334c90202158b098.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect program_registry_id\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere program_registry_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "program_registry_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_.ca26255395": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_66b916c0d37cc0fb803f87949d6444ea.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_.ca26255395", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_"], "alias": "source_relationships_tamanu_pa_66b916c0d37cc0fb803f87949d6444ea", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_66b916c0d37cc0fb803f87949d6444ea", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_66b916c0d37cc0fb803f87949d6444ea"}, "created_at": 1775621423.6264844, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_66b916c0d37cc0fb803f87949d6444ea\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registries"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registries", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_relationships_tamanu_pa_66b916c0d37cc0fb803f87949d6444ea.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select program_registry_id as from_field\n    from \"central\".\"public\".\"patient_program_registrations\"\n    where program_registry_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"program_registries\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "program_registry_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "program_registry_id", "to": "source('tamanu', 'program_registries')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_.f60ae13805": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_8947710d564d36d8b20ba96110997ed0.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_.f60ae13805", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_"], "alias": "source_relationships_tamanu_pa_8947710d564d36d8b20ba96110997ed0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_8947710d564d36d8b20ba96110997ed0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_8947710d564d36d8b20ba96110997ed0"}, "created_at": 1775621423.6318119, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_8947710d564d36d8b20ba96110997ed0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "program_registry_clinical_statuses"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.program_registry_clinical_statuses", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_relationships_tamanu_pa_8947710d564d36d8b20ba96110997ed0.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select clinical_status_id as from_field\n    from \"central\".\"public\".\"patient_program_registrations\"\n    where clinical_status_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"program_registry_clinical_statuses\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinical_status_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "clinical_status_id", "to": "source('tamanu', 'program_registry_clinical_statuses')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_clinician_id.f5eec02863": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_clinician_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_dc75750717c8f99e9d1eac769870a682.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_clinician_id.f5eec02863", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_clinician_id"], "alias": "source_not_null_tamanu_patient_dc75750717c8f99e9d1eac769870a682", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_dc75750717c8f99e9d1eac769870a682", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_dc75750717c8f99e9d1eac769870a682"}, "created_at": 1775621423.6380906, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_dc75750717c8f99e9d1eac769870a682\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_dc75750717c8f99e9d1eac769870a682.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect clinician_id\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere clinician_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "clinician_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_.660ded928b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_24112443541f682d55878e61af957461.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_.660ded928b", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pa_24112443541f682d55878e61af957461", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_24112443541f682d55878e61af957461", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_24112443541f682d55878e61af957461"}, "created_at": 1775621423.6399019, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_24112443541f682d55878e61af957461\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_relationships_tamanu_pa_24112443541f682d55878e61af957461.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select clinician_id as from_field\n    from \"central\".\"public\".\"patient_program_registrations\"\n    where clinician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "clinician_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_.0915c99f9a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_38fcda585ae422d7c37411ea85809419.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_.0915c99f9a", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_pa_38fcda585ae422d7c37411ea85809419", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_38fcda585ae422d7c37411ea85809419", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_38fcda585ae422d7c37411ea85809419"}, "created_at": 1775621423.6452165, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_38fcda585ae422d7c37411ea85809419\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_relationships_tamanu_pa_38fcda585ae422d7c37411ea85809419.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select registering_facility_id as from_field\n    from \"central\".\"public\".\"patient_program_registrations\"\n    where registering_facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "registering_facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "registering_facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_.e70f29b144": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_58c80d42a1671d27482f46d736f73e26.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_.e70f29b144", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_"], "alias": "source_relationships_tamanu_pa_58c80d42a1671d27482f46d736f73e26", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_58c80d42a1671d27482f46d736f73e26", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_58c80d42a1671d27482f46d736f73e26"}, "created_at": 1775621423.650292, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_58c80d42a1671d27482f46d736f73e26\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "facilities"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_relationships_tamanu_pa_58c80d42a1671d27482f46d736f73e26.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select facility_id as from_field\n    from \"central\".\"public\".\"patient_program_registrations\"\n    where facility_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"facilities\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "facility_id", "to": "source('tamanu', 'facilities')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_.db6437c554": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_bf086bd35f2c06ac9c177ae3fdc1440c.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_.db6437c554", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_"], "alias": "dbt_utils_source_relationships_bf086bd35f2c06ac9c177ae3fdc1440c", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_bf086bd35f2c06ac9c177ae3fdc1440c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_bf086bd35f2c06ac9c177ae3fdc1440c"}, "created_at": 1775621423.6556058, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_bf086bd35f2c06ac9c177ae3fdc1440c\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/dbt_utils_source_relationships_bf086bd35f2c06ac9c177ae3fdc1440c.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    village_id as id\n\n  from \"central\".\"public\".\"patient_program_registrations\"\n\n  where village_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'village'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "village_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "village_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'village'", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick.6e539b8d2d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_1eb9a19311f3899c930f6013deba5cbb.sql", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick.6e539b8d2d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_1eb9a19311f3899c930f6013deba5cbb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_1eb9a19311f3899c930f6013deba5cbb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_1eb9a19311f3899c930f6013deba5cbb"}, "created_at": 1775621423.6612892, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_1eb9a19311f3899c930f6013deba5cbb\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_program_registrations"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_program_registrations"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_program_registrations.yml/source_not_null_tamanu_patient_1eb9a19311f3899c930f6013deba5cbb.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_program_registrations\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_program_registrations')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_test_panels_id.509550e62b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_test_panels_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_test_panels_id.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_test_panels_id.509550e62b", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_test_panels_id"], "alias": "source_unique_tamanu_lab_test_panels_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.663758, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_unique_tamanu_lab_test_panels_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_id.11a6b51e6b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_id.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_id.11a6b51e6b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_id"], "alias": "source_not_null_tamanu_lab_test_panels_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6655493, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_created_at.da26e7a248": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_created_at.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_created_at.da26e7a248", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_created_at"], "alias": "source_not_null_tamanu_lab_test_panels_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6674976, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at.b4f58197df": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_updated_at.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at.b4f58197df", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_updated_at"], "alias": "source_not_null_tamanu_lab_test_panels_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6692772, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_name.3fdd4c9c83": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_name", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_name.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_name.3fdd4c9c83", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_name"], "alias": "source_not_null_tamanu_lab_test_panels_name", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6710472, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_name.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect name\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "name", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_code.41611b6a55": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_code", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_code.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_code.41611b6a55", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_code"], "alias": "source_not_null_tamanu_lab_test_panels_code", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6727962, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_code.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect code\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere code is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "code", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "code", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_visibility_status.482b848a4d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_visibility_status.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_visibility_status.482b848a4d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_visibility_status"], "alias": "source_not_null_tamanu_lab_test_panels_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6745586, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_.f5578be7c6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_c5636052a7379c5f2c7c06e9e554c1cd.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_.f5578be7c6", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_"], "alias": "dbt_utils_source_relationships_c5636052a7379c5f2c7c06e9e554c1cd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_c5636052a7379c5f2c7c06e9e554c1cd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_c5636052a7379c5f2c7c06e9e554c1cd"}, "created_at": 1775621423.676462, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_c5636052a7379c5f2c7c06e9e554c1cd\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/dbt_utils_source_relationships_c5636052a7379c5f2c7c06e9e554c1cd.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    category_id as id\n\n  from \"central\".\"public\".\"lab_test_panels\"\n\n  where category_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'labTestCategory'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "category_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "category_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'labTestCategory'", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.bd90caed16": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_test_panels_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.bd90caed16", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_test_panels_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_test_panels_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.681837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_test_panels"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_test_panels"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_test_panels.yml/source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_test_panels\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_test_panels')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_appointments_id.5632c4fc60": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_appointments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_appointments_id.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_unique_tamanu_appointments_id.5632c4fc60", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_appointments_id"], "alias": "source_unique_tamanu_appointments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.684432, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_unique_tamanu_appointments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"appointments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointments_id.d1a6de3ce4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointments_id.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointments_id.d1a6de3ce4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointments_id"], "alias": "source_not_null_tamanu_appointments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.6862402, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_not_null_tamanu_appointments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"appointments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_.994c2060a5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ap_4f6b5b155e835f1a5f829748963a8de4.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_.994c2060a5", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_ap_4f6b5b155e835f1a5f829748963a8de4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ap_4f6b5b155e835f1a5f829748963a8de4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ap_4f6b5b155e835f1a5f829748963a8de4"}, "created_at": 1775621423.6880333, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ap_4f6b5b155e835f1a5f829748963a8de4\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_relationships_tamanu_ap_4f6b5b155e835f1a5f829748963a8de4.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"appointments\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_.b2920f6fec": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ap_75af671c924175fc8823980196455715.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_.b2920f6fec", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_ap_75af671c924175fc8823980196455715", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ap_75af671c924175fc8823980196455715", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ap_75af671c924175fc8823980196455715"}, "created_at": 1775621423.693282, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ap_75af671c924175fc8823980196455715\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_relationships_tamanu_ap_75af671c924175fc8823980196455715.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select clinician_id as from_field\n    from \"central\".\"public\".\"appointments\"\n    where clinician_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "clinician_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "clinician_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_.894dbd0b29": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ap_3a83e0c665a036e02f84cda3d87e5233.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_.894dbd0b29", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_"], "alias": "source_relationships_tamanu_ap_3a83e0c665a036e02f84cda3d87e5233", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ap_3a83e0c665a036e02f84cda3d87e5233", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ap_3a83e0c665a036e02f84cda3d87e5233"}, "created_at": 1775621423.6983333, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ap_3a83e0c665a036e02f84cda3d87e5233\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "locations"], ["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_relationships_tamanu_ap_3a83e0c665a036e02f84cda3d87e5233.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_id as from_field\n    from \"central\".\"public\".\"appointments\"\n    where location_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"locations\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_id", "to": "source('tamanu', 'locations')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointments_type_legacy.cd7aaf3419": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointments_type_legacy", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointments_type_legacy.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointments_type_legacy.cd7aaf3419", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointments_type_legacy"], "alias": "source_not_null_tamanu_appointments_type_legacy", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7034912, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_not_null_tamanu_appointments_type_legacy.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type_legacy\nfrom \"central\".\"public\".\"appointments\"\nwhere type_legacy is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type_legacy", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type_legacy", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointments_status.3078c54556": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointments_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointments_status.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointments_status.3078c54556", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointments_status"], "alias": "source_not_null_tamanu_appointments_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7052543, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_not_null_tamanu_appointments_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"appointments\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled.2b51753ed0": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__b6d38a3f13333f1e14a480b836f6f256.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled.2b51753ed0", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled"], "alias": "source_accepted_values_tamanu__b6d38a3f13333f1e14a480b836f6f256", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__b6d38a3f13333f1e14a480b836f6f256", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_accepted_values_tamanu__b6d38a3f13333f1e14a480b836f6f256"}, "created_at": 1775621423.7070453, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_accepted_values_tamanu__b6d38a3f13333f1e14a480b836f6f256\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_accepted_values_tamanu__b6d38a3f13333f1e14a480b836f6f256.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        status as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"appointments\"\n    group by status\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'Confirmed','Arrived','Assessed','Seen','No-show','Cancelled'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "status", "values": ["Confirmed", "Arrived", "Assessed", "Seen", "No-show", "Cancelled"], "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_.b603c9c40f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ap_478b534e72ae029f417c9a70a155c867.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_.b603c9c40f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_"], "alias": "source_relationships_tamanu_ap_478b534e72ae029f417c9a70a155c867", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ap_478b534e72ae029f417c9a70a155c867", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ap_478b534e72ae029f417c9a70a155c867"}, "created_at": 1775621423.7135224, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ap_478b534e72ae029f417c9a70a155c867\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "location_groups"], ["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.location_groups", "source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_relationships_tamanu_ap_478b534e72ae029f417c9a70a155c867.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select location_group_id as from_field\n    from \"central\".\"public\".\"appointments\"\n    where location_group_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"location_groups\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "location_group_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "location_group_id", "to": "source('tamanu', 'location_groups')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_appointments_updated_at_sync_tick.fc1a99ab76": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointments_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointments_updated_at_sync_tick.fc1a99ab76", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_appointments_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7187643, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_not_null_tamanu_appointments_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"appointments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_.e993598733": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_cd8239390c6d6981620db84ee8ed2911.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_.e993598733", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_"], "alias": "dbt_utils_source_relationships_cd8239390c6d6981620db84ee8ed2911", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_cd8239390c6d6981620db84ee8ed2911", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_cd8239390c6d6981620db84ee8ed2911"}, "created_at": 1775621423.7206342, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_cd8239390c6d6981620db84ee8ed2911\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/dbt_utils_source_relationships_cd8239390c6d6981620db84ee8ed2911.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    booking_type_id as id\n\n  from \"central\".\"public\".\"appointments\"\n\n  where booking_type_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'bookingType'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "booking_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "booking_type_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'bookingType'", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_.d6a8261230": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_60d9ac296507fdcb962df35e594046f0.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_.d6a8261230", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_"], "alias": "dbt_utils_source_relationships_60d9ac296507fdcb962df35e594046f0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_60d9ac296507fdcb962df35e594046f0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_60d9ac296507fdcb962df35e594046f0"}, "created_at": 1775621423.7263305, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_60d9ac296507fdcb962df35e594046f0\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/dbt_utils_source_relationships_60d9ac296507fdcb962df35e594046f0.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    appointment_type_id as id\n\n  from \"central\".\"public\".\"appointments\"\n\n  where appointment_type_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'appointmentType'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "appointment_type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "appointment_type_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'appointmentType'", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_appointments_is_high_priority.3c2beccb9c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_appointments_is_high_priority", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_appointments_is_high_priority.sql", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_appointments_is_high_priority.3c2beccb9c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_appointments_is_high_priority"], "alias": "source_not_null_tamanu_appointments_is_high_priority", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.732736, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "appointments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.appointments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/appointments.yml/source_not_null_tamanu_appointments_is_high_priority.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect is_high_priority\nfrom \"central\".\"public\".\"appointments\"\nwhere is_high_priority is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "is_high_priority", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "is_high_priority", "model": "{{ get_where_subquery(source('tamanu', 'appointments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_family_histories_id.403e2d1751": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_family_histories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_family_histories_id.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_family_histories_id.403e2d1751", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_family_histories_id"], "alias": "source_unique_tamanu_patient_family_histories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.735133, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_unique_tamanu_patient_family_histories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_family_histories\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_family_histories_id.d2d0e80b7f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_family_histories_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_family_histories_id.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_family_histories_id.d2d0e80b7f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_family_histories_id"], "alias": "source_not_null_tamanu_patient_family_histories_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7368965, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_not_null_tamanu_patient_family_histories_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_family_histories\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_family_histories_created_at.8ee5173bfa": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_family_histories_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_family_histories_created_at.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_family_histories_created_at.8ee5173bfa", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_family_histories_created_at"], "alias": "source_not_null_tamanu_patient_family_histories_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.738647, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_not_null_tamanu_patient_family_histories_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"patient_family_histories\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at.c710d3b7b3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_family_histories_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_family_histories_updated_at.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at.c710d3b7b3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_family_histories_updated_at"], "alias": "source_not_null_tamanu_patient_family_histories_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7404761, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_not_null_tamanu_patient_family_histories_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"patient_family_histories\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_family_histories_recorded_date.ec1039e1d3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_family_histories_recorded_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_family_histories_recorded_date.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_family_histories_recorded_date.ec1039e1d3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_family_histories_recorded_date"], "alias": "source_not_null_tamanu_patient_family_histories_recorded_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7422085, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_not_null_tamanu_patient_family_histories_recorded_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect recorded_date\nfrom \"central\".\"public\".\"patient_family_histories\"\nwhere recorded_date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recorded_date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "recorded_date", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_.3f50556d92": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_b004150615fa7d97829881147916498e.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_.3f50556d92", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_"], "alias": "source_relationships_tamanu_pa_b004150615fa7d97829881147916498e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_b004150615fa7d97829881147916498e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_b004150615fa7d97829881147916498e"}, "created_at": 1775621423.743979, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_b004150615fa7d97829881147916498e\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patients"], ["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_relationships_tamanu_pa_b004150615fa7d97829881147916498e.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select patient_id as from_field\n    from \"central\".\"public\".\"patient_family_histories\"\n    where patient_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"patients\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "patient_id", "to": "source('tamanu', 'patients')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_.1464fe93d6": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_pa_b58d28778d1a22717c29b03e2aca8f18.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_.1464fe93d6", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_pa_b58d28778d1a22717c29b03e2aca8f18", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_pa_b58d28778d1a22717c29b03e2aca8f18", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_pa_b58d28778d1a22717c29b03e2aca8f18"}, "created_at": 1775621423.7492874, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_pa_b58d28778d1a22717c29b03e2aca8f18\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_relationships_tamanu_pa_b58d28778d1a22717c29b03e2aca8f18.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select practitioner_id as from_field\n    from \"central\".\"public\".\"patient_family_histories\"\n    where practitioner_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "practitioner_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "practitioner_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.569a8c1cce": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_", "resource_type": "test", "package_name": "tamanu", "path": "dbt_utils_source_relationships_907e8e0449182ba7f445947ced3ecda9.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.569a8c1cce", "fqn": ["tamanu", "..", "database", "model", "public", "dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_"], "alias": "dbt_utils_source_relationships_907e8e0449182ba7f445947ced3ecda9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_source_relationships_907e8e0449182ba7f445947ced3ecda9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "dbt_utils_source_relationships_907e8e0449182ba7f445947ced3ecda9"}, "created_at": 1775621423.7543495, "relation_name": null, "raw_code": "{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_source_relationships_907e8e0449182ba7f445947ced3ecda9\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "reference_data"], ["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.test_relationships_where", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/dbt_utils_source_relationships_907e8e0449182ba7f445947ced3ecda9.sql", "compiled": true, "compiled_code": "\n\n\n\n\nwith left_table as (\n\n  select\n    diagnosis_id as id\n\n  from \"central\".\"public\".\"patient_family_histories\"\n\n  where diagnosis_id is not null\n    and 1=1\n\n),\n\nright_table as (\n\n  select\n    id as id\n\n  from \"central\".\"public\".\"reference_data\"\n\n  where id is not null\n    and type = 'diagnosis'\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "diagnosis_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships_where", "kwargs": {"column_name": "diagnosis_id", "to": "source('tamanu', 'reference_data')", "field": "id", "to_condition": "type = 'diagnosis'", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": "dbt_utils"}}, "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at_sync_tick.eff3f46718": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_family_histories_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_5df7cd67df9c1488598bf02e557025bc.sql", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at_sync_tick.eff3f46718", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_family_histories_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_5df7cd67df9c1488598bf02e557025bc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_5df7cd67df9c1488598bf02e557025bc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_5df7cd67df9c1488598bf02e557025bc"}, "created_at": 1775621423.7597253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_5df7cd67df9c1488598bf02e557025bc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_family_histories"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_family_histories"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_family_histories.yml/source_not_null_tamanu_patient_5df7cd67df9c1488598bf02e557025bc.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_family_histories\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_family_histories')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_ips_requests_id.3f494ccf34": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_ips_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_ips_requests_id.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_unique_tamanu_ips_requests_id.3f494ccf34", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_ips_requests_id"], "alias": "source_unique_tamanu_ips_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7621295, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_unique_tamanu_ips_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"ips_requests\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_id.82d75ba779": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_id.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_id.82d75ba779", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_id"], "alias": "source_not_null_tamanu_ips_requests_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.764117, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"ips_requests\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_created_at.28215c9764": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_created_at.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_created_at.28215c9764", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_created_at"], "alias": "source_not_null_tamanu_ips_requests_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7658935, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"ips_requests\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_updated_at.b1c150635e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_updated_at.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_updated_at.b1c150635e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_updated_at"], "alias": "source_not_null_tamanu_ips_requests_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7676837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"ips_requests\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_patient_id.b5ad6ea558": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_patient_id.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_patient_id.b5ad6ea558", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_patient_id"], "alias": "source_not_null_tamanu_ips_requests_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7693865, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"ips_requests\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_created_by.943d0fec8d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_created_by", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_created_by.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_created_by.943d0fec8d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_created_by"], "alias": "source_not_null_tamanu_ips_requests_created_by", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7711458, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_created_by.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_by\nfrom \"central\".\"public\".\"ips_requests\"\nwhere created_by is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_by", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_by", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_.9e7a2bec9f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_ip_44873478a5e9f5565ed779c906d70119.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_.9e7a2bec9f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_ip_44873478a5e9f5565ed779c906d70119", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_ip_44873478a5e9f5565ed779c906d70119", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_ip_44873478a5e9f5565ed779c906d70119"}, "created_at": 1775621423.7730532, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_ip_44873478a5e9f5565ed779c906d70119\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_relationships_tamanu_ip_44873478a5e9f5565ed779c906d70119.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select created_by as from_field\n    from \"central\".\"public\".\"ips_requests\"\n    where created_by is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_by", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "created_by", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_status.680fa2f376": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_status.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_status.680fa2f376", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_status"], "alias": "source_not_null_tamanu_ips_requests_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.778256, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect status\nfrom \"central\".\"public\".\"ips_requests\"\nwhere status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "status", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_email.29f30a58bf": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_email", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_email.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_email.29f30a58bf", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_email"], "alias": "source_not_null_tamanu_ips_requests_email", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7800138, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_email.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect email\nfrom \"central\".\"public\".\"ips_requests\"\nwhere email is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "email", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "email", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_ips_requests_updated_at_sync_tick.72991067d9": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_ips_requests_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_ips_requests_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "test.tamanu.source_not_null_tamanu_ips_requests_updated_at_sync_tick.72991067d9", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_ips_requests_updated_at_sync_tick"], "alias": "source_not_null_tamanu_ips_requests_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7820036, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "ips_requests"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.ips_requests"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/ips_requests.yml/source_not_null_tamanu_ips_requests_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"ips_requests\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'ips_requests')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_user_recently_viewed_patients_id.723cf05c7a": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_user_recently_viewed_patients_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_user_recently_viewed_patients_id.sql", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "test.tamanu.source_unique_tamanu_user_recently_viewed_patients_id.723cf05c7a", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_user_recently_viewed_patients_id"], "alias": "source_unique_tamanu_user_recently_viewed_patients_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.784339, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_recently_viewed_patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_recently_viewed_patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_recently_viewed_patients.yml/source_unique_tamanu_user_recently_viewed_patients_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"user_recently_viewed_patients\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_recently_viewed_patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_id.0772796918": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_recently_viewed_patients_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_recently_viewed_patients_id.sql", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_id.0772796918", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_recently_viewed_patients_id"], "alias": "source_not_null_tamanu_user_recently_viewed_patients_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7860932, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_recently_viewed_patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_recently_viewed_patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_recently_viewed_patients.yml/source_not_null_tamanu_user_recently_viewed_patients_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"user_recently_viewed_patients\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'user_recently_viewed_patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_created_at.60a2cd8b3e": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_recently_viewed_patients_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_recently_viewed_patients_created_at.sql", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_created_at.60a2cd8b3e", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_recently_viewed_patients_created_at"], "alias": "source_not_null_tamanu_user_recently_viewed_patients_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.787836, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_recently_viewed_patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_recently_viewed_patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_recently_viewed_patients.yml/source_not_null_tamanu_user_recently_viewed_patients_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"user_recently_viewed_patients\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'user_recently_viewed_patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_updated_at.f76b5440b3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_recently_viewed_patients_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_recently_viewed_patients_updated_at.sql", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_updated_at.f76b5440b3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_recently_viewed_patients_updated_at"], "alias": "source_not_null_tamanu_user_recently_viewed_patients_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7896924, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_recently_viewed_patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_recently_viewed_patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_recently_viewed_patients.yml/source_not_null_tamanu_user_recently_viewed_patients_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"user_recently_viewed_patients\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'user_recently_viewed_patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_user_id.8e3a703839": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_recently_viewed_patients_user_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_recently_viewed_patients_user_id.sql", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_user_id.8e3a703839", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_recently_viewed_patients_user_id"], "alias": "source_not_null_tamanu_user_recently_viewed_patients_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.791428, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_recently_viewed_patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_recently_viewed_patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_recently_viewed_patients.yml/source_not_null_tamanu_user_recently_viewed_patients_user_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect user_id\nfrom \"central\".\"public\".\"user_recently_viewed_patients\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(source('tamanu', 'user_recently_viewed_patients')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_patient_id.3c02c3c6e8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_user_recently_viewed_patients_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_user_recently_viewed_patients_patient_id.sql", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_patient_id.3c02c3c6e8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_user_recently_viewed_patients_patient_id"], "alias": "source_not_null_tamanu_user_recently_viewed_patients_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.793153, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "user_recently_viewed_patients"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.user_recently_viewed_patients"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/user_recently_viewed_patients.yml/source_not_null_tamanu_user_recently_viewed_patients_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"user_recently_viewed_patients\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'user_recently_viewed_patients')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_sync_queued_devices_id.6c914cf2fe": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_sync_queued_devices_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_sync_queued_devices_id.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_unique_tamanu_sync_queued_devices_id.6c914cf2fe", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_sync_queued_devices_id"], "alias": "source_unique_tamanu_sync_queued_devices_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7954364, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_unique_tamanu_sync_queued_devices_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_id.8a7ff7ff9d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_id.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_id.8a7ff7ff9d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_id"], "alias": "source_not_null_tamanu_sync_queued_devices_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.7972164, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_seen_time.e49db9d307": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_last_seen_time", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_last_seen_time.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_seen_time.e49db9d307", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_last_seen_time"], "alias": "source_not_null_tamanu_sync_queued_devices_last_seen_time", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.799105, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_last_seen_time.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_seen_time\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere last_seen_time is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_seen_time", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_seen_time", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_synced_tick.ebca46f7d5": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_last_synced_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_last_synced_tick.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_synced_tick.ebca46f7d5", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_last_synced_tick"], "alias": "source_not_null_tamanu_sync_queued_devices_last_synced_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8008494, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_last_synced_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect last_synced_tick\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere last_synced_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_synced_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_synced_tick", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_urgent.cdd3e5fe6d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_urgent", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_urgent.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_urgent.cdd3e5fe6d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_urgent"], "alias": "source_not_null_tamanu_sync_queued_devices_urgent", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8025904, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_urgent.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect urgent\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere urgent is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "urgent", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "urgent", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_created_at.ca84df51b3": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_created_at.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_created_at.ca84df51b3", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_created_at"], "alias": "source_not_null_tamanu_sync_queued_devices_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8042996, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_updated_at.3c113842b4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_updated_at.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_updated_at.3c113842b4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_updated_at"], "alias": "source_not_null_tamanu_sync_queued_devices_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8060153, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_sync_queued_devices_facility_ids.1c565eb9fd": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_sync_queued_devices_facility_ids", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_sync_queued_devices_facility_ids.sql", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "test.tamanu.source_not_null_tamanu_sync_queued_devices_facility_ids.1c565eb9fd", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_sync_queued_devices_facility_ids"], "alias": "source_not_null_tamanu_sync_queued_devices_facility_ids", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.80784, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "sync_queued_devices"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.sync_queued_devices"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/sync_queued_devices.yml/source_not_null_tamanu_sync_queued_devices_facility_ids.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect facility_ids\nfrom \"central\".\"public\".\"sync_queued_devices\"\nwhere facility_ids is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "facility_ids", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "facility_ids", "model": "{{ get_where_subquery(source('tamanu', 'sync_queued_devices')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_patient_secondary_ids_id.3ac199e68c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_patient_secondary_ids_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_patient_secondary_ids_id.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_unique_tamanu_patient_secondary_ids_id.3ac199e68c", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_patient_secondary_ids_id"], "alias": "source_unique_tamanu_patient_secondary_ids_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8101418, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_unique_tamanu_patient_secondary_ids_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_secondary_ids_id.c12a4d4ff4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_secondary_ids_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_secondary_ids_id.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_secondary_ids_id.c12a4d4ff4", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_secondary_ids_id"], "alias": "source_not_null_tamanu_patient_secondary_ids_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8118804, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_not_null_tamanu_patient_secondary_ids_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_secondary_ids_value.ecfec42154": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_secondary_ids_value", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_secondary_ids_value.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_secondary_ids_value.ecfec42154", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_secondary_ids_value"], "alias": "source_not_null_tamanu_patient_secondary_ids_value", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8136187, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_not_null_tamanu_patient_secondary_ids_value.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect value\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere value is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "value", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "value", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_secondary_ids_visibility_status.687573a37f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_secondary_ids_visibility_status", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_secondary_ids_visibility_status.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_secondary_ids_visibility_status.687573a37f", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_secondary_ids_visibility_status"], "alias": "source_not_null_tamanu_patient_secondary_ids_visibility_status", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8153296, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_not_null_tamanu_patient_secondary_ids_visibility_status.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect visibility_status\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere visibility_status is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "visibility_status", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "visibility_status", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_secondary_ids_type_id.1c5040f680": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_secondary_ids_type_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_secondary_ids_type_id.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_secondary_ids_type_id.1c5040f680", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_secondary_ids_type_id"], "alias": "source_not_null_tamanu_patient_secondary_ids_type_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8171637, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_not_null_tamanu_patient_secondary_ids_type_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect type_id\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere type_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "type_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "type_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_secondary_ids_patient_id.b8437631c2": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_secondary_ids_patient_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_secondary_ids_patient_id.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_secondary_ids_patient_id.b8437631c2", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_secondary_ids_patient_id"], "alias": "source_not_null_tamanu_patient_secondary_ids_patient_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8188891, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_not_null_tamanu_patient_secondary_ids_patient_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect patient_id\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere patient_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "patient_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "patient_id", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick.f04774a463": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_patient_a8ab8fb64f9c8e3baccb3e0d3142ec6a.sql", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "test.tamanu.source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick.f04774a463", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick"], "alias": "source_not_null_tamanu_patient_a8ab8fb64f9c8e3baccb3e0d3142ec6a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_patient_a8ab8fb64f9c8e3baccb3e0d3142ec6a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_patient_a8ab8fb64f9c8e3baccb3e0d3142ec6a"}, "created_at": 1775621423.820657, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_patient_a8ab8fb64f9c8e3baccb3e0d3142ec6a\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "patient_secondary_ids"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.patient_secondary_ids"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/patient_secondary_ids.yml/source_not_null_tamanu_patient_a8ab8fb64f9c8e3baccb3e0d3142ec6a.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"patient_secondary_ids\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'patient_secondary_ids')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_lab_request_attachments_id.b7eb3f1eb1": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_lab_request_attachments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_lab_request_attachments_id.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_unique_tamanu_lab_request_attachments_id.b7eb3f1eb1", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_lab_request_attachments_id"], "alias": "source_unique_tamanu_lab_request_attachments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8229468, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_unique_tamanu_lab_request_attachments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_attachments_id.6f2075f317": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_attachments_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_attachments_id.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_attachments_id.6f2075f317", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_attachments_id"], "alias": "source_not_null_tamanu_lab_request_attachments_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8248246, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_not_null_tamanu_lab_request_attachments_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_attachments_created_at.b587e22da8": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_attachments_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_attachments_created_at.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_attachments_created_at.b587e22da8", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_attachments_created_at"], "alias": "source_not_null_tamanu_lab_request_attachments_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8265574, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_not_null_tamanu_lab_request_attachments_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at.ce5b0e489b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_attachments_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_attachments_updated_at.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at.ce5b0e489b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_attachments_updated_at"], "alias": "source_not_null_tamanu_lab_request_attachments_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8282654, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_not_null_tamanu_lab_request_attachments_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_attachments_attachment_id.6a6139cc22": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_attachments_attachment_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_attachments_attachment_id.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_attachments_attachment_id.6a6139cc22", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_attachments_attachment_id"], "alias": "source_not_null_tamanu_lab_request_attachments_attachment_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8299813, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_not_null_tamanu_lab_request_attachments_attachment_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect attachment_id\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere attachment_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "attachment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "attachment_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_.eff1df818f": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_905d49ac10ad93efe089a7a5d3d0dceb.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_.eff1df818f", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_"], "alias": "source_relationships_tamanu_la_905d49ac10ad93efe089a7a5d3d0dceb", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_905d49ac10ad93efe089a7a5d3d0dceb", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_905d49ac10ad93efe089a7a5d3d0dceb"}, "created_at": 1775621423.832051, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_905d49ac10ad93efe089a7a5d3d0dceb\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "attachments"], ["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.attachments", "source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_relationships_tamanu_la_905d49ac10ad93efe089a7a5d3d0dceb.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select attachment_id as from_field\n    from \"central\".\"public\".\"lab_request_attachments\"\n    where attachment_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"attachments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "attachment_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "attachment_id", "to": "source('tamanu', 'attachments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_attachments_lab_request_id.15bc6fc2df": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_attachments_lab_request_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_request_attachments_lab_request_id.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_attachments_lab_request_id.15bc6fc2df", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_attachments_lab_request_id"], "alias": "source_not_null_tamanu_lab_request_attachments_lab_request_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8379788, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_not_null_tamanu_lab_request_attachments_lab_request_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect lab_request_id\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere lab_request_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "lab_request_id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_.8995368506": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_f50e7480c9709cf9af340816771af108.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_.8995368506", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_"], "alias": "source_relationships_tamanu_la_f50e7480c9709cf9af340816771af108", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_f50e7480c9709cf9af340816771af108", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_f50e7480c9709cf9af340816771af108"}, "created_at": 1775621423.8398113, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_f50e7480c9709cf9af340816771af108\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_requests"], ["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_relationships_tamanu_la_f50e7480c9709cf9af340816771af108.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select lab_request_id as from_field\n    from \"central\".\"public\".\"lab_request_attachments\"\n    where lab_request_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_requests\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lab_request_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "lab_request_id", "to": "source('tamanu', 'lab_requests')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_.5c53ecfc7d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_la_22d4d2ded0be345b72383928510912fc.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_.5c53ecfc7d", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_"], "alias": "source_relationships_tamanu_la_22d4d2ded0be345b72383928510912fc", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_la_22d4d2ded0be345b72383928510912fc", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_la_22d4d2ded0be345b72383928510912fc"}, "created_at": 1775621423.8450844, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_la_22d4d2ded0be345b72383928510912fc\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"], ["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_relationships_tamanu_la_22d4d2ded0be345b72383928510912fc.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select replaced_by_id as from_field\n    from \"central\".\"public\".\"lab_request_attachments\"\n    where replaced_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"lab_request_attachments\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "replaced_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "replaced_by_id", "to": "source('tamanu', 'lab_request_attachments')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick.a0d8b0a6ba": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_lab_req_2b32b52ee932c44ae817f460186eca15.sql", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick.a0d8b0a6ba", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick"], "alias": "source_not_null_tamanu_lab_req_2b32b52ee932c44ae817f460186eca15", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_not_null_tamanu_lab_req_2b32b52ee932c44ae817f460186eca15", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_not_null_tamanu_lab_req_2b32b52ee932c44ae817f460186eca15"}, "created_at": 1775621423.8500075, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_not_null_tamanu_lab_req_2b32b52ee932c44ae817f460186eca15\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "lab_request_attachments"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.lab_request_attachments"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/lab_request_attachments.yml/source_not_null_tamanu_lab_req_2b32b52ee932c44ae817f460186eca15.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"lab_request_attachments\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'lab_request_attachments')) }}"}, "namespace": null}}, "test.tamanu.source_unique_tamanu_vital_logs_id.3a1b593bf4": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_unique_tamanu_vital_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_unique_tamanu_vital_logs_id.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_unique_tamanu_vital_logs_id.3a1b593bf4", "fqn": ["tamanu", "..", "database", "model", "public", "source_unique_tamanu_vital_logs_id"], "alias": "source_unique_tamanu_vital_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8525436, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_unique_tamanu_vital_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\nselect\n    id as unique_field,\n    count(*) as n_records\n\nfrom \"central\".\"public\".\"vital_logs\"\nwhere id is not null\ngroup by id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "unique", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vital_logs_id.2865672c8c": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vital_logs_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vital_logs_id.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vital_logs_id.2865672c8c", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vital_logs_id"], "alias": "source_not_null_tamanu_vital_logs_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.854329, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_not_null_tamanu_vital_logs_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect id\nfrom \"central\".\"public\".\"vital_logs\"\nwhere id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "id", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vital_logs_created_at.1c50457539": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vital_logs_created_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vital_logs_created_at.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vital_logs_created_at.1c50457539", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vital_logs_created_at"], "alias": "source_not_null_tamanu_vital_logs_created_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8560653, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_not_null_tamanu_vital_logs_created_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect created_at\nfrom \"central\".\"public\".\"vital_logs\"\nwhere created_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "created_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "created_at", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vital_logs_updated_at.fad4900972": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vital_logs_updated_at", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vital_logs_updated_at.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vital_logs_updated_at.fad4900972", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vital_logs_updated_at"], "alias": "source_not_null_tamanu_vital_logs_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8578045, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_not_null_tamanu_vital_logs_updated_at.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at\nfrom \"central\".\"public\".\"vital_logs\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vital_logs_date.19b648a68b": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vital_logs_date", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vital_logs_date.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vital_logs_date.19b648a68b", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vital_logs_date"], "alias": "source_not_null_tamanu_vital_logs_date", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.859657, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_not_null_tamanu_vital_logs_date.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect date\nfrom \"central\".\"public\".\"vital_logs\"\nwhere date is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error.f8319959ff": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error", "resource_type": "test", "package_name": "tamanu", "path": "source_accepted_values_tamanu__24b988e5e1da546dd21013ff9b701c2d.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error.f8319959ff", "fqn": ["tamanu", "..", "database", "model", "public", "source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error"], "alias": "source_accepted_values_tamanu__24b988e5e1da546dd21013ff9b701c2d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_accepted_values_tamanu__24b988e5e1da546dd21013ff9b701c2d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "warn", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"severity": "warn", "alias": "source_accepted_values_tamanu__24b988e5e1da546dd21013ff9b701c2d"}, "created_at": 1775621423.861827, "relation_name": null, "raw_code": "{{ test_accepted_values(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\",alias=\"source_accepted_values_tamanu__24b988e5e1da546dd21013ff9b701c2d\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_accepted_values", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_accepted_values_tamanu__24b988e5e1da546dd21013ff9b701c2d.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith all_values as (\n\n    select\n        reason_for_change as value_field,\n        count(*) as n_records\n\n    from \"central\".\"public\".\"vital_logs\"\n    group by reason_for_change\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    'incorrect-patient','incorrect-value','other','recorded-in-error'\n)\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "reason_for_change", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "accepted_values", "kwargs": {"column_name": "reason_for_change", "values": ["incorrect-patient", "incorrect-value", "other", "recorded-in-error"], "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_.7c5a5dd055": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_vi_d010ae2b4cac3ae428fd864928e29179.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_.7c5a5dd055", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_"], "alias": "source_relationships_tamanu_vi_d010ae2b4cac3ae428fd864928e29179", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_vi_d010ae2b4cac3ae428fd864928e29179", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_vi_d010ae2b4cac3ae428fd864928e29179"}, "created_at": 1775621423.8675094, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_vi_d010ae2b4cac3ae428fd864928e29179\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "users"], ["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_relationships_tamanu_vi_d010ae2b4cac3ae428fd864928e29179.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select recorded_by_id as from_field\n    from \"central\".\"public\".\"vital_logs\"\n    where recorded_by_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"users\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "recorded_by_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "recorded_by_id", "to": "source('tamanu', 'users')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vital_logs_answer_id.a061b3580d": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vital_logs_answer_id", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vital_logs_answer_id.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vital_logs_answer_id.a061b3580d", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vital_logs_answer_id"], "alias": "source_not_null_tamanu_vital_logs_answer_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8724394, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_not_null_tamanu_vital_logs_answer_id.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect answer_id\nfrom \"central\".\"public\".\"vital_logs\"\nwhere answer_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "answer_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "answer_id", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_.345fc6ff26": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_", "resource_type": "test", "package_name": "tamanu", "path": "source_relationships_tamanu_vi_2edb243485e7aeb8af697205cf62a43f.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_.345fc6ff26", "fqn": ["tamanu", "..", "database", "model", "public", "source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_"], "alias": "source_relationships_tamanu_vi_2edb243485e7aeb8af697205cf62a43f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "source_relationships_tamanu_vi_2edb243485e7aeb8af697205cf62a43f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "source_relationships_tamanu_vi_2edb243485e7aeb8af697205cf62a43f"}, "created_at": 1775621423.8742216, "relation_name": null, "raw_code": "{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias=\"source_relationships_tamanu_vi_2edb243485e7aeb8af697205cf62a43f\") }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "survey_response_answers"], ["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_relationships", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.survey_response_answers", "source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_relationships_tamanu_vi_2edb243485e7aeb8af697205cf62a43f.sql", "compiled": true, "compiled_code": "\n    \n    \n\nwith child as (\n    select answer_id as from_field\n    from \"central\".\"public\".\"vital_logs\"\n    where answer_id is not null\n),\n\nparent as (\n    select id as to_field\n    from \"central\".\"public\".\"survey_response_answers\"\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "answer_id", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "relationships", "kwargs": {"column_name": "answer_id", "to": "source('tamanu', 'survey_response_answers')", "field": "id", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}, "test.tamanu.source_not_null_tamanu_vital_logs_updated_at_sync_tick.8257970877": {"database": "central", "schema": "dbt_dbt_test__audit", "name": "source_not_null_tamanu_vital_logs_updated_at_sync_tick", "resource_type": "test", "package_name": "tamanu", "path": "source_not_null_tamanu_vital_logs_updated_at_sync_tick.sql", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "test.tamanu.source_not_null_tamanu_vital_logs_updated_at_sync_tick.8257970877", "fqn": ["tamanu", "..", "database", "model", "public", "source_not_null_tamanu_vital_logs_updated_at_sync_tick"], "alias": "source_not_null_tamanu_vital_logs_updated_at_sync_tick", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1775621423.8792765, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tamanu", "vital_logs"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["source.tamanu.tamanu.vital_logs"]}, "compiled_path": "target/compiled/tamanu/../../database/model/public/vital_logs.yml/source_not_null_tamanu_vital_logs_updated_at_sync_tick.sql", "compiled": true, "compiled_code": "\n    \n    \n\n\n\nselect updated_at_sync_tick\nfrom \"central\".\"public\".\"vital_logs\"\nwhere updated_at_sync_tick is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at_sync_tick", "file_key_name": "sources.tamanu", "attached_node": null, "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at_sync_tick", "model": "{{ get_where_subquery(source('tamanu', 'vital_logs')) }}"}, "namespace": null}}}, "sources": {"source.tamanu.fhir__tamanu.specimens": {"database": "central", "schema": "fhir", "name": "specimens", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/specimens.yml", "original_file_path": "../../database/model/fhir/specimens.yml", "unique_id": "source.tamanu.fhir__tamanu.specimens", "fqn": ["tamanu", "fhir__tamanu", "specimens"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "specimens", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about specimen, for laboratory testing.\n\n<https://www.hl7.org/fhir/specimen.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in specimens.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in specimens.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in specimens.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in specimens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "collection": {"name": "collection", "description": "Who collected the specimen, from where, and at what time.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__specimens__collection"]}, "request": {"name": "request", "description": "Reference to the [service request](#!/source/source.tamanu.fhir__tamanu.service_requests) this\nspecimen is for.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__specimens__request"]}, "type": {"name": "type", "description": "Coded type of the specimen.\n\nThese codes are from Reference Data `type=specimenType`.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__specimens__type"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in specimens.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in specimens.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"specimens\"", "created_at": 1775621420.2880654, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__specimens"]}, "source.tamanu.fhir__tamanu.non_fhir_medici_report": {"database": "central", "schema": "fhir", "name": "non_fhir_medici_report", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/non_fhir_medici_report.yml", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.yml", "unique_id": "source.tamanu.fhir__tamanu.non_fhir_medici_report", "fqn": ["tamanu", "fhir__tamanu", "non_fhir_medici_report"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "non_fhir_medici_report", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This is a hack specifically to provide an integration (Medici) with a custom endpoint.\n\nIt has nothing to do with FHIR but reuses the FHIR API infrastructure for convenience.\n\nDo not use outside of this integration's context.", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in non_fhir_medici_report.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in non_fhir_medici_report.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in non_fhir_medici_report.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in non_fhir_medici_report.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "patient_id": {"name": "patient_id", "description": "UUID of the patient.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__patient_id"]}, "first_name": {"name": "first_name", "description": "First name of the patient.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__first_name"]}, "last_name": {"name": "last_name", "description": "Last name of the patient.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__last_name"]}, "date_of_birth": {"name": "date_of_birth", "description": "Patient date of birth.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__date_of_birth"]}, "age": {"name": "age", "description": "Patient age.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__age"]}, "sex": {"name": "sex", "description": "Patient sex.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__sex"]}, "patient_billing_id": {"name": "patient_billing_id", "description": "Billing ID for Medici purposes.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__patient_billing_id"]}, "patient_billing_type": {"name": "patient_billing_type", "description": "Medici billing type.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__patient_billing_type"]}, "encounter_id": {"name": "encounter_id", "description": "UUID of the encounter.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__encounter_id"]}, "encounter_start_date": {"name": "encounter_start_date", "description": "Start date of the encounter.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__encounter_start_date"]}, "encounter_end_date": {"name": "encounter_end_date", "description": "End date of the encounter.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__encounter_end_date"]}, "discharge_date": {"name": "discharge_date", "description": "Discharge date of the encounter.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__discharge_date"]}, "encounter_type": {"name": "encounter_type", "description": "Type of the encounter.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__encounter_type"]}, "weight": {"name": "weight", "description": "Patient weight.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__weight"]}, "visit_type": {"name": "visit_type", "description": "Encounter visit type.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__visit_type"]}, "episode_end_status": {"name": "episode_end_status", "description": "Status at end of encounter.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__episode_end_status"]}, "encounter_discharge_disposition": {"name": "encounter_discharge_disposition", "description": "Discharge disposition.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__encounter_discharge_disposition"]}, "triage_category": {"name": "triage_category", "description": "Triage category.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__triage_category"]}, "wait_time": {"name": "wait_time", "description": "Wait time.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__wait_time"]}, "departments": {"name": "departments", "description": "Departments involved.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__departments"]}, "locations": {"name": "locations", "description": "Locations involved.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__locations"]}, "reason_for_encounter": {"name": "reason_for_encounter", "description": "Reason for encounter.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__reason_for_encounter"]}, "diagnoses": {"name": "diagnoses", "description": "Diagnoses made.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__diagnoses"]}, "medications": {"name": "medications", "description": "Medications prescribed.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__medications"]}, "vaccinations": {"name": "vaccinations", "description": "Vaccinations done.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__vaccinations"]}, "procedures": {"name": "procedures", "description": "Procedures done.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__procedures"]}, "lab_requests": {"name": "lab_requests", "description": "Labs requested.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__lab_requests"]}, "imaging_requests": {"name": "imaging_requests", "description": "Imagings requested.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__imaging_requests"]}, "notes": {"name": "notes", "description": "Any associated notes and comments.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__non_fhir_medici_report__notes"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in non_fhir_medici_report.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in non_fhir_medici_report.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"non_fhir_medici_report\"", "created_at": 1775621420.3194745, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__non_fhir_medici_report"]}, "source.tamanu.fhir__tamanu.encounters": {"database": "central", "schema": "fhir", "name": "encounters", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/encounters.yml", "original_file_path": "../../database/model/fhir/encounters.yml", "unique_id": "source.tamanu.fhir__tamanu.encounters", "fqn": ["tamanu", "fhir__tamanu", "encounters"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "encounters", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about encounters.\n\n\"Encounter\" means an interaction between a patient and a healthcare provider, for health services or\nwhen assessing the health status of the patient. Encounters are in the present and the past; future\ninteractions are typically called \"Appointments.\"\n\nThese are materialised from `public.encounters`.\n\n<https://www.hl7.org/fhir/encounter.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in encounters.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in encounters.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in encounters.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in encounters.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "status": {"name": "status", "description": "The status of the encounter.\n\nIn Tamanu this can be one of two values:\n\n- in-progress (for current or open encounters)\n- discharged", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__encounters__status"]}, "class": {"name": "class", "description": "The general classification of the encounter.\n\nThis is a complex type but in Tamanu represents only one of these three classes (or absent):\n\n- IMP (inpatient)\n- EMER (emergency)\n- OBSENC (observation)", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__encounters__class"]}, "actual_period": {"name": "actual_period", "description": "The start and end (if present) dates of the encounter.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__encounters__actual_period"]}, "subject": {"name": "subject", "description": "Reference to the [patient](#!/source/source.tamanu.fhir__tamanu.patients) involved in the encounter.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__encounters__subject"]}, "location": {"name": "location", "description": "The location of the encounter.\n\nThis is a complex type which encodes many bits of information about the location, such as its name\nand internal ID, physical type, and status. Additionally there are two locations per encounter, one\ndescribing the ward or general hospital area, and one describing the bed or specific place within\nthat area.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__encounters__location"]}, "service_provider": {"name": "service_provider", "description": "Reference to the [facility](#!/source/source.tamanu.fhir__tamanu.facilities) where the encounter is\ntaking place.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__encounters__service_provider"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in encounters.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in encounters.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"encounters\"", "created_at": 1775621420.3557708, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__encounters"]}, "source.tamanu.fhir__tamanu.patients": {"database": "central", "schema": "fhir", "name": "patients", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/patients.yml", "original_file_path": "../../database/model/fhir/patients.yml", "unique_id": "source.tamanu.fhir__tamanu.patients", "fqn": ["tamanu", "fhir__tamanu", "patients"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "patients", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about patients.\n\n<https://www.hl7.org/fhir/patient.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in patients.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in patients.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in patients.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in patients.", "meta": {}, "data_type": "timestamp without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "identifier": {"name": "identifier", "description": "One or more identifiers for a patient:\n\n- Tamanu Display ID or NHN (always)\n- Passport number (if present)\n- Driving licence number (if present)", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__identifier"]}, "active": {"name": "active", "description": "Whether this patient record is in active use.\n\nThis is computed from the `visibility_status` and `deleted_at` columns on `public.patients`.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__active"]}, "name": {"name": "name", "description": "One or more names:\n\n- the patient's official name (always)\n- the patient's cultural name or nickname (if present)", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__name"]}, "telecom": {"name": "telecom", "description": "Phone numbers for the patient, if available.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__telecom"]}, "gender": {"name": "gender", "description": "Gender marker.\n\nThis is usually `male` or `female`, but may be something else if other values are allowed in Tamanu.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__gender"]}, "birth_date": {"name": "birth_date", "description": "Date of birth for the patient.\n\nGenerally present but not guaranteed.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__birth_date"]}, "deceased_date_time": {"name": "deceased_date_time", "description": "Date of death, if deceased.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__deceased_date_time"]}, "address": {"name": "address", "description": "Home address for the patient, if available.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__address"]}, "link": {"name": "link", "description": "If the resource is for a merged or mergee patient record, this will link other instances of the patient.\n\nA record that:\n\n- was merged into another record, will have a `type=replaced-by` link;\n- has records that were merged into it, will have one or more `type=replaces` links;\n- has records that were merged into _ancestors_, will have one or more `type=seealso` links.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__link"]}, "extension": {"name": "extension", "description": "If enabled, the ethnicity of the patient, as per the New Zealand FHIR ethnicity extension or\nderivations thereof: <https://build.fhir.org/ig/HL7NZ/nzbase/branches/master/StructureDefinition-nz-ethnicity.html>.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__patients__extension"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in patients.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in patients.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"patients\"", "created_at": 1775621420.381859, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__patients"]}, "source.tamanu.fhir__tamanu.medication_requests": {"database": "central", "schema": "fhir", "name": "medication_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/medication_requests.yml", "original_file_path": "../../database/model/fhir/medication_requests.yml", "unique_id": "source.tamanu.fhir__tamanu.medication_requests", "fqn": ["tamanu", "fhir__tamanu", "medication_requests"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "medication_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about medication requests, used for pharmacy orders integration.\n\n<https://www.hl7.org/fhir/medicationrequest.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in medication_requests.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in medication_requests.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in medication_requests.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in medication_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "identifier": {"name": "identifier", "description": "Single identifier which maps to the id of the pharmacy_order_prescription which is the upstream of this medication request.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__identifier"]}, "status": {"name": "status", "description": "Status of the request. Always `active` for now.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__status"]}, "intent": {"name": "intent", "description": "Intent of the request. Always `order` for now.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__intent"]}, "group_identifier": {"name": "group_identifier", "description": "Identifier that links multiple medication_requests that came from the same pharmacy_order. Maps to the pharmacy_order id.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__group_identifier"]}, "subject": {"name": "subject", "description": "FHIR reference to the Patient that this medication_request is for.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__subject"]}, "encounter": {"name": "encounter", "description": "FHIR reference to the Encounter that this medication_request was created in.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__encounter"]}, "medication": {"name": "medication", "description": "Drug that is being requested. Uses mSupply universal code mapping.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__medication"]}, "authored_on": {"name": "authored_on", "description": "Date the request was ordered.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__authored_on"]}, "requester": {"name": "requester", "description": "FHIR reference to the Organization that this medication_request is requested by.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__requester"]}, "recorder": {"name": "recorder", "description": "FHIR reference to the Practitioner that ordered this medication_request.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__recorder"]}, "note": {"name": "note", "description": "Comments attached to the request.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__note"]}, "dosage_instruction": {"name": "dosage_instruction", "description": "Information about the dosage and instructions for taking the medication.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__dosage_instruction"]}, "dispense_request": {"name": "dispense_request", "description": "Information about the quantity of the medication to be dispensed and the number of repeats.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__dispense_request"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in medication_requests.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in medication_requests.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "category": {"name": "category", "description": "The type of medication usage. Currently will only be present as 'discharge' if its a discharge prescription.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__medication_requests__category"]}}, "meta": {"triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"medication_requests\"", "created_at": 1775621420.4001057, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__medication_requests"]}, "source.tamanu.fhir__tamanu.service_requests": {"database": "central", "schema": "fhir", "name": "service_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/service_requests.yml", "original_file_path": "../../database/model/fhir/service_requests.yml", "unique_id": "source.tamanu.fhir__tamanu.service_requests", "fqn": ["tamanu", "fhir__tamanu", "service_requests"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "service_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about service requests, which cover both laboratories and imaging.\n\n<https://www.hl7.org/fhir/servicerequest.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in service_requests.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in service_requests.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in service_requests.", "meta": {}, "data_type": "character varying", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in service_requests.", "meta": {}, "data_type": "timestamp without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "identifier": {"name": "identifier", "description": "Two identifiers:\n\n- The Tamanu internal UUID of the lab or imaging request.\n- The Tamanu Display ID of the lab or imaging request.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__identifier"]}, "status": {"name": "status", "description": "The processing status of the request as a normalized string.\n\nPossible values: `draft`, `active`, `on-hold`, `revoked`, `completed`, `entered-in-error`, `unknown`.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__status"]}, "intent": {"name": "intent", "description": "The intent of the request.\n\nThis is meant to encode planned/proposed requests, but Tamanu doesn't yet have this concept, so it\nis always the single value `order`.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__intent"]}, "category": {"name": "category", "description": "The SNOMED category of the request.\n\n- Always 363679005 for imaging\n- Always 108252007 for laboratory", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__category"]}, "priority": {"name": "priority", "description": "The priority of the request, normalized.\n\nTamanu priorities are fully customisable, to accommodate a wide range of clinical practices.\nHowever this means there is no obvious way to map priorities to the FHIR set. It is an\nadministrator's responsibility to ensure the set of priorities in a Tamanu deployment matches usage.\nAs a stopgap, Tamanu priorities which do not match one of the FHIR priorities (`routine`, `urgent`,\n`asap`, `stat`) are encoded as `null`.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__priority"]}, "order_detail": {"name": "order_detail", "description": "Coded description of the order.\n\nFor imaging this is the areas to the imaged, for labs these are the tests to be run.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__order_detail"]}, "location_code": {"name": "location_code", "description": "Name of the facility for the request.\n\nThis is the most precise location available taken from a number of sources relating to the request.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__location_code"]}, "code": {"name": "code", "description": "Coded description of the service requested.\n\nFor labs this is the code of a test panel, if available.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__code"]}, "subject": {"name": "subject", "description": "Reference to the [patient](#!/source/source.tamanu.fhir__tamanu.patients) this service request\nconcerns.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__subject"]}, "requester": {"name": "requester", "description": "Reference to the [practitioner](#!/source/source.tamanu.fhir__tamanu.practitioners) who requested\nthis.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__requester"]}, "occurrence_date_time": {"name": "occurrence_date_time", "description": "When this request should be actioned, if available.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__occurrence_date_time"]}, "encounter": {"name": "encounter", "description": "Reference to the [encounter](#!/source/source.tamanu.fhir__tamanu.encounters) this service request\nconcerns.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__encounter"]}, "note": {"name": "note", "description": "Any comments made about the request.\n\nFor imaging, this may be orientation notes or other clinically-relevant annotations.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__note"]}, "specimen": {"name": "specimen", "description": "Reference to an optional specimen attachment.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__service_requests__specimen"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in service_requests.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in service_requests.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"service_requests\"", "created_at": 1775621420.4375315, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__service_requests"]}, "source.tamanu.fhir__tamanu.jobs": {"database": "central", "schema": "fhir", "name": "jobs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/jobs.yml", "original_file_path": "../../database/model/fhir/jobs.yml", "unique_id": "source.tamanu.fhir__tamanu.jobs", "fqn": ["tamanu", "fhir__tamanu", "jobs"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "jobs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Job queue for FHIR materialization.\n\nMaterialization for FHIR is handled by jobs issued on a queue (this table) and processed by workers.\nError state is preserved, but successful jobs are discarded.\n\nThe job system was loosely based on <https://gearman.org/>: it supports multiple workers, timeouts,\nconcurrency and uniqueness control, arbitrary payloads, and flexible prioritisation. Differences\ninclude an integer priority instead of (high, normal, low) and the lack of return values.\n\nJob management is done via SQL functions: `job_submit()`, `job_start()`, `job_complete()`,\n`job_fail()`, `job_grab()`. Some additional functions are used for debugging: `job_backlog()`.\n\nThis provides the possibility of decoupling part or whole of the job system from the Tamanu JS/TS\ncodebase, while retaining identical handling.", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in jobs.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "created_at": {"name": "created_at", "description": "When the job was inserted into the queue.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__created_at"]}, "updated_at": {"name": "updated_at", "description": "When the job was updated (mostly due to status changes).", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Unused: successful jobs are hard-deleted instead.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__deleted_at"]}, "priority": {"name": "priority", "description": "Integer priority of the job. Higher numbers win.\n\nThe default is 1000.\n\nConvention is to use hundreds in code (e.g. 1500 for \"higher priority\") and then increase/decrease\nby tens or lower for manual priority management (e.g. 1010 to manually bump some jobs up).", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__priority"]}, "status": {"name": "status", "description": "Lifecycle status of the job.\n\n1. Starts at `Queued`\n2. A worker grabs the job from the backlog, which transitions it to `Grabbed`\n3. The worker starts working the job, transitioning it to `Started`\n4. The worker completes the job, which deletes it from the queue\n5. Or the worker fails the job, which sets its status to `Errored`\n6. Or the worker drops the job, which puts it back into the backlog.\n\nThe backlog is defined as jobs that are `Queued` and/or that are `Grabbed`/`Started` but where the\nrecorded grabbing worker is \"no longer alive\" -- which occurs after a heartbeat timeout. See the\n`fhir.job_workers` table.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__status"]}, "worker_id": {"name": "worker_id", "description": "ID of the worker which has grabbed this job for processing.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__worker_id"]}, "started_at": {"name": "started_at", "description": "Timestamp when the worker started processing the job.\n\nThis may be a while after the job is grabbed, though in general it's pretty immediate.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__started_at"]}, "completed_at": {"name": "completed_at", "description": "When the job was completed.\n\nRarely used as completed jobs are hard-deleted.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__completed_at"]}, "errored_at": {"name": "errored_at", "description": "When the job failed.\n\nThis implies that `status=Errored` and the `error` field is not null.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__errored_at"]}, "error": {"name": "error", "description": "Description or stack trace of the error which caused the job to fail.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__error"]}, "topic": {"name": "topic", "description": "Jobs are organised along topics.\n\nThis is used to route jobs to job handlers.\n\nA worker can choose which topics it will handle, and have different concurrency settings per topic.\n\nIn general it's expected that jobs with the same topic will use similar amounts of resources, and\npresent a fairly uniform workload.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__topic"]}, "discriminant": {"name": "discriminant", "description": "Value used to deduplicate jobs.\n\nBy default this is set to a random value.\n\nIf a job is submitted with the same `discriminant` as a job that's already `Queued`, `Grabbed`,\nor `Started`, the new job will be discarded. This can be used to enforce uniqueness or to prevent\nredundant work.\n\nWhen a job is failed, its discriminant is reset to a random value to avoid forbidding new jobs from\nbeing submitted while keeping the error records around.\n\nTo make code easier discriminants are also enforced to be globally unique within the table, so it's\na good idea to prefix a fixed discriminant with the topic it's for.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__discriminant"]}, "payload": {"name": "payload", "description": "Arbitrary JSONB payload.\n\nThe handlers for a particular topic interpret and enforce the schema of payloads, but the job system\nitself doesn't care.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__jobs__payload"]}}, "meta": {"masking": "truncate", "triggers": ["fhir_jobs_insert_trigger"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["fhir_jobs_insert_trigger"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["fhir_jobs_insert_trigger"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"jobs\"", "created_at": 1775621420.4617193, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__jobs"]}, "source.tamanu.fhir__tamanu.job_workers": {"database": "central", "schema": "fhir", "name": "job_workers", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/job_workers.yml", "original_file_path": "../../database/model/fhir/job_workers.yml", "unique_id": "source.tamanu.fhir__tamanu.job_workers", "fqn": ["tamanu", "fhir__tamanu", "job_workers"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "job_workers", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Worker registry for the FHIR job queue.\n\nSee the `fhir.jobs` table for more.\n\nFor workers to grab jobs from the queue, they first must register. Once a worker has registered, it\nmust \"heartbeat\" regularly by calling `job_worker_heartbeat()`. The recommended heartbeat time is\n1/10th of the timeout, which is defined in the `public.settings` table at\n`key=fhir.worker.assumeDroppedAfter`. A worker may also voluntarily deregister (e.g. during a\ngraceful shutdown).\n\nWhen a worker fails to heartbeat for longer than the timeout, or when it deregisters, it is\nconsidered \"not alive\". Jobs which were grabbed by a dead or no-longer-registered worker are\nconsidered \"dropped\" i.e. back in the pool for other workers to grab.\n\nThis provides a system which is robust against restarts and failures without requiring a central\ndaemon to track and manage worker state, nor persistent connections from the workers (which is how\nGearman works).\n\nThe function `job_worker_garbage_collect()` should be called occasionally (e.g. once a day) to clean\nout the table of dead workers.\n\nWorker management is done via SQL functions: `job_worker_register()`, `job_worker_heartbeat()`,\n`job_worker_deregister()`, `job_worker_garbage_collect()`. Additionally there's the querying\nfunction `job_worker_is_alive()`.\n\nThis provides the possibility of decoupling part or whole of the job system from the Tamanu JS/TS\ncodebase, while retaining identical handling.", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in job_workers.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "created_at": {"name": "created_at", "description": "When the worker registered itself.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__job_workers__created_at"]}, "updated_at": {"name": "updated_at", "description": "Always set to `created_at`.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__job_workers__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Unused: deregistered and dead workers are hard-deleted instead.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__job_workers__deleted_at"]}, "metadata": {"name": "metadata", "description": "Arbitrary debugging information about the worker.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__job_workers__metadata"]}}, "meta": {"masking": "truncate", "triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"job_workers\"", "created_at": 1775621420.4709957, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__job_workers"]}, "source.tamanu.fhir__tamanu.immunizations": {"database": "central", "schema": "fhir", "name": "immunizations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/immunizations.yml", "original_file_path": "../../database/model/fhir/immunizations.yml", "unique_id": "source.tamanu.fhir__tamanu.immunizations", "fqn": ["tamanu", "fhir__tamanu", "immunizations"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "immunizations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about immunization (vaccines).\n\nCurrently this resource is focused around COVID-19 use.\n\nThese are materialised from `public.administered_vaccines`.\n\n<https://www.hl7.org/fhir/immunization.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in immunizations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in immunizations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in immunizations.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in immunizations.", "meta": {}, "data_type": "timestamp without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "status": {"name": "status", "description": "Normalized status code for the vaccination.\n\nTamanu has a larger set of values for vaccine status than FHIR, so a reduced mapping is done. One of:\n\n- completed\n- entered-in-error\n- not-done", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__status"]}, "vaccine_code": {"name": "vaccine_code", "description": "The name of the vaccine drug given, optionally accompanied by a coding for select medicines.\n\nA subset of [the AIRV register](https://www.healthterminologies.gov.au/integration/R4/fhir/ValueSet/australian-immunisation-register-vaccine-1) is supported.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__vaccine_code"]}, "patient": {"name": "patient", "description": "Reference to the [patient](#!/source/source.tamanu.fhir__tamanu.patients) to whom this vaccination\nconcerns.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__patient"]}, "encounter": {"name": "encounter", "description": "Reference to the [encounter](#!/source/source.tamanu.fhir__tamanu.encounters) encompassing this\nvaccination event.\n\nIn Tamanu, vaccinations can be given outside of an open encounter; this is encoded as an encounter\nbeing recorded solely for the one vaccination, and immediately closed.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__encounter"]}, "occurrence_date_time": {"name": "occurrence_date_time", "description": "Timestamp recording when the vaccine was given.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__occurrence_date_time"]}, "lot_number": {"name": "lot_number", "description": "Lot number of the vaccine vial.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__lot_number"]}, "site": {"name": "site", "description": "Body area where the vaccine was given.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__site"]}, "performer": {"name": "performer", "description": "Reference to the [practitioner](#!/source/source.tamanu.fhir__tamanu.users) who administered the\nvaccination.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__performer"]}, "protocol_applied": {"name": "protocol_applied", "description": "Label of the vaccine dose given.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__immunizations__protocol_applied"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in immunizations.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in immunizations.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"immunizations\"", "created_at": 1775621420.4995239, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__immunizations"]}, "source.tamanu.fhir__tamanu.organizations": {"database": "central", "schema": "fhir", "name": "organizations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/organizations.yml", "original_file_path": "../../database/model/fhir/organizations.yml", "unique_id": "source.tamanu.fhir__tamanu.organizations", "fqn": ["tamanu", "fhir__tamanu", "organizations"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "organizations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about organizations.\n\nThese are materialised from `public.facilities`.\n\nThis is mostly a stub resource that other, more clinically relevant, resources reference.\n\n<https://www.hl7.org/fhir/organization.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in organizations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in organizations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in organizations.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in organizations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "identifier": {"name": "identifier", "description": "The facility's code.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__organizations__identifier"]}, "name": {"name": "name", "description": "The facility's name.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__organizations__name"]}, "active": {"name": "active", "description": "Whether the facility is active.\n\nThis is materialised from `visibility_status`.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__organizations__active"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in organizations.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in organizations.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"organizations\"", "created_at": 1775621420.514087, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__organizations"]}, "source.tamanu.fhir__tamanu.practitioners": {"database": "central", "schema": "fhir", "name": "practitioners", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/fhir/practitioners.yml", "original_file_path": "../../database/model/fhir/practitioners.yml", "unique_id": "source.tamanu.fhir__tamanu.practitioners", "fqn": ["tamanu", "fhir__tamanu", "practitioners"], "source_name": "fhir__tamanu", "source_description": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB.", "loader": "", "identifier": "practitioners", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "FHIR data about practitioners.\n\nThese are materialised from `public.users`.\n\nThis is mostly a stub resource that other, more clinically relevant, resources reference.\n\n<https://www.hl7.org/fhir/practitioner.html>", "columns": {"id": {"name": "id", "description": "FHIR resource identifier in practitioners.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__id"]}, "version_id": {"name": "version_id", "description": "FHIR resource version identifier\n\nThis is not currently used in any way. in practitioners.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__version_id"]}, "upstream_id": {"name": "upstream_id", "description": "Identifier of the row in the public schema that is the upstream source of this FHIR resource in practitioners.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__upstream_id"]}, "last_updated": {"name": "last_updated", "description": "Timestamp of when this FHIR resource was last materialised. in practitioners.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__last_updated"]}, "identifier": {"name": "identifier", "description": "One or more identifiers:\n\n- The Tamanu internal UUID for the user\n- The Tamanu Display ID for the user, if present", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__practitioners__identifier"]}, "name": {"name": "name", "description": "The display name of the practitioner.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__practitioners__name"]}, "telecom": {"name": "telecom", "description": "The practitioner's email.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__practitioners__telecom"]}, "is_live": {"name": "is_live", "description": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made. in practitioners.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__is_live"]}, "resolved": {"name": "resolved", "description": "If this FHIR resource has resolved all of its references to other resources. in practitioners.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.fhir__generic__resolved"]}}, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["versioning"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"masking": "truncate", "triggers": ["versioning"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"fhir\".\"practitioners\"", "created_at": 1775621420.5267227, "unrendered_database": null, "unrendered_schema": "fhir", "doc_blocks": ["doc.tamanu.fhir__table__practitioners"]}, "source.tamanu.logs__tamanu.migrations": {"database": "central", "schema": "logs", "name": "migrations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/logs/migrations.yml", "original_file_path": "../../database/model/logs/migrations.yml", "unique_id": "source.tamanu.logs__tamanu.migrations", "fqn": ["tamanu", "logs__tamanu", "migrations"], "source_name": "logs__tamanu", "source_description": "Contains logging tables across different domains.", "loader": "", "identifier": "migrations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This table keeps track of when migrations are run.\n\nThe SequelizeMeta table in the public schema is internal migration state, and\nonly records which migrations are currently applied. This table instead logs\nwhenever migrations are performed, up and down, with additional timing info.", "columns": {"id": {"name": "id", "description": "A randomly generated UUID.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__id"]}, "logged_at": {"name": "logged_at", "description": "The local server time when the migration run happened.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__logged_at"]}, "record_sync_tick": {"name": "record_sync_tick", "description": "TODO", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__record_sync_tick"]}, "device_id": {"name": "device_id", "description": "TODO", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__device_id"]}, "version": {"name": "version", "description": "TODO", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__version"]}, "direction": {"name": "direction", "description": "What kind of migration operation this was (typically `up`).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__direction"]}, "migrations": {"name": "migrations", "description": "The list of migrations applied during this operation.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__migrations__migrations"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in migrations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_migrations_changed", "set_migrations_updated_at", "set_migrations_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_migrations_changed", "set_migrations_updated_at", "set_migrations_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_migrations_changed", "set_migrations_updated_at", "set_migrations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"logs\".\"migrations\"", "created_at": 1775621420.5433183, "unrendered_database": null, "unrendered_schema": "logs", "doc_blocks": ["doc.tamanu.logs__table__migrations"]}, "source.tamanu.logs__tamanu.changes": {"database": "central", "schema": "logs", "name": "changes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/logs/changes.yml", "original_file_path": "../../database/model/logs/changes.yml", "unique_id": "source.tamanu.logs__tamanu.changes", "fqn": ["tamanu", "logs__tamanu", "changes"], "source_name": "logs__tamanu", "source_description": "Contains logging tables across different domains.", "loader": "", "identifier": "changes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Contains a full log of all changes made to the core database records.\n\nThe changes are logged via triggers on source tables. The full row data is\nlogged in this table on every change to every row for every table that's covered.\nThese triggers are applied by Tamanu rather than being hardcoded in migrations.\n\nSome tables are excluded from logging. These are listed in the `NON_LOGGED_TABLES`\nconstant in the database package, and include the sync subsystem and other\ninternal system tables.\n\nNote that changes before this table was put in service will of course not have\nbeen logged.", "columns": {"id": {"name": "id", "description": "The ID of the change log row. UUID", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__id"]}, "table_oid": {"name": "table_oid", "description": "The Postgres OID of the table this change is from.\n\nPostgres OIDs are much more precise than `schema.name`, and are not susceptible\nto search path conflicts, so should be preferred for querying within the same\ndatabase. However, they are not easily relatable from outside the database, so\nthe schema and name fields are also recorded for those uses, plus human readers.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__table_oid"]}, "table_schema": {"name": "table_schema", "description": "The schema (~database namespace) of the table this change is from.\n\nThis will typically be `public`; as of writing tables from other schemas are not\nautomatically logged.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__table_schema"]}, "table_name": {"name": "table_name", "description": "The name of the table this change is from.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__table_name"]}, "logged_at": {"name": "logged_at", "description": "The timestamp this change was logged.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__logged_at"]}, "created_at": {"name": "created_at", "description": "Then sequelize metadata for the records created time", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__created_at"]}, "updated_by_user_id": {"name": "updated_by_user_id", "description": "The value of the `updated_by_user_id` field of the change data.\n\nThis is extracted from the data to make it easier to query on.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__updated_by_user_id"]}, "device_id": {"name": "device_id", "description": "The `device_id` of the user behind the change", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__device_id"]}, "version": {"name": "version", "description": "The Tamanu version at time of change", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__version"]}, "record_id": {"name": "record_id", "description": "The value of the `id` field of the change data.\n\nThis is extracted from the data to make it easier to query on.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__record_id"]}, "record_created_at": {"name": "record_created_at", "description": "The `created_at` metadata from record the changelog was recorded against", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__record_created_at"]}, "record_updated_at": {"name": "record_updated_at", "description": "The `updated_at` metadata from record the changelog was recorded against", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__record_updated_at"]}, "record_deleted_at": {"name": "record_deleted_at", "description": "The `deleted_at` metadata from record the changelog was recorded against", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__record_deleted_at"]}, "record_data": {"name": "record_data", "description": "The full row data of the change.\n\nNote that as this is `JSONB`, some type information may be lost. However, row\ndata in a Tamanu system is transported using JSON via the sync system anyway, so\nit is expected that all data trivially round-trips via JSON.", "meta": {"masking": "empty"}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {"masking": "empty"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__record_data"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in changes.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__generic__updated_at_sync_tick"]}, "reason": {"name": "reason", "description": "A string representing the reason for the change.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__reason"]}, "migration_context": {"name": "migration_context", "description": "Stores a JSON string (as type TEXT) with migration context information\nif the changelog was created from a migration.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__changes__migration_context"]}}, "meta": {"triggers": ["notify_changes_changed", "set_changes_updated_at", "set_changes_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_changes_changed", "set_changes_updated_at", "set_changes_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_changes_changed", "set_changes_updated_at", "set_changes_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"logs\".\"changes\"", "created_at": 1775621420.5786493, "unrendered_database": null, "unrendered_schema": "logs", "doc_blocks": ["doc.tamanu.logs__table__changes"]}, "source.tamanu.logs__tamanu.dhis2_pushes": {"database": "central", "schema": "logs", "name": "dhis2_pushes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/logs/dhis2_pushes.yml", "original_file_path": "../../database/model/logs/dhis2_pushes.yml", "unique_id": "source.tamanu.logs__tamanu.dhis2_pushes", "fqn": ["tamanu", "logs__tamanu", "dhis2_pushes"], "source_name": "logs__tamanu", "source_description": "Contains logging tables across different domains.", "loader": "", "identifier": "dhis2_pushes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Audit logs for DHIS2 integration pushes.\n\nThis table tracks the results of automated pushes of report data to DHIS2 instances.\nThe DHIS2IntegrationProcessor scheduled task processes configured reports and pushes\ntheir data to external DHIS2 systems. Each push attempt is logged here with details\nabout the success/failure status, import counts, and any conflicts encountered.\n\nThe table stores metadata about data synchronization operations including how many\nrecords were imported, updated, ignored, or deleted during each push operation.", "columns": {"id": {"name": "id", "description": "UUID primary key for the push log entry.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when the push log entry was created.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__created_at"]}, "report_id": {"name": "report_id", "description": "The ID of the report that was pushed to DHIS2.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__report_id"]}, "status": {"name": "status", "description": "The status of the push operation: \"success\", \"failure\", or \"warning\".", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__status"]}, "imported": {"name": "imported", "description": "Number of records that were successfully imported to DHIS2.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__imported"]}, "updated": {"name": "updated", "description": "Number of records that were updated in DHIS2.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__updated"]}, "deleted": {"name": "deleted", "description": "Number of records that were deleted from DHIS2.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__deleted"]}, "ignored": {"name": "ignored", "description": "Number of records that were ignored during the push operation.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__ignored"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the push log entry was last updated.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when the push log entry was deleted (soft delete).", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__deleted_at"]}, "conflicts": {"name": "conflicts", "description": "JSON array of conflict details encountered during the push operation.", "meta": {"masking": "text"}, "data_type": "json", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__conflicts"]}, "message": {"name": "message", "description": "Human-readable message describing the result of the push operation.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__dhis2_pushes__message"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"logs\".\"dhis2_pushes\"", "created_at": 1775621420.5897038, "unrendered_database": null, "unrendered_schema": "logs", "doc_blocks": ["doc.tamanu.logs__table__dhis2_pushes"]}, "source.tamanu.logs__tamanu.debug_logs": {"database": "central", "schema": "logs", "name": "debug_logs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/logs/debug_logs.yml", "original_file_path": "../../database/model/logs/debug_logs.yml", "unique_id": "source.tamanu.logs__tamanu.debug_logs", "fqn": ["tamanu", "logs__tamanu", "debug_logs"], "source_name": "logs__tamanu", "source_description": "Contains logging tables across different domains.", "loader": "", "identifier": "debug_logs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Debugging logs stored in the database for easy reporting.\n\nTamanu has an associated tool called [Tamanu Alerts] which runs queries on the Tamanu database to\ndetermine alert conditions, especially for the Sync mechanisms. However, sometimes the information\nnecessary to determine an alert condition lives in logs, not in database tables. In those cases,\nthis table is used.\n\n[Tamanu Alerts]: https://docs.rs/bestool/latest/bestool/__help/tamanu/alerts/struct.AlertsArgs.html", "columns": {"id": {"name": "id", "description": "UUID", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__debug_logs__id"]}, "type": {"name": "type", "description": "Stable classifier for the log message.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__debug_logs__type"]}, "info": {"name": "info", "description": "Arbitrary JSON log message.\n\nNot that unlike typical JSON-based log messages (only top-level string key to scalar value), this\ncan be nested arbitrarily deep, as it can include objects directly from the application.", "meta": {}, "data_type": "json", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__debug_logs__info"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"logs\".\"debug_logs\"", "created_at": 1775621420.602484, "unrendered_database": null, "unrendered_schema": "logs", "doc_blocks": ["doc.tamanu.logs__table__debug_logs"]}, "source.tamanu.logs__tamanu.accesses": {"database": "central", "schema": "logs", "name": "accesses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/logs/accesses.yml", "original_file_path": "../../database/model/logs/accesses.yml", "unique_id": "source.tamanu.logs__tamanu.accesses", "fqn": ["tamanu", "logs__tamanu", "accesses"], "source_name": "logs__tamanu", "source_description": "Contains logging tables across different domains.", "loader": "", "identifier": "accesses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Audit logs for users accessing records", "columns": {"id": {"name": "id", "description": "UUID", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__deleted_at"]}, "user_id": {"name": "user_id", "description": "The user that accessed the records", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__user_id"]}, "record_id": {"name": "record_id", "description": "The ID of the accessed record", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__record_id"]}, "record_type": {"name": "record_type", "description": "The type of record accessed", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__record_type"]}, "facility_id": {"name": "facility_id", "description": "The facility that the record was accessed on", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__facility_id"]}, "session_id": {"name": "session_id", "description": "The user session that the record was accessed on", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__session_id"]}, "device_id": {"name": "device_id", "description": "The id for the device that the user was accessing the record on", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__device_id"]}, "logged_at": {"name": "logged_at", "description": "The time string of when the record was accessed", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__logged_at"]}, "front_end_context": {"name": "front_end_context", "description": "A JSON object containing front end information about the record access", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__front_end_context"]}, "back_end_context": {"name": "back_end_context", "description": "A JSON object containing back end information about the record access", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__back_end_context"]}, "is_mobile": {"name": "is_mobile", "description": "Whether or not the user accessed the record from mobile", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__is_mobile"]}, "version": {"name": "version", "description": "The version of tamanu the record was created on", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__accesses__version"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in accesses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_accesses_changed", "set_accesses_updated_at", "set_accesses_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_accesses_changed", "set_accesses_updated_at", "set_accesses_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_accesses_changed", "set_accesses_updated_at", "set_accesses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"logs\".\"accesses\"", "created_at": 1775621420.6292715, "unrendered_database": null, "unrendered_schema": "logs", "doc_blocks": ["doc.tamanu.logs__table__accesses"]}, "source.tamanu.logs__tamanu.fhir_writes": {"database": "central", "schema": "logs", "name": "fhir_writes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/logs/fhir_writes.yml", "original_file_path": "../../database/model/logs/fhir_writes.yml", "unique_id": "source.tamanu.logs__tamanu.fhir_writes", "fqn": ["tamanu", "logs__tamanu", "fhir_writes"], "source_name": "logs__tamanu", "source_description": "Contains logging tables across different domains.", "loader": "", "identifier": "fhir_writes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Full-request logs of writes (creates and modifies) coming over the FHIR API.\n\nFHIR is an extensive standard and we current support a small subset of it. There's an even tinier\nsubset of that which supports writes instead of just reads and searches. To avoid missing or losing\ndata which we could support accepting as writes in the future, and for development purposes, this\ntable logs the full request bodies for FHIR endpoints. This is not just the endpoints that we\ncurrently support, but all incoming write requests.", "columns": {"id": {"name": "id", "description": "UUID", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__id"]}, "created_at": {"name": "created_at", "description": "When Tamanu received the request.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__created_at"]}, "verb": {"name": "verb", "description": "HTTP verb (GET, POST, etc)", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__verb"]}, "url": {"name": "url", "description": "HTTP URL", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__url"]}, "body": {"name": "body", "description": "Full request body", "meta": {"masking": "empty"}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {"masking": "empty"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__body"]}, "headers": {"name": "headers", "description": "Selected request headers.\n\nSome headers are stripped for sensitivity.", "meta": {"masking": "empty"}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {"masking": "empty"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__headers"]}, "user_id": {"name": "user_id", "description": "The authenticated user for the API request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.logs__fhir_writes__user_id"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"logs\".\"fhir_writes\"", "created_at": 1775621420.6419425, "unrendered_database": null, "unrendered_schema": "logs", "doc_blocks": ["doc.tamanu.logs__table__fhir_writes"]}, "source.tamanu.tamanu.patient_allergies": {"database": "central", "schema": "public", "name": "patient_allergies", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_allergies.yml", "original_file_path": "../../database/model/public/patient_allergies.yml", "unique_id": "source.tamanu.tamanu.patient_allergies", "fqn": ["tamanu", "tamanu", "patient_allergies"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_allergies", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "List of allergies known of the patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Allergies\".\n\nSee also: `public.patient_care_plans`, `public.patient_conditions`,\n`public.patient_family_histories`, `public.patient_issues`.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_allergies.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_allergies.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_allergies.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_allergies.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note": {"name": "note", "description": "Free-form description of this allergy.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__note"]}, "recorded_date": {"name": "recorded_date", "description": "Datetime at which this allergy was recorded.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__recorded_date"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__patient_id"]}, "practitioner_id": {"name": "practitioner_id", "description": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) recording this allergy.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__practitioner_id"]}, "allergy_id": {"name": "allergy_id", "description": "Reference to an allergy ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__allergy_id"]}, "recorded_date_legacy": {"name": "recorded_date_legacy", "description": "[Deprecated] Timestamp at which this allergy was recorded.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__recorded_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_allergies.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "reaction_id": {"name": "reaction_id", "description": "Reference to an allergic reaction ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_allergies__reaction_id"]}}, "meta": {"triggers": ["notify_patient_allergies_changed", "record_patient_allergies_changelog", "set_patient_allergies_updated_at", "set_patient_allergies_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_allergies_changed", "record_patient_allergies_changelog", "set_patient_allergies_updated_at", "set_patient_allergies_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_allergies_changed", "record_patient_allergies_changelog", "set_patient_allergies_updated_at", "set_patient_allergies_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_allergies\"", "created_at": 1775621420.6536307, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_allergies"]}, "source.tamanu.tamanu.triages": {"database": "central", "schema": "public", "name": "triages", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/triages.yml", "original_file_path": "../../database/model/public/triages.yml", "unique_id": "source.tamanu.tamanu.triages", "fqn": ["tamanu", "tamanu", "triages"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "triages", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Triage data of patients waiting in an emergency department.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in triages.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in triages.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in triages.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in triages.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "arrival_time": {"name": "arrival_time", "description": "When the patient arrived.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__arrival_time"]}, "triage_time": {"name": "triage_time", "description": "When the patient was triaged.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__triage_time"]}, "closed_time": {"name": "closed_time", "description": "When the patient was processed.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__closed_time"]}, "score": {"name": "score", "description": "Classification done by the triage practitioner.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__score"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this triage is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__encounter_id"]}, "practitioner_id": {"name": "practitioner_id", "description": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) assigned to this patient.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__practitioner_id"]}, "chief_complaint_id": {"name": "chief_complaint_id", "description": "Reference to the primary complaint ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = triageReason`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__chief_complaint_id"]}, "secondary_complaint_id": {"name": "secondary_complaint_id", "description": "Reference to the secondary complaint ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = triageReason`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__secondary_complaint_id"]}, "arrival_time_legacy": {"name": "arrival_time_legacy", "description": "[Deprecated] When the patient arrived.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__arrival_time_legacy"]}, "triage_time_legacy": {"name": "triage_time_legacy", "description": "[Deprecated] When the patient was triaged.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__triage_time_legacy"]}, "closed_time_legacy": {"name": "closed_time_legacy", "description": "[Deprecated] When the patient was processed.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__closed_time_legacy"]}, "arrival_mode_id": {"name": "arrival_mode_id", "description": "Reference to how the patient arrived ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = arrivalMode`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.triages__arrival_mode_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in triages.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_triages_changed", "record_triages_changelog", "set_triages_updated_at", "set_triages_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_triages_changed", "record_triages_changelog", "set_triages_updated_at", "set_triages_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_triages_changed", "record_triages_changelog", "set_triages_updated_at", "set_triages_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"triages\"", "created_at": 1775621420.6930668, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__triages"]}, "source.tamanu.tamanu.imaging_area_external_codes": {"database": "central", "schema": "public", "name": "imaging_area_external_codes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/imaging_area_external_codes.yml", "original_file_path": "../../database/model/public/imaging_area_external_codes.yml", "unique_id": "source.tamanu.tamanu.imaging_area_external_codes", "fqn": ["tamanu", "tamanu", "imaging_area_external_codes"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "imaging_area_external_codes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "External codes for imaging areas (such as for [PACS](https://en.wikipedia.org/wiki/Picture_archiving_and_communication_system)).\n\nImaging areas are stored in [Reference Data](#!/source/source.tamanu.tamanu.reference_data), this\ntable adds additional (external) codes.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in imaging_area_external_codes.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in imaging_area_external_codes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in imaging_area_external_codes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in imaging_area_external_codes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in imaging_area_external_codes.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "area_id": {"name": "area_id", "description": "Reference to the imaging area ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_area_external_codes__area_id"]}, "code": {"name": "code", "description": "External code.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_area_external_codes__code"]}, "description": {"name": "description", "description": "Human-friendly description for the area/code.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_area_external_codes__description"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in imaging_area_external_codes.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_imaging_area_external_codes_changed", "record_imaging_area_external_codes_changelog", "set_imaging_area_external_codes_updated_at", "set_imaging_area_external_codes_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_imaging_area_external_codes_changed", "record_imaging_area_external_codes_changelog", "set_imaging_area_external_codes_updated_at", "set_imaging_area_external_codes_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_imaging_area_external_codes_changed", "record_imaging_area_external_codes_changelog", "set_imaging_area_external_codes_updated_at", "set_imaging_area_external_codes_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"imaging_area_external_codes\"", "created_at": 1775621420.71483, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__imaging_area_external_codes"]}, "source.tamanu.tamanu.socket_io_attachments": {"database": "central", "schema": "public", "name": "socket_io_attachments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/socket_io_attachments.yml", "original_file_path": "../../database/model/public/socket_io_attachments.yml", "unique_id": "source.tamanu.tamanu.socket_io_attachments", "fqn": ["tamanu", "tamanu", "socket_io_attachments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "socket_io_attachments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table used by Socket.IO to synchronise WebSocket sessions across server replicas.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in socket_io_attachments.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in socket_io_attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "payload": {"name": "payload", "description": "Payload.", "meta": {}, "data_type": "bytea", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.socket_io_attachments__payload"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in socket_io_attachments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"masking": "truncate", "triggers": ["notify_socket_io_attachments_changed", "record_socket_io_attachments_changelog", "set_socket_io_attachments_updated_at", "set_socket_io_attachments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": ["notify_socket_io_attachments_changed", "record_socket_io_attachments_changelog", "set_socket_io_attachments_updated_at", "set_socket_io_attachments_updated_at_sync_tick"]}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"masking": "truncate", "triggers": ["notify_socket_io_attachments_changed", "record_socket_io_attachments_changelog", "set_socket_io_attachments_updated_at", "set_socket_io_attachments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"socket_io_attachments\"", "created_at": 1775621420.720858, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__socket_io_attachments"]}, "source.tamanu.tamanu.report_definitions": {"database": "central", "schema": "public", "name": "report_definitions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/report_definitions.yml", "original_file_path": "../../database/model/public/report_definitions.yml", "unique_id": "source.tamanu.tamanu.report_definitions", "fqn": ["tamanu", "tamanu", "report_definitions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "report_definitions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A name for a report.\n\nThis is what you see when selecting a report to generate in Tamanu.\n\nThe actual data is in [versions](#!/source/source.tamanu.tamanu.report_definition_versions).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in report_definitions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in report_definitions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in report_definitions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in report_definitions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Human-friendly name of the report.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definitions__name"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in report_definitions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "db_schema": {"name": "db_schema", "description": "The name of the database schema (namespace) which is queried.\n\nDefaults to `reporting`, which are standardised and normalised views designed specifically for\nreporting; sometimes this is set to `public` to query the raw database directly.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definitions__db_schema"]}}, "meta": {"triggers": ["notify_report_definitions_changed", "record_report_definitions_changelog", "set_report_definitions_updated_at", "set_report_definitions_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_report_definitions_changed", "record_report_definitions_changelog", "set_report_definitions_updated_at", "set_report_definitions_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_report_definitions_changed", "record_report_definitions_changelog", "set_report_definitions_updated_at", "set_report_definitions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"report_definitions\"", "created_at": 1775621420.7317913, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__report_definitions"]}, "source.tamanu.tamanu.one_time_logins": {"database": "central", "schema": "public", "name": "one_time_logins", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/one_time_logins.yml", "original_file_path": "../../database/model/public/one_time_logins.yml", "unique_id": "source.tamanu.tamanu.one_time_logins", "fqn": ["tamanu", "tamanu", "one_time_logins"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "one_time_logins", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "One time logins are used for password resets.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in one_time_logins.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users) for whom this one time login is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.one_time_logins__user_id"]}, "token": {"name": "token", "description": "A random value to use as the login code.\n\nThis is sent to the user in an email and then entered in a form to reset their password.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.one_time_logins__token"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in one_time_logins.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in one_time_logins.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in one_time_logins.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "expires_at": {"name": "expires_at", "description": "Beyond this time, the one time login can no longer be used.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.one_time_logins__expires_at"]}, "used_at": {"name": "used_at", "description": "When this token was used.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.one_time_logins__used_at"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"one_time_logins\"", "created_at": 1775621420.7470767, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__one_time_logins"]}, "source.tamanu.tamanu.invoice_price_lists": {"database": "central", "schema": "public", "name": "invoice_price_lists", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_price_lists.yml", "original_file_path": "../../database/model/public/invoice_price_lists.yml", "unique_id": "source.tamanu.tamanu.invoice_price_lists", "fqn": ["tamanu", "tamanu", "invoice_price_lists"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_price_lists", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Contains price list definitions used for invoice line item pricing. Each price list represents a set of pricing rules that can be applied to different types of invoices, patients, or services.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_price_lists.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_price_lists.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_price_lists.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_price_lists.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_price_lists.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "code": {"name": "code", "description": "Unique identifier code for the price list. Used for referencing the price list in business logic and integrations.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_lists__code"]}, "name": {"name": "name", "description": "Human-readable name of the price list, displayed in user interfaces and reports.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_lists__name"]}, "rules": {"name": "rules", "description": "JSON configuration containing the pricing rules and logic for this price list. Defines how prices are calculated or retrieved for invoice line items.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_lists__rules"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in invoice_price_lists.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}}, "meta": {"triggers": ["notify_invoice_price_lists_changed", "record_invoice_price_lists_changelog", "set_invoice_price_lists_updated_at", "set_invoice_price_lists_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_price_lists_changed", "record_invoice_price_lists_changelog", "set_invoice_price_lists_updated_at", "set_invoice_price_lists_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_invoice_price_lists_changed", "record_invoice_price_lists_changelog", "set_invoice_price_lists_updated_at", "set_invoice_price_lists_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_price_lists\"", "created_at": 1775621420.7598007, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_price_lists"]}, "source.tamanu.tamanu.patient_contacts": {"database": "central", "schema": "public", "name": "patient_contacts", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_contacts.yml", "original_file_path": "../../database/model/public/patient_contacts.yml", "unique_id": "source.tamanu.tamanu.patient_contacts", "fqn": ["tamanu", "tamanu", "patient_contacts"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_contacts", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Describes how a patient may be contacted, via email, SMS, or IM apps.\n\nAt present, this is used for:\n- display in the application (all methods)\n- emailing the patient (`method=Email`)\n- sending Telegram reminders for appointments (`method=Telegram`)", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_contacts.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_contacts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_contacts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_contacts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Free-form name of the contact method.\n\nThis could be the name of the patient, or a relationship if the contact method is via another person\n(e.g. `Spouse`, `Parent`, `Caregiver`), or a logical keyword if multiple contacts of the same method\nare provided (e.g. `Main`, `Primary`, `Work`, `Home`), etc.", "meta": {"masking": "name"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_contacts__name"]}, "method": {"name": "method", "description": "What application the contact uses:\n- `Email`\n- `Sms`\n- `WhatsApp`\n- `Telegram`", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_contacts__method"]}, "connection_details": {"name": "connection_details", "description": "JSON structure containing the details of the contact.\n\nIts schema varies based on the `method`.", "meta": {"masking": "empty"}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {"masking": "empty"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_contacts__connection_details"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_contacts__patient_id"]}, "relationship_id": {"name": "relationship_id", "description": "If the contact method is via another person.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_contacts__relationship_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_contacts.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"js_class": "PatientContact", "triggers": ["notify_patient_contacts_changed", "record_patient_contacts_changelog", "set_patient_contacts_updated_at", "set_patient_contacts_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["patient"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientContact", "triggers": ["notify_patient_contacts_changed", "record_patient_contacts_changelog", "set_patient_contacts_updated_at", "set_patient_contacts_updated_at_sync_tick"]}, "tags": ["patient"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["patient"], "meta": {"js_class": "PatientContact", "triggers": ["notify_patient_contacts_changed", "record_patient_contacts_changelog", "set_patient_contacts_updated_at", "set_patient_contacts_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_contacts\"", "created_at": 1775621420.7929528, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_contacts"]}, "source.tamanu.tamanu.certificate_notifications": {"database": "central", "schema": "public", "name": "certificate_notifications", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/certificate_notifications.yml", "original_file_path": "../../database/model/public/certificate_notifications.yml", "unique_id": "source.tamanu.tamanu.certificate_notifications", "fqn": ["tamanu", "tamanu", "certificate_notifications"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "certificate_notifications", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Various medical certificates being sent to patients.\n\nThese rows are processed by the `CertificateNotificationProcessor` scheduled task, and generate a\n[`patient_communications`](#!/source/source.tamanu.tamanu.patient_communications) row.\n\nThe actual certificate itself is stored separately on the filesystem while it's generated.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in certificate_notifications.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in certificate_notifications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in certificate_notifications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in certificate_notifications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "type": {"name": "type", "description": "Type of certificate being generated.\n\nThis dictates both from which resource the certificate is generated, and also the template being\nused for generating the certificate itself.\n\nOne of:\n- `covid_19_clearance`\n- `vaccination_certificate`\n- `icao.test`\n- `icao.vacc`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__type"]}, "patient_id": {"name": "patient_id", "description": "Reference to a [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__patient_id"]}, "forward_address": {"name": "forward_address", "description": "An email address to send the generated certificate to.", "meta": {"masking": "email"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "email"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__forward_address"]}, "lab_test_id": {"name": "lab_test_id", "description": "The [lab test](#!/source/source.tamanu.tamanu.lab_tests) this certificate is for, if applicable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__lab_test_id"]}, "status": {"name": "status", "description": "Processing status.\n\nOne of:\n- `Queued`\n- `Processed`\n- `Error`\n- `Ignore`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__status"]}, "error": {"name": "error", "description": "If the certificate generation fails, this is the error.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__error"]}, "created_by": {"name": "created_by", "description": "The name of the user who initiated the creation of this certificate.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__created_by"]}, "lab_request_id": {"name": "lab_request_id", "description": "The [lab request](#!/source/source.tamanu.tamanu.lab_requests) this certificate is for, if applicable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__lab_request_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in certificate_notifications.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "printed_date": {"name": "printed_date", "description": "When this certificate was printed, if applicable.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__printed_date"]}, "facility_name": {"name": "facility_name", "description": "The name of the facility where the creation of this certificate was initiated.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__facility_name"]}, "language": {"name": "language", "description": "Used to translate the certificate.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certificate_notifications__language"]}}, "meta": {"triggers": ["notify_certificate_notifications_changed", "record_certificate_notifications_changelog", "set_certificate_notifications_updated_at", "set_certificate_notifications_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_certificate_notifications_changed", "record_certificate_notifications_changelog", "set_certificate_notifications_updated_at", "set_certificate_notifications_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_certificate_notifications_changed", "record_certificate_notifications_changelog", "set_certificate_notifications_updated_at", "set_certificate_notifications_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"certificate_notifications\"", "created_at": 1775621420.8291485, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__certificate_notifications"]}, "source.tamanu.tamanu.medication_administration_records": {"database": "central", "schema": "public", "name": "medication_administration_records", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/medication_administration_records.yml", "original_file_path": "../../database/model/public/medication_administration_records.yml", "unique_id": "source.tamanu.tamanu.medication_administration_records", "fqn": ["tamanu", "tamanu", "medication_administration_records"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "medication_administration_records", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records of medication administrations to patients, tracking when medications prescribed in the system were given, not given, or otherwise administered.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in medication_administration_records.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "status": {"name": "status", "description": "Status of the medication administration.\n\nOne of:\n- `GIVEN` - The medication was administered to the patient\n- `NOT_GIVEN` - The medication was not administered to the patient", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__status"]}, "due_at": {"name": "due_at", "description": "The scheduled date and time when the medication administration was planned to occur, based on the prescription's frequency and start date.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__due_at"]}, "recorded_at": {"name": "recorded_at", "description": "The timestamp indicating when the administration status (e.g., `GIVEN` or `NOT_GIVEN`) was actually recorded in the system. May be null if the status has not yet been recorded.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__recorded_at"]}, "recorded_by_user_id": {"name": "recorded_by_user_id", "description": "Reference to the [user](#!/model/model.public.users) who recorded that the medication was given or not given.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__recorded_by_user_id"]}, "prescription_id": {"name": "prescription_id", "description": "Reference to the [prescription](#!/source/source.tamanu.tamanu.prescriptions) that this administration record is associated with. Links this administration event to the specific medication order it fulfills.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__prescription_id"]}, "is_auto_generated": {"name": "is_auto_generated", "description": "Indicates whether this administration record was automatically generated by the system based on the prescription's frequency and schedule. This is typically true for scheduled medications and false for one-time or as-needed medications.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__is_auto_generated"]}, "changing_status_reason": {"name": "changing_status_reason", "description": "Optional free text field that allows healthcare professionals to document the reason for changing the status of a medication administration record. This is particularly useful when changing a previously recorded status to a different one.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__changing_status_reason"]}, "reason_not_given_id": {"name": "reason_not_given_id", "description": "Reference to the reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why the medication was not administered to the patient. Only applicable when status is `NOT_GIVEN`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__reason_not_given_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in medication_administration_records.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in medication_administration_records.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in medication_administration_records.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in medication_administration_records.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_error": {"name": "is_error", "description": "Indicates whether this medication administration record is marked as error.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__is_error"]}, "error_notes": {"name": "error_notes", "description": "Detailed description of any errors or discrepancies associated with this medication administration record.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__error_notes"]}, "changing_not_given_info_reason": {"name": "changing_not_given_info_reason", "description": "Optional free text field that allows healthcare professionals to document the reason for modifying information about why a medication was not given. This is used when updating or changing the details of a previously recorded 'not given' status, providing an audit trail of why the information was changed.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__changing_not_given_info_reason"]}, "is_edited": {"name": "is_edited", "description": "Indicates whether this medication administration record has been manually edited after its initial creation or recording.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_records__is_edited"]}}, "meta": {"triggers": ["notify_medication_administration_records_changed", "record_medication_administration_records_changelog", "set_medication_administration_records_updated_at", "set_medication_administration_records_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_medication_administration_records_changed", "record_medication_administration_records_changelog", "set_medication_administration_records_updated_at", "set_medication_administration_records_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_medication_administration_records_changed", "record_medication_administration_records_changelog", "set_medication_administration_records_updated_at", "set_medication_administration_records_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"medication_administration_records\"", "created_at": 1775621420.8495493, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__medication_administration_records"]}, "source.tamanu.tamanu.templates": {"database": "central", "schema": "public", "name": "templates", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/templates.yml", "original_file_path": "../../database/model/public/templates.yml", "unique_id": "source.tamanu.tamanu.templates", "fqn": ["tamanu", "tamanu", "templates"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "templates", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Templates used for patient letters and clinical notes etc.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in templates.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "name": {"name": "name", "description": "Internal name of the template (used when importing).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.templates__name"]}, "date_created": {"name": "date_created", "description": "When the template was created.", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.templates__date_created"]}, "title": {"name": "title", "description": "Title of the template (which will be rendered).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.templates__title"]}, "body": {"name": "body", "description": "Body of the template (which will be rendered).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.templates__body"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in templates.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "created_by_id": {"name": "created_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who created this template.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.templates__created_by_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in templates.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "type": {"name": "type", "description": "Type of the template (referred to in code).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.templates__type"]}}, "meta": {"triggers": ["notify_templates_changed", "record_templates_changelog", "set_templates_updated_at", "set_templates_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_templates_changed", "record_templates_changelog", "set_templates_updated_at", "set_templates_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_templates_changed", "record_templates_changelog", "set_templates_updated_at", "set_templates_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"templates\"", "created_at": 1775621420.8641708, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__templates"]}, "source.tamanu.tamanu.program_registry_condition_categories": {"database": "central", "schema": "public", "name": "program_registry_condition_categories", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/program_registry_condition_categories.yml", "original_file_path": "../../database/model/public/program_registry_condition_categories.yml", "unique_id": "source.tamanu.tamanu.program_registry_condition_categories", "fqn": ["tamanu", "tamanu", "program_registry_condition_categories"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "program_registry_condition_categories", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Categories to be set against patient program registry conditions. The categories are configured through the program importer for each program registry. There is a hard-loaded list that is seeded by default in the database for each program registry.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in program_registry_condition_categories.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in program_registry_condition_categories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in program_registry_condition_categories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in program_registry_condition_categories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "The code for the category.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_condition_categories__code"]}, "name": {"name": "name", "description": "The name for the category.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_condition_categories__name"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in program_registry_condition_categories.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "program_registry_id": {"name": "program_registry_id", "description": "The id of the program registry.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_condition_categories__program_registry_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in program_registry_condition_categories.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_program_registry_condition_categories_changed", "record_program_registry_condition_categories_changelog", "set_program_registry_condition_categories_updated_at", "set_program_registry_condition_categories_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_program_registry_condition_categories_changed", "record_program_registry_condition_categories_changelog", "set_program_registry_condition_categories_updated_at", "set_program_registry_condition_categories_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_program_registry_condition_categories_changed", "record_program_registry_condition_categories_changelog", "set_program_registry_condition_categories_updated_at", "set_program_registry_condition_categories_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"program_registry_condition_categories\"", "created_at": 1775621420.8787158, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__program_registry_condition_categories"]}, "source.tamanu.tamanu.procedure_survey_responses": {"database": "central", "schema": "public", "name": "procedure_survey_responses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/procedure_survey_responses.yml", "original_file_path": "../../database/model/public/procedure_survey_responses.yml", "unique_id": "source.tamanu.tamanu.procedure_survey_responses", "fqn": ["tamanu", "tamanu", "procedure_survey_responses"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "procedure_survey_responses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Junction table linking procedures to their associated survey responses.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in procedure_survey_responses.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "procedure_id": {"name": "procedure_id", "description": "Reference to the [procedure](#!/source/source.tamanu.tamanu.procedures) this survey response is associated with.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedure_survey_responses__procedure_id"]}, "survey_response_id": {"name": "survey_response_id", "description": "Reference to the [survey response](#!/source/source.tamanu.tamanu.survey_responses) linked to the procedure.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedure_survey_responses__survey_response_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in procedure_survey_responses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in procedure_survey_responses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in procedure_survey_responses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in procedure_survey_responses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_procedure_survey_responses_changed", "record_procedure_survey_responses_changelog", "set_procedure_survey_responses_updated_at", "set_procedure_survey_responses_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_procedure_survey_responses_changed", "record_procedure_survey_responses_changelog", "set_procedure_survey_responses_updated_at", "set_procedure_survey_responses_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_procedure_survey_responses_changed", "record_procedure_survey_responses_changelog", "set_procedure_survey_responses_updated_at", "set_procedure_survey_responses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"procedure_survey_responses\"", "created_at": 1775621420.8914313, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__procedure_survey_responses"]}, "source.tamanu.tamanu.pharmacy_order_prescriptions": {"database": "central", "schema": "public", "name": "pharmacy_order_prescriptions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/pharmacy_order_prescriptions.yml", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.yml", "unique_id": "source.tamanu.tamanu.pharmacy_order_prescriptions", "fqn": ["tamanu", "tamanu", "pharmacy_order_prescriptions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "pharmacy_order_prescriptions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Individual prescriptions that are included in a [pharmacy_order](#!/source/source.tamanu.tamanu.pharmacy_orders).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in pharmacy_order_prescriptions.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "pharmacy_order_id": {"name": "pharmacy_order_id", "description": "Reference to the [pharmacy_order](#!/source/source.tamanu.tamanu.pharmacy_orders).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__pharmacy_order_id"]}, "prescription_id": {"name": "prescription_id", "description": "Reference to the [prescription](#!/source/source.tamanu.tamanu.prescriptions).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__prescription_id"]}, "ongoing_prescription_id": {"name": "ongoing_prescription_id", "description": "When this pharmacy order prescription was created from an ongoing prescription (send to pharmacy flow), references the ongoing [prescription](#!/source/source.tamanu.tamanu.prescriptions). Null for encounter-based pharmacy orders.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__ongoing_prescription_id"]}, "display_id": {"name": "display_id", "description": "Human-readable request number for this prescription order. A new request number is generated each time a prescription is sent to pharmacy.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__display_id"]}, "quantity": {"name": "quantity", "description": "Quantity of medication ordered.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__quantity"]}, "repeats": {"name": "repeats", "description": "Number of repeats for the prescription.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__repeats"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in pharmacy_order_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in pharmacy_order_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in pharmacy_order_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "is_completed": {"name": "is_completed", "description": "Indicates whether this prescription has been fully completed. Set to `true` when all repeats have been dispensed for a discharge prescription (outpatient medication). Used to filter completed prescriptions from active medication request lists.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_order_prescriptions__is_completed"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in pharmacy_order_prescriptions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_pharmacy_order_prescriptions_changed", "record_pharmacy_order_prescriptions_changelog", "set_pharmacy_order_prescriptions_updated_at", "set_pharmacy_order_prescriptions_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_pharmacy_order_prescriptions_changed", "record_pharmacy_order_prescriptions_changelog", "set_pharmacy_order_prescriptions_updated_at", "set_pharmacy_order_prescriptions_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_pharmacy_order_prescriptions_changed", "record_pharmacy_order_prescriptions_changelog", "set_pharmacy_order_prescriptions_updated_at", "set_pharmacy_order_prescriptions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"pharmacy_order_prescriptions\"", "created_at": 1775621420.907712, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__pharmacy_order_prescriptions"]}, "source.tamanu.tamanu.location_groups": {"database": "central", "schema": "public", "name": "location_groups", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/location_groups.yml", "original_file_path": "../../database/model/public/location_groups.yml", "unique_id": "source.tamanu.tamanu.location_groups", "fqn": ["tamanu", "tamanu", "location_groups"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "location_groups", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A group of locations managed as a single unit (e.g. a ward in hospital)", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in location_groups.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in location_groups.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in location_groups.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in location_groups.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in location_groups.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "name": {"name": "name", "description": "Full readable name for location group", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_groups__name"]}, "code": {"name": "code", "description": "Code for location group", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_groups__code"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this location group is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_groups__facility_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in location_groups.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_bookable": {"name": "is_bookable", "description": "Controls whether and where this location group appears in the booking calendar:  \n- `all`: shown on both views  \n- `weekly`: shown only on weekly view\n- `daily`: shown only on daily view\n- `no`: hidden from calendar (default)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_groups__is_bookable"]}}, "meta": {"triggers": ["notify_location_groups_changed", "record_location_groups_changelog", "set_location_groups_updated_at", "set_location_groups_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_location_groups_changed", "record_location_groups_changelog", "set_location_groups_updated_at", "set_location_groups_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_location_groups_changed", "record_location_groups_changelog", "set_location_groups_updated_at", "set_location_groups_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"location_groups\"", "created_at": 1775621420.9347324, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__location_groups"]}, "source.tamanu.tamanu.invoice_products": {"database": "central", "schema": "public", "name": "invoice_products", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_products.yml", "original_file_path": "../../database/model/public/invoice_products.yml", "unique_id": "source.tamanu.tamanu.invoice_products", "fqn": ["tamanu", "tamanu", "invoice_products"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_products", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Products which can be invoiced.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_products.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "name": {"name": "name", "description": "Name of the product.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_products__name"]}, "insurable": {"name": "insurable", "description": "Whether or not discounts can be applied to a product", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_products__insurable"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_products.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_products.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_products.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in invoice_products.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_products.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "category": {"name": "category", "description": "The category of the product.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_products__category"]}, "source_record_type": {"name": "source_record_type", "description": "The underlying database model of the source record for the product.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_products__source_record_type"]}, "source_record_id": {"name": "source_record_id", "description": "The id of the source record for the product.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_products__source_record_id"]}}, "meta": {"triggers": ["notify_invoice_products_changed", "record_invoice_products_changelog", "set_invoice_products_updated_at", "set_invoice_products_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_products_changed", "record_invoice_products_changelog", "set_invoice_products_updated_at", "set_invoice_products_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_invoice_products_changed", "record_invoice_products_changelog", "set_invoice_products_updated_at", "set_invoice_products_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_products\"", "created_at": 1775621420.948254, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_products"]}, "source.tamanu.tamanu.certifiable_vaccines": {"database": "central", "schema": "public", "name": "certifiable_vaccines", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/certifiable_vaccines.yml", "original_file_path": "../../database/model/public/certifiable_vaccines.yml", "unique_id": "source.tamanu.tamanu.certifiable_vaccines", "fqn": ["tamanu", "tamanu", "certifiable_vaccines"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "certifiable_vaccines", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of scheduled vaccines which are eligible for inclusion in COVID-19 vaccine certificates.\n\nThis table signals which vaccines may be included in the COVID-19 vaccine certificate printout.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in certifiable_vaccines.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in certifiable_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in certifiable_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in certifiable_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "vaccine_id": {"name": "vaccine_id", "description": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data) (`type=vaccine`)\nfor the vaccine drug.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__vaccine_id"]}, "manufacturer_id": {"name": "manufacturer_id", "description": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data) (`type=manufacturer`)\nfor the organisation that manufactured the drug.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__manufacturer_id"]}, "icd11_drug_code": {"name": "icd11_drug_code", "description": "Free-text for the ICD11 code for the drug.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__icd11_drug_code"]}, "icd11_disease_code": {"name": "icd11_disease_code", "description": "Free-text for the ICD11 code for the disease targeted by the drug.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__icd11_disease_code"]}, "vaccine_code": {"name": "vaccine_code", "description": "SNOMED CT or ATC code for the vaccine type.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__vaccine_code"]}, "target_code": {"name": "target_code", "description": "SNOMED CT or ATC code for targeted disease.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__target_code"]}, "eu_product_code": {"name": "eu_product_code", "description": "EU authorisation code for the vaccine product.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__eu_product_code"]}, "maximum_dosage": {"name": "maximum_dosage", "description": "Maximum number of doses. Defaults to 1.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.certifiable_vaccines__maximum_dosage"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in certifiable_vaccines.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_certifiable_vaccines_changed", "record_certifiable_vaccines_changelog", "set_certifiable_vaccines_updated_at", "set_certifiable_vaccines_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_certifiable_vaccines_changed", "record_certifiable_vaccines_changelog", "set_certifiable_vaccines_updated_at", "set_certifiable_vaccines_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_certifiable_vaccines_changed", "record_certifiable_vaccines_changelog", "set_certifiable_vaccines_updated_at", "set_certifiable_vaccines_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"certifiable_vaccines\"", "created_at": 1775621420.9795332, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__certifiable_vaccines"]}, "source.tamanu.tamanu.task_designations": {"database": "central", "schema": "public", "name": "task_designations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/task_designations.yml", "original_file_path": "../../database/model/public/task_designations.yml", "unique_id": "source.tamanu.tamanu.task_designations", "fqn": ["tamanu", "tamanu", "task_designations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "task_designations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association of designation to task.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in task_designations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "task_id": {"name": "task_id", "description": "The designation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_designations__task_id"]}, "designation_id": {"name": "designation_id", "description": "The task [task](#!/source/source.tamanu.tamanu.tasks)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_designations__designation_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in task_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in task_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in task_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in task_designations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_task_designations_changed", "record_task_designations_changelog", "set_task_designations_updated_at", "set_task_designations_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_task_designations_changed", "record_task_designations_changelog", "set_task_designations_updated_at", "set_task_designations_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_task_designations_changed", "record_task_designations_changelog", "set_task_designations_updated_at", "set_task_designations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"task_designations\"", "created_at": 1775621420.9924433, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__task_designations"]}, "source.tamanu.tamanu.appointment_schedules": {"database": "central", "schema": "public", "name": "appointment_schedules", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/appointment_schedules.yml", "original_file_path": "../../database/model/public/appointment_schedules.yml", "unique_id": "source.tamanu.tamanu.appointment_schedules", "fqn": ["tamanu", "tamanu", "appointment_schedules"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "appointment_schedules", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Defines recurrence rules for appointments.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in appointment_schedules.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "until_date": {"name": "until_date", "description": "The end date for the recurrence. No occurrences will be generated beyond this date. \nBoth `until_date` and `occurrence_count` cannot be null at the same time to ensure the recurrence has an end condition.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__until_date"]}, "interval": {"name": "interval", "description": "The recurrence interval. For example:\n- For a `frequency` of `WEEKLY`, an `interval` of 1 means \"Once a week.\"\n- For a `frequency` of `MONTHLY`, an `interval` of 3 means \"Every 3 months.\"", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__interval"]}, "frequency": {"name": "frequency", "description": "How often the the recurrence occurs.\n\nOne of:\n- `WEEKLY`\n- `MONTHLY`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__frequency"]}, "days_of_week": {"name": "days_of_week", "description": "Stores an array of ISO weekday abbreviations. \nGiven `WEEKLY` frequency `days_of_week` determines the weekday that the repeated appointment occurs on. \nGiven `MONTHLY` frequency `days_of_week` is combined with `nth_weekday` to determine the date in each month that the repeated appointment occurs on.\n\nOne of: \n- `MO`\n- `TU`\n- `WE`\n- `TH`\n- `FR`\n- `SA`\n- `SU`", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__days_of_week"]}, "nth_weekday": {"name": "nth_weekday", "description": "Ordinal weekday for monthly recurrence interpreted with `days_of_week` for example:\n- `1` with `days_of_week = ['MO']` =  First Monday of the month\n- `2` with `days_of_week = ['TU']` =  Second Tuesday of the month\n- `-1` with `days_of_week = ['FR']` = Last Friday of the month", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__nth_weekday"]}, "occurrence_count": {"name": "occurrence_count", "description": "When this value is set, the recurrence ends after generating the specified number of occurrences\nAt least one of `occurrence_count` or `until_date` must be set.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__occurrence_count"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in appointment_schedules.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in appointment_schedules.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in appointment_schedules.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in appointment_schedules.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_fully_generated": {"name": "is_fully_generated", "description": "Whether or not all repeating appointments have been created for a schedule", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__is_fully_generated"]}, "generated_until_date": {"name": "generated_until_date", "description": "The date of the most recent appointment in a schedule, this is set after generation of the repeated appointment and then updated if it is necessary to generate further appointments.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__generated_until_date"]}, "cancelled_at_date": {"name": "cancelled_at_date", "description": "The date from which appointments in a schedule have been cancelled, this is set when cancelling 'this and all future appointments'.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_schedules__cancelled_at_date"]}}, "meta": {"triggers": ["notify_appointment_schedules_changed", "record_appointment_schedules_changelog", "set_appointment_schedules_updated_at", "set_appointment_schedules_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_appointment_schedules_changed", "record_appointment_schedules_changelog", "set_appointment_schedules_updated_at", "set_appointment_schedules_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_appointment_schedules_changed", "record_appointment_schedules_changelog", "set_appointment_schedules_updated_at", "set_appointment_schedules_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"appointment_schedules\"", "created_at": 1775621421.0069718, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__appointment_schedules"]}, "source.tamanu.tamanu.scheduled_vaccines": {"database": "central", "schema": "public", "name": "scheduled_vaccines", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/scheduled_vaccines.yml", "original_file_path": "../../database/model/public/scheduled_vaccines.yml", "unique_id": "source.tamanu.tamanu.scheduled_vaccines", "fqn": ["tamanu", "tamanu", "scheduled_vaccines"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "scheduled_vaccines", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A vaccine schedule listing all vaccines expected to be given to a child as part of a country wide Expanded Program of \nImmunisation can be incorporated into Tamanu to show each dose and due date on the front end of the system. \n\nFirst dose of a vaccine should use `weeks_from_birth_due` whilst subsequent doses should use \n`weeks_from_last_vaccination_due`.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in scheduled_vaccines.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in scheduled_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in scheduled_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in scheduled_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "category": {"name": "category", "description": "Vaccine category [Routine, Catch-up, Campaign, Other]", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__category"]}, "label": {"name": "label", "description": "Contents of the label column is what will be displayed on the front end of Tamanu \nunder fields labelled 'Vaccine'. This is where the vaccine name is listed. E.g. 'BCG'.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__label"]}, "dose_label": {"name": "dose_label", "description": "Dose label indicates what will appear on the front end of Tamanu re when the dose is due. It can be a time in a child's \nlife (e.g. 'Birth', '6 weeks') or a dose of vaccine (e.g. 'Dose 1', 'Dose 2')", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__dose_label"]}, "weeks_from_birth_due": {"name": "weeks_from_birth_due", "description": "This column is used to tell Tamanu how many weeks from the child's date of birth a vaccine is due. This will populate \nthe front end within the Vaccine schedule section in the column 'Due date'. For a vaccine to appear in the Vaccine \nschedule a dose must have a `weeksFromBirthDue` entered into the reference data. \n\nThis field should be used only for the first dose of the vaccine. Subsequent doses should use \n`weeks_from_last_vaccination_due`", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__weeks_from_birth_due"]}, "index": {"name": "index", "description": "This column is used to show when a second dose is due in relation to the first dose. For example, if dose 1 is due at 6 \nweeks and dose 2 is due at 10 weeks, this column would read '4' against the 10 week dose as dose 2 is due 4 weeks after \ndose 1 is given.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__index"]}, "vaccine_id": {"name": "vaccine_id", "description": "Use the vaccineId column to link the id column of the Reference Data sheet Drug to the vaccine schedule. Copy the exact \nid from the id column in the reference data sheet Drug and paste it in the vaccineId column in the Scheduled Vaccine \nsheet.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__vaccine_id"]}, "weeks_from_last_vaccination_due": {"name": "weeks_from_last_vaccination_due", "description": "This column is used to show when a second dose is due in relation to the first dose. For example, if dose 1 is due at 6 \nweeks and dose 2 is due at 10 weeks, this column would read '4' against the 10 week dose as dose 2 is due 4 weeks after \ndose 1 is given. The order of a vaccine dose is defined at the `index` field. \n\nThis field should not be used for the first dose but for subsequent doses. First dose should use `weeks_from_birth_due`", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__weeks_from_last_vaccination_due"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in scheduled_vaccines.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in scheduled_vaccines.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "hide_from_certificate": {"name": "hide_from_certificate", "description": "Vaccines can be hidden from the vaccine certificate where required\n\nTo hide a vaccine from appearing on the vaccine certificate across the deployment, use column hideFromCertificate\n- true = vaccine will not appear on the vaccine certificate\n- blank / false = vaccine will appear on the vaccine certificate", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__hide_from_certificate"]}, "sort_index": {"name": "sort_index", "description": "Sort index defaults to 0", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.scheduled_vaccines__sort_index"]}}, "meta": {"triggers": ["notify_scheduled_vaccines_changed", "record_scheduled_vaccines_changelog", "set_scheduled_vaccines_updated_at", "set_scheduled_vaccines_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_scheduled_vaccines_changed", "record_scheduled_vaccines_changelog", "set_scheduled_vaccines_updated_at", "set_scheduled_vaccines_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_scheduled_vaccines_changed", "record_scheduled_vaccines_changelog", "set_scheduled_vaccines_updated_at", "set_scheduled_vaccines_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"scheduled_vaccines\"", "created_at": 1775621421.0258524, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__scheduled_vaccines"]}, "source.tamanu.tamanu.user_localisation_caches": {"database": "central", "schema": "public", "name": "user_localisation_caches", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_localisation_caches.yml", "original_file_path": "../../database/model/public/user_localisation_caches.yml", "unique_id": "source.tamanu.tamanu.user_localisation_caches", "fqn": ["tamanu", "tamanu", "user_localisation_caches"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_localisation_caches", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Cached localisation data.\n\nLocalisation can be pretty expensive to retrieve, so this caches it per user.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_localisation_caches.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "localisation": {"name": "localisation", "description": "JSON data.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_localisation_caches__localisation"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) this cache is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_localisation_caches__user_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_localisation_caches.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_localisation_caches.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_localisation_caches.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}}, "meta": {"masking": "truncate", "triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"masking": "truncate", "triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_localisation_caches\"", "created_at": 1775621421.0316854, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_localisation_caches"]}, "source.tamanu.tamanu.invoice_item_discounts": {"database": "central", "schema": "public", "name": "invoice_item_discounts", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_item_discounts.yml", "original_file_path": "../../database/model/public/invoice_item_discounts.yml", "unique_id": "source.tamanu.tamanu.invoice_item_discounts", "fqn": ["tamanu", "tamanu", "invoice_item_discounts"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_item_discounts", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Discounts applied to invoice items.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_item_discounts.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "invoice_item_id": {"name": "invoice_item_id", "description": "The [invoice item](#!/source/source.tamanu.tamanu.invoice_items).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_discounts__invoice_item_id"]}, "amount": {"name": "amount", "description": "Discount amount of invoice items (can be percentage or a whole number)", "meta": {"masking": "money"}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {"masking": "money"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_discounts__amount"]}, "reason": {"name": "reason", "description": "Free-form reason for the discount.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_discounts__reason"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_item_discounts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_item_discounts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_item_discounts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_item_discounts.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "type": {"name": "type", "description": "Discount type of invoice items", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_discounts__type"]}}, "meta": {"triggers": ["notify_invoice_item_discounts_changed", "record_invoice_item_discounts_changelog", "set_invoice_item_discounts_updated_at", "set_invoice_item_discounts_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_item_discounts_changed", "record_invoice_item_discounts_changelog", "set_invoice_item_discounts_updated_at", "set_invoice_item_discounts_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoice_item_discounts_changed", "record_invoice_item_discounts_changelog", "set_invoice_item_discounts_updated_at", "set_invoice_item_discounts_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_item_discounts\"", "created_at": 1775621421.0501256, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_item_discounts"]}, "source.tamanu.tamanu.portal_one_time_tokens": {"database": "central", "schema": "public", "name": "portal_one_time_tokens", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/portal_one_time_tokens.yml", "original_file_path": "../../database/model/public/portal_one_time_tokens.yml", "unique_id": "source.tamanu.tamanu.portal_one_time_tokens", "fqn": ["tamanu", "tamanu", "portal_one_time_tokens"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "portal_one_time_tokens", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A table that stores one-time tokens for portal users. These tokens are used for secure operations such as login, password reset, and other temporary authentication requirements. Each token is associated with a specific portal user and has an expiration date.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in portal_one_time_tokens.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in portal_one_time_tokens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in portal_one_time_tokens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in portal_one_time_tokens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "portal_user_id": {"name": "portal_user_id", "description": "Foreign key that references the id of the portal user to whom this token belongs. When the user is deleted, all associated tokens are automatically deleted (CASCADE).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_one_time_tokens__portal_user_id"]}, "type": {"name": "type", "description": "Specifies the purpose of the token\nOne of:\n- `login` (default)\n- `password-reset`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_one_time_tokens__type"]}, "token": {"name": "token", "description": "The unique, secure token string that is used for verification. This token should be generated with strong cryptographic methods to ensure security.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_one_time_tokens__token"]}, "expires_at": {"name": "expires_at", "description": "The timestamp at which this token expires and becomes invalid. Tokens should have a limited lifespan appropriate to their purpose, typically ranging from a few minutes to 24 hours depending on the token type.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_one_time_tokens__expires_at"]}}, "meta": {"triggers": ["record_portal_one_time_tokens_changelog"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["record_portal_one_time_tokens_changelog"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["record_portal_one_time_tokens_changelog"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"portal_one_time_tokens\"", "created_at": 1775621421.066728, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__portal_one_time_tokens"]}, "source.tamanu.tamanu.invoice_discounts": {"database": "central", "schema": "public", "name": "invoice_discounts", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_discounts.yml", "original_file_path": "../../database/model/public/invoice_discounts.yml", "unique_id": "source.tamanu.tamanu.invoice_discounts", "fqn": ["tamanu", "tamanu", "invoice_discounts"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_discounts", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Invoice discount that is applied to the patient's portion of the discountable costs.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_discounts.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "invoice_id": {"name": "invoice_id", "description": "The [invoice](#!/source/source.tamanu.tamanu.invoices).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_discounts__invoice_id"]}, "percentage": {"name": "percentage", "description": "Percentage discount to apply to the invoice", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_discounts__percentage"]}, "reason": {"name": "reason", "description": "Reason the discount is given", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_discounts__reason"]}, "is_manual": {"name": "is_manual", "description": "Indicates if the discount was manually added or based on an assessment", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_discounts__is_manual"]}, "applied_by_user_id": {"name": "applied_by_user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users) who applied this discount.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_discounts__applied_by_user_id"]}, "applied_time": {"name": "applied_time", "description": "When this discount was applied.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_discounts__applied_time"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_discounts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_discounts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_discounts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_discounts.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_invoice_discounts_changed", "record_invoice_discounts_changelog", "set_invoice_discounts_updated_at", "set_invoice_discounts_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_discounts_changed", "record_invoice_discounts_changelog", "set_invoice_discounts_updated_at", "set_invoice_discounts_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoice_discounts_changed", "record_invoice_discounts_changelog", "set_invoice_discounts_updated_at", "set_invoice_discounts_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_discounts\"", "created_at": 1775621421.0938745, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_discounts"]}, "source.tamanu.tamanu.program_registry_conditions": {"database": "central", "schema": "public", "name": "program_registry_conditions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/program_registry_conditions.yml", "original_file_path": "../../database/model/public/program_registry_conditions.yml", "unique_id": "source.tamanu.tamanu.program_registry_conditions", "fqn": ["tamanu", "tamanu", "program_registry_conditions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "program_registry_conditions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of program registry conditions.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in program_registry_conditions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in program_registry_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in program_registry_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in program_registry_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Code (identifier) for the condition.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_conditions__code"]}, "name": {"name": "name", "description": "The name of the condition.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_conditions__name"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in program_registry_conditions.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "program_registry_id": {"name": "program_registry_id", "description": "Reference to the [Program Registry](#!/source/source.tamanu.tamanu.program_registries)\nthe condition is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_conditions__program_registry_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in program_registry_conditions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_program_registry_conditions_changed", "record_program_registry_conditions_changelog", "set_program_registry_conditions_updated_at", "set_program_registry_conditions_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_program_registry_conditions_changed", "record_program_registry_conditions_changelog", "set_program_registry_conditions_updated_at", "set_program_registry_conditions_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_program_registry_conditions_changed", "record_program_registry_conditions_changelog", "set_program_registry_conditions_updated_at", "set_program_registry_conditions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"program_registry_conditions\"", "created_at": 1775621421.1152453, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__program_registry_conditions"]}, "source.tamanu.tamanu.invoice_payments": {"database": "central", "schema": "public", "name": "invoice_payments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_payments.yml", "original_file_path": "../../database/model/public/invoice_payments.yml", "unique_id": "source.tamanu.tamanu.invoice_payments", "fqn": ["tamanu", "tamanu", "invoice_payments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_payments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Individual payment against an invoice.\n\nInvoices can be paid in installments, by different parties, etc.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_payments.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "invoice_id": {"name": "invoice_id", "description": "The [invoice](#!/source/source.tamanu.tamanu.invoices).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_payments__invoice_id"]}, "date": {"name": "date", "description": "Local date for the record in invoice_payments.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "receipt_number": {"name": "receipt_number", "description": "Receipt number. Usually auto-generated.", "meta": {"masking": {"kind": "integer", "range": "10000000-99999999"}}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "10000000-99999999"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_payments__receipt_number"]}, "amount": {"name": "amount", "description": "Amount paid.", "meta": {"masking": "money"}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {"masking": "money"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_payments__amount"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_by_user_id": {"name": "updated_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who updated this invoice payment.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_payments__updated_by_user_id"]}, "original_payment_id": {"name": "original_payment_id", "description": "Foreign key to the payment that this refund is reversing (null for non-refund transactions)", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_payments__original_payment_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_payments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_invoice_payments_changed", "record_invoice_payments_changelog", "set_invoice_payments_updated_at", "set_invoice_payments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_payments_changed", "record_invoice_payments_changelog", "set_invoice_payments_updated_at", "set_invoice_payments_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoice_payments_changed", "record_invoice_payments_changelog", "set_invoice_payments_updated_at", "set_invoice_payments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_payments\"", "created_at": 1775621421.1421185, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_payments"]}, "source.tamanu.tamanu.patient_additional_data": {"database": "central", "schema": "public", "name": "patient_additional_data", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_additional_data.yml", "original_file_path": "../../database/model/public/patient_additional_data.yml", "unique_id": "source.tamanu.tamanu.patient_additional_data", "fqn": ["tamanu", "tamanu", "patient_additional_data"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_additional_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Core or adjunct patient data that doesn't fit elsewhere, but is only downloaded to a facility once a\npatient is marked for sync.\n\nThis is often referred to as \"PAD\".\n\nSee also `patient_field_definition_categories`, `patient_field_definitions`, and `patient_field_values`,\nwhich define and specify custom/non-standard data to be stored against patients.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_additional_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_additional_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_additional_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "place_of_birth": {"name": "place_of_birth", "description": "Free-form place of birth (typically a place name or country).", "meta": {"masking": "place"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "place"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__place_of_birth"]}, "primary_contact_number": {"name": "primary_contact_number", "description": "Primary contact number.\n\nNote that this may be complementary to the more structured data in `patient_contacts`.", "meta": {"masking": "phone"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "phone"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__primary_contact_number"]}, "secondary_contact_number": {"name": "secondary_contact_number", "description": "Secondary contact number.\n\nNote that this may be complementary to the more structured data in `patient_contacts`.", "meta": {"masking": "phone"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "phone"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__secondary_contact_number"]}, "marital_status": {"name": "marital_status", "description": "Marital status.\n\nOne of:\n- `Defacto`\n- `Married`\n- `Single`\n- `Widow`\n- `Divorced`\n- `Separated`\n- `Unknown`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__marital_status"]}, "city_town": {"name": "city_town", "description": "Patient current address city or town.\n\nThis may be free-form or chosen from a drop-down, depending on how Tamanu is configured.", "meta": {"masking": "place"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "place"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__city_town"]}, "street_village": {"name": "street_village", "description": "Patient current address street or village.\n\nThis may be free-form or chosen from a drop-down, depending on how Tamanu is configured.", "meta": {"masking": "place"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "place"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__street_village"]}, "educational_level": {"name": "educational_level", "description": "Highest educational attainment.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__educational_level"]}, "social_media": {"name": "social_media", "description": "Free-form social media contact.\n\nNote that this may be complementary to the more structured data in `patient_contacts`.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__social_media"]}, "blood_type": {"name": "blood_type", "description": "Blood type.\n\nOne of:\n- `A+`\n- `A-`\n- `AB-`\n- `AB+`\n- `B+`\n- `B-`\n- `O+`\n- `O-`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__blood_type"]}, "title": {"name": "title", "description": "Patient name: title.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__title"]}, "ethnicity_id": {"name": "ethnicity_id", "description": "Reference to patient ethnicity ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__ethnicity_id"]}, "nationality_id": {"name": "nationality_id", "description": "Reference to patient nationality ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__nationality_id"]}, "country_id": {"name": "country_id", "description": "Reference to patient country of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__country_id"]}, "division_id": {"name": "division_id", "description": "Reference to patient administrative division of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__division_id"]}, "subdivision_id": {"name": "subdivision_id", "description": "Reference to patient administrative subdivision of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__subdivision_id"]}, "medical_area_id": {"name": "medical_area_id", "description": "Reference to patient administrative medical area of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__medical_area_id"]}, "nursing_zone_id": {"name": "nursing_zone_id", "description": "Reference to patient administrative nursing zone of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__nursing_zone_id"]}, "settlement_id": {"name": "settlement_id", "description": "Reference to patient residence settlement ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__settlement_id"]}, "occupation_id": {"name": "occupation_id", "description": "Reference to patient occupation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__occupation_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).\n\nThere is at most one `patient_additional_data` row per patient.\n\nNote that the `id` column is generated from this column to enforce this.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__patient_id"]}, "birth_certificate": {"name": "birth_certificate", "description": "Birth certificate identifier.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__birth_certificate"]}, "driving_license": {"name": "driving_license", "description": "Driving licence identifier.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__driving_license"]}, "passport": {"name": "passport", "description": "Passport number.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__passport"]}, "religion_id": {"name": "religion_id", "description": "Reference to patient religion ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__religion_id"]}, "patient_billing_type_id": {"name": "patient_billing_type_id", "description": "Reference to patient billing type.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__patient_billing_type_id"]}, "country_of_birth_id": {"name": "country_of_birth_id", "description": "Reference to patient country of birth ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__country_of_birth_id"]}, "registered_by_id": {"name": "registered_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who registered the patient in Tamanu.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__registered_by_id"]}, "emergency_contact_name": {"name": "emergency_contact_name", "description": "Name of emergency contact.", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__emergency_contact_name"]}, "emergency_contact_number": {"name": "emergency_contact_number", "description": "Phone number of emergency contact.", "meta": {"masking": "phone"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "phone"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__emergency_contact_number"]}, "mother_id": {"name": "mother_id", "description": "Reference to [patient](#!/source/source.tamanu.tamanu.patients) ID of mother / parent.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__mother_id"]}, "father_id": {"name": "father_id", "description": "Reference to [patient](#!/source/source.tamanu.tamanu.patients) ID of father / parent.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__father_id"]}, "id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_additional_data.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "updated_at_by_field": {"name": "updated_at_by_field", "description": "JSON object recording the updated datetime for individual columns.\n\nAs PADs contain a lot of disparate data, it's not uncommon that fields are edited separately in\ndifferent facilities. The default sync strategy is for the last edit to a whole row to \"win out\" in\ncase of a conflict, but this can lead to discarding important data in the case of PADs. This field\nis used to implement per-field \"last edit wins\" instead.", "meta": {}, "data_type": "json", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__updated_at_by_field"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_additional_data.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "health_center_id": {"name": "health_center_id", "description": "Reference to patient primary health center ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__health_center_id"]}, "secondary_village_id": {"name": "secondary_village_id", "description": "Reference to patient administrative village of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), secondary).\n\nSee also [`patients.village_id`](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__secondary_village_id"]}, "insurer_id": {"name": "insurer_id", "description": "Reference to patient insurer ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__insurer_id"]}, "insurer_policy_number": {"name": "insurer_policy_number", "description": "Policy number of patient insurance.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_additional_data__insurer_policy_number"]}}, "meta": {"triggers": ["notify_patient_additional_data_changed", "record_patient_additional_data_changelog", "set_patient_additional_data_updated_at", "set_patient_additional_data_updated_at_by_field", "set_patient_additional_data_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["patient"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_additional_data_changed", "record_patient_additional_data_changelog", "set_patient_additional_data_updated_at", "set_patient_additional_data_updated_at_by_field", "set_patient_additional_data_updated_at_sync_tick"]}, "tags": ["patient"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["patient"], "meta": {"triggers": ["notify_patient_additional_data_changed", "record_patient_additional_data_changelog", "set_patient_additional_data_updated_at", "set_patient_additional_data_updated_at_by_field", "set_patient_additional_data_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_additional_data\"", "created_at": 1775621421.1623635, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_additional_data"]}, "source.tamanu.tamanu.upcoming_vaccinations": {"database": "central", "schema": "public", "name": "upcoming_vaccinations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/upcoming_vaccinations.yml", "original_file_path": "../../database/model/public/upcoming_vaccinations.yml", "unique_id": "source.tamanu.tamanu.upcoming_vaccinations", "fqn": ["tamanu", "tamanu", "upcoming_vaccinations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "upcoming_vaccinations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A **view** which lists patients and next vaccine due for a given vaccine type.\n\nThe first dose of a vaccine type is based on weeks from birth due whilst subsequent doses are based on weeks from last \nvaccination due.\n\nAge limits in years and thresholds in days for scheduled status are configurable with the following defaults:\n\n- Age = 15\n- Status: Scheduled = 28\n- Status: Upcoming = 7\n- Status: Due = -7\n- Status: Overdue = -55\n- Status: Missed = -Infinity", "columns": {"patient_id": {"name": "patient_id", "description": "The [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__patient_id"]}, "scheduled_vaccine_id": {"name": "scheduled_vaccine_id", "description": "Reference to the [scheduled vaccine](#!/source/source.tamanu.tamanu.scheduled_vaccines).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__scheduled_vaccine_id"]}, "vaccine_category": {"name": "vaccine_category", "description": "Vaccine category [Routine, Catch-up, Campaign, Other]", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__vaccine_category"]}, "vaccine_id": {"name": "vaccine_id", "description": "Reference to the vaccine ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = drug`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__vaccine_id"]}, "due_date": {"name": "due_date", "description": "Due date of the scheduled vaccine.", "meta": {}, "data_type": "date", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__due_date"]}, "days_till_due": {"name": "days_till_due", "description": "Number of days until the scheduled vaccine is due. Negative numbers indicates the number of days in the past the vaccine\nwas due.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__days_till_due"]}, "status": {"name": "status", "description": "Status of the upcoming vaccination listed ['DUE', 'OVERDUE', 'MISSED', 'SCHEDULED', 'UPCOMING']", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.upcoming_vaccinations__status"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"upcoming_vaccinations\"", "created_at": 1775621421.1730878, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__upcoming_vaccinations"]}, "source.tamanu.tamanu.user_preferences": {"database": "central", "schema": "public", "name": "user_preferences", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_preferences.yml", "original_file_path": "../../database/model/public/user_preferences.yml", "unique_id": "source.tamanu.tamanu.user_preferences", "fqn": ["tamanu", "tamanu", "user_preferences"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_preferences", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Per-user preferences.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_preferences.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_preferences.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_preferences.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_preferences.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users) these preferences are for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_preferences__user_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in user_preferences.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "key": {"name": "key", "description": "Key of the user preference", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_preferences__key"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) that this preference applies to", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_preferences__facility_id"]}, "value": {"name": "value", "description": "Value of the user preference", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_preferences__value"]}}, "meta": {"triggers": ["notify_user_preferences_changed", "record_user_preferences_changelog", "set_user_preferences_updated_at", "set_user_preferences_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_user_preferences_changed", "record_user_preferences_changelog", "set_user_preferences_updated_at", "set_user_preferences_updated_at_sync_tick"]}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": ["notify_user_preferences_changed", "record_user_preferences_changelog", "set_user_preferences_updated_at", "set_user_preferences_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_preferences\"", "created_at": 1775621421.1874695, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_preferences"]}, "source.tamanu.tamanu.patient_field_values": {"database": "central", "schema": "public", "name": "patient_field_values", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_field_values.yml", "original_file_path": "../../database/model/public/patient_field_values.yml", "unique_id": "source.tamanu.tamanu.patient_field_values", "fqn": ["tamanu", "tamanu", "patient_field_values"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_field_values", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Values recorded in custom patient fields.\n\nThe `id` column is generated to enforce one value row per field definition per patient.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_field_values.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_field_values.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_field_values.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "value": {"name": "value", "description": "Value.", "meta": {"masking": "string"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_values__value"]}, "definition_id": {"name": "definition_id", "description": "The [field definition](#!/source/source.tamanu.tamanu.patient_field_definitions).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_values__definition_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_values__patient_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_field_values.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_field_values.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}}, "meta": {"triggers": ["notify_patient_field_values_changed", "record_patient_field_values_changelog", "set_patient_field_values_updated_at", "set_patient_field_values_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["patient"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_field_values_changed", "record_patient_field_values_changelog", "set_patient_field_values_updated_at", "set_patient_field_values_updated_at_sync_tick"]}, "tags": ["patient"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["patient"], "meta": {"triggers": ["notify_patient_field_values_changed", "record_patient_field_values_changelog", "set_patient_field_values_updated_at", "set_patient_field_values_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_field_values\"", "created_at": 1775621421.2091298, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_field_values"]}, "source.tamanu.tamanu.referrals": {"database": "central", "schema": "public", "name": "referrals", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/referrals.yml", "original_file_path": "../../database/model/public/referrals.yml", "unique_id": "source.tamanu.tamanu.referrals", "fqn": ["tamanu", "tamanu", "referrals"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "referrals", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "[Referrals](https://en.wikipedia.org/wiki/Referral_(medicine)).\n\nReferrals use a confusing mix of data in the `referrals` table and\n[`survey_response_answers`](#!/source/source.tamanu.tamanu.survey_response_answers) identified by\nthe text of the question they are for. \n\nSome additional data is captured in\n[survey response answers](#!/source/source.tamanu.tamanu.survey_response_answers), but this is\nvariable and not enforced through any validation:\n- Where the person is being referred to can be captured by a range of questions, sometimes with a\n  list of hard coded facility name options, or location groups, or departments.\n- Who the referral is \"completed by\" can be captured by a question either the name\n  'Referring doctor' or 'Referral completed by'.\n- Some referrals are the product of a previous screening survey. In some cases (e.g. Samoa) there is\n  a SurveyLink question that captures which survey led to this referral, in others (e.g. Nauru)\n  there is no such question so the two survey responses cannot be reliably linked.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in referrals.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in referrals.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in referrals.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in referrals.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "referred_facility": {"name": "referred_facility", "description": "Unused.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.referrals__referred_facility"]}, "initiating_encounter_id": {"name": "initiating_encounter_id", "description": "Reference to the [initiating encounter](#!/source/source.tamanu.tamanu.encounters).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.referrals__initiating_encounter_id"]}, "completing_encounter_id": {"name": "completing_encounter_id", "description": "Unused.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.referrals__completing_encounter_id"]}, "survey_response_id": {"name": "survey_response_id", "description": "Reference to the [survey response](#!/source/source.tamanu.tamanu.survey_responses) with more data.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.referrals__survey_response_id"]}, "status": {"name": "status", "description": "Status of the referral.\n\nOne of:\n- `pending`\n- `cancelled`\n- `completed`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.referrals__status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in referrals.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_referrals_changed", "record_referrals_changelog", "set_referrals_updated_at", "set_referrals_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_referrals_changed", "record_referrals_changelog", "set_referrals_updated_at", "set_referrals_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_referrals_changed", "record_referrals_changelog", "set_referrals_updated_at", "set_referrals_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"referrals\"", "created_at": 1775621421.2411427, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__referrals"]}, "source.tamanu.tamanu.lab_request_logs": {"database": "central", "schema": "public", "name": "lab_request_logs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_request_logs.yml", "original_file_path": "../../database/model/public/lab_request_logs.yml", "unique_id": "source.tamanu.tamanu.lab_request_logs", "fqn": ["tamanu", "tamanu", "lab_request_logs"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_request_logs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This is a log of who changed the status of a lab request when.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_request_logs.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_request_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_request_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_request_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "status": {"name": "status", "description": "The status the lab request was updated to.", "meta": {}, "data_type": "character varying(31)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_logs__status"]}, "lab_request_id": {"name": "lab_request_id", "description": "Reference to the [lab request](#!/source/source.tamanu.tamanu.lab_requests).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_logs__lab_request_id"]}, "updated_by_id": {"name": "updated_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who updated this lab request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_logs__updated_by_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_request_logs.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_lab_request_logs_changed", "record_lab_request_logs_changelog", "set_lab_request_logs_updated_at", "set_lab_request_logs_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_request_logs_changed", "record_lab_request_logs_changelog", "set_lab_request_logs_updated_at", "set_lab_request_logs_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_lab_request_logs_changed", "record_lab_request_logs_changelog", "set_lab_request_logs_updated_at", "set_lab_request_logs_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_request_logs\"", "created_at": 1775621421.2596388, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_request_logs"]}, "source.tamanu.tamanu.user_leaves": {"database": "central", "schema": "public", "name": "user_leaves", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_leaves.yml", "original_file_path": "../../database/model/public/user_leaves.yml", "unique_id": "source.tamanu.tamanu.user_leaves", "fqn": ["tamanu", "tamanu", "user_leaves"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_leaves", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records user leave requests, including leave period and scheduling/removal metadata.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_leaves.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "start_date": {"name": "start_date", "description": "Start date of the leave.", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_leaves__start_date"]}, "end_date": {"name": "end_date", "description": "End date of the leave.", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_leaves__end_date"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who requested the leave.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_leaves__user_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_leaves.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_leaves.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_leaves.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in user_leaves.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_user_leaves_changed", "record_user_leaves_changelog", "set_user_leaves_updated_at", "set_user_leaves_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_user_leaves_changed", "record_user_leaves_changelog", "set_user_leaves_updated_at", "set_user_leaves_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_user_leaves_changed", "record_user_leaves_changelog", "set_user_leaves_updated_at", "set_user_leaves_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_leaves\"", "created_at": 1775621421.2743318, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_leaves"]}, "source.tamanu.tamanu.user_designations": {"database": "central", "schema": "public", "name": "user_designations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_designations.yml", "original_file_path": "../../database/model/public/user_designations.yml", "unique_id": "source.tamanu.tamanu.user_designations", "fqn": ["tamanu", "tamanu", "user_designations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_designations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association of user to designation", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_designations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_designations__user_id"]}, "designation_id": {"name": "designation_id", "description": "The designation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_designations__designation_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in user_designations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_user_designations_changed", "record_user_designations_changelog", "set_user_designations_updated_at", "set_user_designations_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_user_designations_changed", "record_user_designations_changelog", "set_user_designations_updated_at", "set_user_designations_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_user_designations_changed", "record_user_designations_changelog", "set_user_designations_updated_at", "set_user_designations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_designations\"", "created_at": 1775621421.2871873, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_designations"]}, "source.tamanu.tamanu.patient_field_definitions": {"database": "central", "schema": "public", "name": "patient_field_definitions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_field_definitions.yml", "original_file_path": "../../database/model/public/patient_field_definitions.yml", "unique_id": "source.tamanu.tamanu.patient_field_definitions", "fqn": ["tamanu", "tamanu", "patient_field_definitions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_field_definitions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Custom inputs to be included in the Tamanu patient details screens.\n\nThese are grouped using [categories](#!/source/source.tamanu.tamanu.patient_field_definition_categories).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_field_definitions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_field_definitions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_field_definitions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_field_definitions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Name of the input.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_definitions__name"]}, "field_type": {"name": "field_type", "description": "Input field type.\n\nOne of:\n- `string`\n- `number`\n- `select`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_definitions__field_type"]}, "options": {"name": "options", "description": "When `type = 'select'`, the list of options for this select.\n\nPostgreSQL array of strings.", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_definitions__options"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in patient_field_definitions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "category_id": {"name": "category_id", "description": "The [category](#!/source/source.tamanu.tamanu.patient_field_definition_categories) this field is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_definitions__category_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_field_definitions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patient_field_definitions_changed", "record_patient_field_definitions_changelog", "set_patient_field_definitions_updated_at", "set_patient_field_definitions_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_field_definitions_changed", "record_patient_field_definitions_changelog", "set_patient_field_definitions_updated_at", "set_patient_field_definitions_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_patient_field_definitions_changed", "record_patient_field_definitions_changelog", "set_patient_field_definitions_updated_at", "set_patient_field_definitions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_field_definitions\"", "created_at": 1775621421.31471, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_field_definitions"]}, "source.tamanu.tamanu.lab_test_types": {"database": "central", "schema": "public", "name": "lab_test_types", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_test_types.yml", "original_file_path": "../../database/model/public/lab_test_types.yml", "unique_id": "source.tamanu.tamanu.lab_test_types", "fqn": ["tamanu", "tamanu", "lab_test_types"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_test_types", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A kind of test that's possible to request.\n\nThis includes information about the test itself, and also parameters around result formatting, like\ndata type, expected ranges, etc.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_test_types.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_test_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_test_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_test_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Internal Tamanu code of the test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__code"]}, "name": {"name": "name", "description": "Human-friendly name of the test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__name"]}, "unit": {"name": "unit", "description": "Unit the test result is measured in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__unit"]}, "male_min": {"name": "male_min", "description": "Minimum typical range for males.", "meta": {}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__male_min"]}, "male_max": {"name": "male_max", "description": "Maximum typical range for males.", "meta": {}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__male_max"]}, "female_min": {"name": "female_min", "description": "Minimum typical range for females.", "meta": {}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__female_min"]}, "female_max": {"name": "female_max", "description": "Maximum typical range for females.", "meta": {}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__female_max"]}, "range_text": {"name": "range_text", "description": "Unused.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__range_text"]}, "result_type": {"name": "result_type", "description": "Input type of result.\n\nOne of:\n- `FreeText`\n- `Number`\n- `Select`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__result_type"]}, "options": {"name": "options", "description": "Comma-separated list of options. Unused.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__options"]}, "lab_test_category_id": {"name": "lab_test_category_id", "description": "Reference to the category ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__lab_test_category_id"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in lab_test_types.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_test_types.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "external_code": {"name": "external_code", "description": "External code for the test (such as for LIMS).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__external_code"]}, "is_sensitive": {"name": "is_sensitive", "description": "Used to indicate if the lab test type is sensitive and should be hidden accordingly.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_types__is_sensitive"]}}, "meta": {"triggers": ["notify_lab_test_types_changed", "record_lab_test_types_changelog", "set_lab_test_types_updated_at", "set_lab_test_types_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_test_types_changed", "record_lab_test_types_changelog", "set_lab_test_types_updated_at", "set_lab_test_types_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_lab_test_types_changed", "record_lab_test_types_changelog", "set_lab_test_types_updated_at", "set_lab_test_types_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_test_types\"", "created_at": 1775621421.345898, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_test_types"]}, "source.tamanu.tamanu.prescriptions": {"database": "central", "schema": "public", "name": "prescriptions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/prescriptions.yml", "original_file_path": "../../database/model/public/prescriptions.yml", "unique_id": "source.tamanu.tamanu.prescriptions", "fqn": ["tamanu", "tamanu", "prescriptions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "prescriptions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records prescriptions for medications.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in prescriptions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in prescriptions.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "notes": {"name": "notes", "description": "Free-form note about the prescription.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__notes"]}, "end_date": {"name": "end_date", "description": "When the prescription ends.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__end_date"]}, "indication": {"name": "indication", "description": "The [indication of use](https://en.wikipedia.org/wiki/Indication_(medicine)) for the medicine.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__indication"]}, "route": {"name": "route", "description": "Administration route for the medication.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__route"]}, "medication_id": {"name": "medication_id", "description": "The medication ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = drug`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__medication_id"]}, "prescriber_id": {"name": "prescriber_id", "description": "[Who](#!/source/source.tamanu.tamanu.users) prescribed the medication.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__prescriber_id"]}, "quantity": {"name": "quantity", "description": "Quantity of medicine to dispense.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__quantity"]}, "discontinued": {"name": "discontinued", "description": "Whether the prescription was discontinued.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__discontinued"]}, "discontinuing_clinician_id": {"name": "discontinuing_clinician_id", "description": "If the prescription was discontinued, who did it.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__discontinuing_clinician_id"]}, "discontinuing_reason": {"name": "discontinuing_reason", "description": "If the prescription was discontinued, why that happened.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__discontinuing_reason"]}, "repeats": {"name": "repeats", "description": "How many times this prescription can be repeatedly dispensed without a new prescription.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__repeats"]}, "discontinued_date": {"name": "discontinued_date", "description": "If the prescription was discontinued, when that happened.", "meta": {"masking": "date"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__discontinued_date"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in prescriptions.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "end_date_legacy": {"name": "end_date_legacy", "description": "[Deprecated] When the prescription ends.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__end_date_legacy"]}, "is_ongoing": {"name": "is_ongoing", "description": "A flag to determine whether or not the current prescription is ongoing", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__is_ongoing"]}, "is_prn": {"name": "is_prn", "description": "A flag to determine whether or not the current prescription is prn", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__is_prn"]}, "is_variable_dose": {"name": "is_variable_dose", "description": "A flag to determine whether or not the current prescription is variable does", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__is_variable_dose"]}, "dose_amount": {"name": "dose_amount", "description": "Numeric field to record dose amount", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__dose_amount"]}, "units": {"name": "units", "description": "The units of the prescription", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__units"]}, "frequency": {"name": "frequency", "description": "The frequency of the prescription", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__frequency"]}, "start_date": {"name": "start_date", "description": "The start date of the prescription", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__start_date"]}, "duration_value": {"name": "duration_value", "description": "The duration value of the prescription", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__duration_value"]}, "duration_unit": {"name": "duration_unit", "description": "The duration unit of the prescription", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__duration_unit"]}, "is_phone_order": {"name": "is_phone_order", "description": "A flag to determine whether or not the current prescription is phone order", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__is_phone_order"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in prescriptions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "ideal_times": {"name": "ideal_times", "description": "Ideal times which are specified by prescriber", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__ideal_times"]}, "pharmacy_notes": {"name": "pharmacy_notes", "description": "Free-form pharmacy note of the prescription.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__pharmacy_notes"]}, "display_pharmacy_notes_in_mar": {"name": "display_pharmacy_notes_in_mar", "description": "A flag to determine whether to display 'Pharmacy notes' on the medication administration record", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.prescriptions__display_pharmacy_notes_in_mar"]}}, "meta": {"triggers": ["notify_prescriptions_changed", "record_prescriptions_changelog", "set_prescriptions_updated_at", "set_prescriptions_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_prescriptions_changed", "record_prescriptions_changelog", "set_prescriptions_updated_at", "set_prescriptions_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_prescriptions_changed", "record_prescriptions_changelog", "set_prescriptions_updated_at", "set_prescriptions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"prescriptions\"", "created_at": 1775621421.3632748, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__prescriptions"]}, "source.tamanu.tamanu.medication_dispenses": {"database": "central", "schema": "public", "name": "medication_dispenses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/medication_dispenses.yml", "original_file_path": "../../database/model/public/medication_dispenses.yml", "unique_id": "source.tamanu.tamanu.medication_dispenses", "fqn": ["tamanu", "tamanu", "medication_dispenses"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "medication_dispenses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records of medication dispensing events, tracking when medications from pharmacy orders are physically dispensed to patients. Each record represents a single dispensing event for a specific prescription within a pharmacy order.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in medication_dispenses.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "pharmacy_order_prescription_id": {"name": "pharmacy_order_prescription_id", "description": "Reference to the [pharmacy_order_prescription](#!/source/source.tamanu.tamanu.pharmacy_order_prescriptions) that this dispense record fulfills. Links this dispensing event to the specific medication order being filled.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_dispenses__pharmacy_order_prescription_id"]}, "quantity": {"name": "quantity", "description": "The quantity of medication units dispensed to the patient in each dispensing.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_dispenses__quantity"]}, "instructions": {"name": "instructions", "description": "Additional instructions provided to the patient when dispensing the medication, such as dosage guidance, timing, storage requirements, or special considerations for administration.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_dispenses__instructions"]}, "dispensed_by_user_id": {"name": "dispensed_by_user_id", "description": "Reference to the [user](#!/model/model.public.users) (typically a pharmacist or pharmacy staff member) who dispensed the medication.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_dispenses__dispensed_by_user_id"]}, "dispensed_at": {"name": "dispensed_at", "description": "The timestamp indicating when the medication was physically dispensed to the patient.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_dispenses__dispensed_at"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in medication_dispenses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in medication_dispenses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in medication_dispenses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in medication_dispenses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_medication_dispenses_changed", "record_medication_dispenses_changelog", "set_medication_dispenses_updated_at", "set_medication_dispenses_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_medication_dispenses_changed", "record_medication_dispenses_changelog", "set_medication_dispenses_updated_at", "set_medication_dispenses_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_medication_dispenses_changed", "record_medication_dispenses_changelog", "set_medication_dispenses_updated_at", "set_medication_dispenses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"medication_dispenses\"", "created_at": 1775621421.3797545, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__medication_dispenses"]}, "source.tamanu.tamanu.encounters": {"database": "central", "schema": "public", "name": "encounters", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounters.yml", "original_file_path": "../../database/model/public/encounters.yml", "unique_id": "source.tamanu.tamanu.encounters", "fqn": ["tamanu", "tamanu", "encounters"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounters", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Tracks the basic information of the patient encounters within Tamanu from start to finish", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounters.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounters.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounters.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounters.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "encounter_type": {"name": "encounter_type", "description": "The type of the encounter.\n\nOne of:\n- `admission`\n- `clinic`\n- `imaging`\n- `emergency`\n- `observation`\n- `triage`\n- `surveyResponse`\n- `vaccination`", "meta": {}, "data_type": "character varying(31)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__encounter_type"]}, "start_date": {"name": "start_date", "description": "The beginning of the encounter", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__start_date"]}, "end_date": {"name": "end_date", "description": "The date encounter was discharged/ended", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__end_date"]}, "reason_for_encounter": {"name": "reason_for_encounter", "description": "Free-form information about the encounter.\n\nCan include info like type of survey submitted, emergency diagnosis, etc.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__reason_for_encounter"]}, "device_id": {"name": "device_id", "description": "Unique identifier for the device that created the encounter.\n\nDevice IDs are proper to each device and not globally recorded in e.g. a `devices` table.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__device_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__patient_id"]}, "examiner_id": {"name": "examiner_id", "description": "Reference to the [examiner](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__examiner_id"]}, "location_id": {"name": "location_id", "description": "Reference to the current [location](#!/source/source.tamanu.tamanu.locations) this encounter is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__location_id"]}, "department_id": {"name": "department_id", "description": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) this encounter is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__department_id"]}, "patient_billing_type_id": {"name": "patient_billing_type_id", "description": "The billing type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of the patient.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__patient_billing_type_id"]}, "start_date_legacy": {"name": "start_date_legacy", "description": "[Deprecated] Start date.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__start_date_legacy"]}, "end_date_legacy": {"name": "end_date_legacy", "description": "[Deprecated] End date.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__end_date_legacy"]}, "referral_source_id": {"name": "referral_source_id", "description": "The referral source ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of the patient.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__referral_source_id"]}, "planned_location_id": {"name": "planned_location_id", "description": "The [location](#!/source/source.tamanu.tamanu.locations) that the encounter will transfer to at the\n`planned_location_start_time`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__planned_location_id"]}, "planned_location_start_time": {"name": "planned_location_start_time", "description": "The time that the encounter will transfer to the planned location.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__planned_location_start_time"]}, "discharge_draft": {"name": "discharge_draft", "description": "Draft data of the encounter", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__discharge_draft"]}, "estimated_end_date": {"name": "estimated_end_date", "description": "The estimated discharge date of the encounter", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounters__estimated_end_date"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounters.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_encounters_changed", "record_encounters_changelog", "set_encounters_updated_at", "set_encounters_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounters_changed", "record_encounters_changelog", "set_encounters_updated_at", "set_encounters_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_encounters_changed", "record_encounters_changelog", "set_encounters_updated_at", "set_encounters_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounters\"", "created_at": 1775621421.4385056, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounters"]}, "source.tamanu.tamanu.encounter_diets": {"database": "central", "schema": "public", "name": "encounter_diets", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounter_diets.yml", "original_file_path": "../../database/model/public/encounter_diets.yml", "unique_id": "source.tamanu.tamanu.encounter_diets", "fqn": ["tamanu", "tamanu", "encounter_diets"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounter_diets", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A diet associated with an encounter.\n\nA patient can be placed on a diet for various medical purposes.\nDiets are specified in reference data.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounter_diets.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this diet is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diets__encounter_id"]}, "diet_id": {"name": "diet_id", "description": "The diet ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = diet`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diets__diet_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounter_diets.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounter_diets.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounter_diets.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounter_diets.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_encounter_diets_changed", "record_encounter_diets_changelog", "set_encounter_diets_updated_at", "set_encounter_diets_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounter_diets_changed", "record_encounter_diets_changelog", "set_encounter_diets_updated_at", "set_encounter_diets_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_encounter_diets_changed", "record_encounter_diets_changelog", "set_encounter_diets_updated_at", "set_encounter_diets_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounter_diets\"", "created_at": 1775621421.4626243, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounter_diets"]}, "source.tamanu.tamanu.encounter_diagnoses": {"database": "central", "schema": "public", "name": "encounter_diagnoses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounter_diagnoses.yml", "original_file_path": "../../database/model/public/encounter_diagnoses.yml", "unique_id": "source.tamanu.tamanu.encounter_diagnoses", "fqn": ["tamanu", "tamanu", "encounter_diagnoses"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounter_diagnoses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records diagnoses made during an encounter", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounter_diagnoses.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounter_diagnoses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounter_diagnoses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounter_diagnoses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "certainty": {"name": "certainty", "description": "The level of certainty of the recorded diagnosis.\n\nOne of:\n- `confirmed`\n- `disproven`\n- `emergency`\n- `error`\n- `suspected`\n\n`disproven` and `error` are excluded for reporting", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diagnoses__certainty"]}, "is_primary": {"name": "is_primary", "description": "A boolean indicating if this is a primary diagnosis", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diagnoses__is_primary"]}, "date": {"name": "date", "description": "Local date for the record in encounter_diagnoses.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this diagnosis is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diagnoses__encounter_id"]}, "diagnosis_id": {"name": "diagnosis_id", "description": "The diagnosis ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diagnoses__diagnosis_id"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in encounter_diagnoses.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounter_diagnoses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "clinician_id": {"name": "clinician_id", "description": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) recording that diagnosis.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_diagnoses__clinician_id"]}}, "meta": {"triggers": ["notify_encounter_diagnoses_changed", "record_encounter_diagnoses_changelog", "set_encounter_diagnoses_updated_at", "set_encounter_diagnoses_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounter_diagnoses_changed", "record_encounter_diagnoses_changelog", "set_encounter_diagnoses_updated_at", "set_encounter_diagnoses_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_encounter_diagnoses_changed", "record_encounter_diagnoses_changelog", "set_encounter_diagnoses_updated_at", "set_encounter_diagnoses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounter_diagnoses\"", "created_at": 1775621421.4957366, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounter_diagnoses"]}, "source.tamanu.tamanu.program_data_elements": {"database": "central", "schema": "public", "name": "program_data_elements", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/program_data_elements.yml", "original_file_path": "../../database/model/public/program_data_elements.yml", "unique_id": "source.tamanu.tamanu.program_data_elements", "fqn": ["tamanu", "tamanu", "program_data_elements"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "program_data_elements", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Describes how a survey question gets stored.\n\nSee [survey screen components](#!/source/source.tamanu.tamanu.survey_screen_components), which\ndescribes how the question is displayed.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in program_data_elements.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in program_data_elements.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in program_data_elements.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in program_data_elements.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Machine-friendly short name for the question.\n\nThis is also used to refer to questions within criteria and such.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__code"]}, "name": {"name": "name", "description": "Human-friendly name", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__name"]}, "indicator": {"name": "indicator", "description": "Another name for the data element.\n\nIt's named `indicator` from mimicry of Tupaia.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__indicator"]}, "default_text": {"name": "default_text", "description": "Default value.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__default_text"]}, "default_options": {"name": "default_options", "description": "Default options if this is a dropdown.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__default_options"]}, "type": {"name": "type", "description": "Type of the field.\n\nTypes are here: <https://github.com/beyondessential/tamanu/blob/main/packages/constants/src/surveys.ts>", "meta": {}, "data_type": "character varying(31)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__type"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in program_data_elements.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "visualisation_config": {"name": "visualisation_config", "description": "JSON visualisation configuration.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_data_elements__visualisation_config"]}}, "meta": {"triggers": ["notify_program_data_elements_changed", "record_program_data_elements_changelog", "set_program_data_elements_updated_at", "set_program_data_elements_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_program_data_elements_changed", "record_program_data_elements_changelog", "set_program_data_elements_updated_at", "set_program_data_elements_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_program_data_elements_changed", "record_program_data_elements_changelog", "set_program_data_elements_updated_at", "set_program_data_elements_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"program_data_elements\"", "created_at": 1775621421.5068293, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__program_data_elements"]}, "source.tamanu.tamanu.patient_birth_data": {"database": "central", "schema": "public", "name": "patient_birth_data", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_birth_data.yml", "original_file_path": "../../database/model/public/patient_birth_data.yml", "unique_id": "source.tamanu.tamanu.patient_birth_data", "fqn": ["tamanu", "tamanu", "patient_birth_data"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_birth_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Information about the birth of the patient, if their birth was recorded into Tamanu.\n\nThis is specifically data about the newborn, and only the birth-relevant data.\nOther patient data is found in the normal tables i.e. `patients`, `patient_additional_data`, etc.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_birth_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_birth_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_birth_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).\n\nThere is at most one `patient_birth_data` row per patient.\n\nNote that the `id` column is generated from this column to enforce this.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__patient_id"]}, "birth_weight": {"name": "birth_weight", "description": "Weight in kg at birth.", "meta": {"masking": {"kind": "float", "range": "2-10"}}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "2-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__birth_weight"]}, "birth_length": {"name": "birth_length", "description": "Length in cm at birth.", "meta": {"masking": {"kind": "float", "range": "10-100"}}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "10-100"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__birth_length"]}, "birth_delivery_type": {"name": "birth_delivery_type", "description": "Type of delivery.\n\nOne of:\n- `normal_vaginal_delivery`\n- `breech`\n- `emergency_c_section`\n- `elective_c_section`\n- `vacuum_extraction`\n- `forceps`\n- `other`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__birth_delivery_type"]}, "gestational_age_estimate": {"name": "gestational_age_estimate", "description": "Gestational age estimate (weeks).", "meta": {"masking": {"kind": "float", "range": "30-40"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "30-40"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__gestational_age_estimate"]}, "apgar_score_one_minute": {"name": "apgar_score_one_minute", "description": "[Apgar score](https://en.wikipedia.org/wiki/Apgar_score) one minute after birth.", "meta": {"masking": {"kind": "integer", "range": "0-10"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__apgar_score_one_minute"]}, "apgar_score_five_minutes": {"name": "apgar_score_five_minutes", "description": "[Apgar score](https://en.wikipedia.org/wiki/Apgar_score) five minutes after birth.", "meta": {"masking": {"kind": "integer", "range": "0-10"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__apgar_score_five_minutes"]}, "apgar_score_ten_minutes": {"name": "apgar_score_ten_minutes", "description": "[Apgar score](https://en.wikipedia.org/wiki/Apgar_score) ten minutes after birth.", "meta": {"masking": {"kind": "integer", "range": "0-10"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__apgar_score_ten_minutes"]}, "time_of_birth": {"name": "time_of_birth", "description": "Datetime of birth.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__time_of_birth"]}, "birth_type": {"name": "birth_type", "description": "`single` or `plural` birth.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__birth_type"]}, "attendant_at_birth": {"name": "attendant_at_birth", "description": "The type of the attendant at birth.\n\nOne of:\n- `doctor`\n- `midwife`\n- `nurse`\n- `traditional_birth_attentdant`\n- `other`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__attendant_at_birth"]}, "name_of_attendant_at_birth": {"name": "name_of_attendant_at_birth", "description": "Name of attendant at birth.", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__name_of_attendant_at_birth"]}, "birth_facility_id": {"name": "birth_facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) the birth was recorded at.\n\nThis is only required when `registered_birth_place` is `health_facility`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__birth_facility_id"]}, "registered_birth_place": {"name": "registered_birth_place", "description": "Type of the actual birth place.\n\nOne of:\n- `health_facility`\n- `home`\n- `other`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__registered_birth_place"]}, "time_of_birth_legacy": {"name": "time_of_birth_legacy", "description": "[Deprecated] Time of birth.", "meta": {"masking": "datetime"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__time_of_birth_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_birth_data.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "birth_order": {"name": "birth_order", "description": "An integer that represents the birth order of the patient.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_birth_data__birth_order"]}, "id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_birth_data.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}}, "meta": {"triggers": ["notify_patient_birth_data_changed", "record_patient_birth_data_changelog", "set_patient_birth_data_updated_at", "set_patient_birth_data_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_birth_data_changed", "record_patient_birth_data_changelog", "set_patient_birth_data_updated_at", "set_patient_birth_data_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_birth_data_changed", "record_patient_birth_data_changelog", "set_patient_birth_data_updated_at", "set_patient_birth_data_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_birth_data\"", "created_at": 1775621421.5445895, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_birth_data"]}, "source.tamanu.tamanu.program_registries": {"database": "central", "schema": "public", "name": "program_registries", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/program_registries.yml", "original_file_path": "../../database/model/public/program_registries.yml", "unique_id": "source.tamanu.tamanu.program_registries", "fqn": ["tamanu", "tamanu", "program_registries"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "program_registries", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of program registries.\n\nThis provides functionality to track a patient population defined by a particular disease or\ncondition, and follow this population over time.\n\nThis table defines the different registries available to track users with.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in program_registries.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in program_registries.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in program_registries.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in program_registries.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Machine-friendly identifier.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registries__code"]}, "name": {"name": "name", "description": "Human-friendly name.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registries__name"]}, "currently_at_type": {"name": "currently_at_type", "description": "Defines what kind of location the registry can be filtered with.\n\nOne of:\n- `village`\n- `facility`", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registries__currently_at_type"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in program_registries.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "program_id": {"name": "program_id", "description": "Reference to a [program](#!/source/source.tamanu.tamanu.programs).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registries__program_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in program_registries.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_program_registries_changed", "record_program_registries_changelog", "set_program_registries_updated_at", "set_program_registries_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_program_registries_changed", "record_program_registries_changelog", "set_program_registries_updated_at", "set_program_registries_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_program_registries_changed", "record_program_registries_changelog", "set_program_registries_updated_at", "set_program_registries_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"program_registries\"", "created_at": 1775621421.5679724, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__program_registries"]}, "source.tamanu.tamanu.invoice_insurance_plans": {"database": "central", "schema": "public", "name": "invoice_insurance_plans", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_insurance_plans.yml", "original_file_path": "../../database/model/public/invoice_insurance_plans.yml", "unique_id": "source.tamanu.tamanu.invoice_insurance_plans", "fqn": ["tamanu", "tamanu", "invoice_insurance_plans"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_insurance_plans", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table for insurance contracts used for invoicing.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_insurance_plans.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_insurance_plans.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "code": {"name": "code", "description": "Unique identifier code for the insurance contract.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurance_plans__code"]}, "name": {"name": "name", "description": "Human-readable name of the insurance contract.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurance_plans__name"]}, "default_coverage": {"name": "default_coverage", "description": "The default coverage (in percentage) of the insurance contract.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurance_plans__default_coverage"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in invoice_insurance_plans.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}}, "meta": {"triggers": ["notify_invoice_insurance_plans_changed", "record_invoice_insurance_plans_changelog", "set_invoice_insurance_plans_updated_at", "set_invoice_insurance_plans_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_insurance_plans_changed", "record_invoice_insurance_plans_changelog", "set_invoice_insurance_plans_updated_at", "set_invoice_insurance_plans_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_invoice_insurance_plans_changed", "record_invoice_insurance_plans_changelog", "set_invoice_insurance_plans_updated_at", "set_invoice_insurance_plans_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_insurance_plans\"", "created_at": 1775621421.5808558, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_insurance_plans"]}, "source.tamanu.tamanu.note_items": {"database": "central", "schema": "public", "name": "note_items", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/note_items.yml", "original_file_path": "../../database/model/public/note_items.yml", "unique_id": "source.tamanu.tamanu.note_items", "fqn": ["tamanu", "tamanu", "note_items"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "note_items", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Version 2 of note management.\n\nIn this version, notes were split between note pages and actual note (item) content.\n\nDeprecated.\n\nSee also [`note_pages`](#!/source/source.tamanu.tamanu.note_pages).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in note_items.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in note_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in note_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in note_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note_page_id": {"name": "note_page_id", "description": "The [note page](#!/source/source.tamanu.tamanu.note_pages) this item belongs to.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_items__note_page_id"]}, "revised_by_id": {"name": "revised_by_id", "description": "Reference to the [note_item](#!/source/source.tamanu.tamanu.note_items) that is revised.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_items__revised_by_id"]}, "author_id": {"name": "author_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who published this note item.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_items__author_id"]}, "on_behalf_of_id": {"name": "on_behalf_of_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who wrote this note item, if different from `author_id`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_items__on_behalf_of_id"]}, "content": {"name": "content", "description": "Text content of the note.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_items__content"]}, "date": {"name": "date", "description": "Local date for the record in note_items.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in note_items.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in note_items.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_note_items_changed", "record_note_items_changelog", "set_note_items_updated_at", "set_note_items_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical", "deprecated"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_note_items_changed", "record_note_items_changelog", "set_note_items_updated_at", "set_note_items_updated_at_sync_tick"]}, "tags": ["clinical", "deprecated"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical", "deprecated"], "meta": {"triggers": ["notify_note_items_changed", "record_note_items_changelog", "set_note_items_updated_at", "set_note_items_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"note_items\"", "created_at": 1775621421.615972, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__note_items"]}, "source.tamanu.tamanu.encounter_pause_prescription_histories": {"database": "central", "schema": "public", "name": "encounter_pause_prescription_histories", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounter_pause_prescription_histories.yml", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.yml", "unique_id": "source.tamanu.tamanu.encounter_pause_prescription_histories", "fqn": ["tamanu", "tamanu", "encounter_pause_prescription_histories"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounter_pause_prescription_histories", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This table tracks the history of paused prescriptions for encounters, including details about the action, user, and duration.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounter_pause_prescription_histories.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "encounter_prescription_id": {"name": "encounter_prescription_id", "description": "The ID of the prescription associated with the encounter.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__encounter_prescription_id"]}, "action": {"name": "action", "description": "The type of action performed, such as \"pause\" or \"resume.\"", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__action"]}, "action_date": {"name": "action_date", "description": "The date and time when the action was performed.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__action_date"]}, "action_user_id": {"name": "action_user_id", "description": "The ID of the user who performed the action.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__action_user_id"]}, "notes": {"name": "notes", "description": "Additional notes or comments of the paused prescription.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__notes"]}, "pause_duration": {"name": "pause_duration", "description": "The duration for which the prescription was paused.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__pause_duration"]}, "pause_time_unit": {"name": "pause_time_unit", "description": "The unit of time for the pause duration, such as \"days\" or \"hours.\"", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescription_histories__pause_time_unit"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounter_pause_prescription_histories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounter_pause_prescription_histories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounter_pause_prescription_histories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounter_pause_prescription_histories.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_encounter_pause_prescription_histories_changed", "record_encounter_pause_prescription_histories_changelog", "set_encounter_pause_prescription_histories_updated_at", "set_encounter_pause_prescription_histories_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounter_pause_prescription_histories_changed", "record_encounter_pause_prescription_histories_changelog", "set_encounter_pause_prescription_histories_updated_at", "set_encounter_pause_prescription_histories_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_encounter_pause_prescription_histories_changed", "record_encounter_pause_prescription_histories_changelog", "set_encounter_pause_prescription_histories_updated_at", "set_encounter_pause_prescription_histories_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounter_pause_prescription_histories\"", "created_at": 1775621421.6305966, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounter_pause_prescription_histories"]}, "source.tamanu.tamanu.program_registry_clinical_statuses": {"database": "central", "schema": "public", "name": "program_registry_clinical_statuses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/program_registry_clinical_statuses.yml", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.yml", "unique_id": "source.tamanu.tamanu.program_registry_clinical_statuses", "fqn": ["tamanu", "tamanu", "program_registry_clinical_statuses"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "program_registry_clinical_statuses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of clinical statuses used in program registries.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in program_registry_clinical_statuses.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in program_registry_clinical_statuses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in program_registry_clinical_statuses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in program_registry_clinical_statuses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Code (identifier) for the clinical status.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_clinical_statuses__code"]}, "name": {"name": "name", "description": "The name of the clinical status.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_clinical_statuses__name"]}, "color": {"name": "color", "description": "A color for the clinical status.\n\nOne of:\n- `purple`\n- `pink`\n- `orange`\n- `yellow`\n- `blue`\n- `green`\n- `grey`\n- `red`\n- `brown`\n- `teal`", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_clinical_statuses__color"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in program_registry_clinical_statuses.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "program_registry_id": {"name": "program_registry_id", "description": "Reference to the [Program Registry](#!/source/source.tamanu.tamanu.program_registries)\nthe status is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.program_registry_clinical_statuses__program_registry_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in program_registry_clinical_statuses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_program_registry_clinical_statuses_changed", "record_program_registry_clinical_statuses_changelog", "set_program_registry_clinical_statuses_updated_at", "set_program_registry_clinical_statuses_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_program_registry_clinical_statuses_changed", "record_program_registry_clinical_statuses_changelog", "set_program_registry_clinical_statuses_updated_at", "set_program_registry_clinical_statuses_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_program_registry_clinical_statuses_changed", "record_program_registry_clinical_statuses_changelog", "set_program_registry_clinical_statuses_updated_at", "set_program_registry_clinical_statuses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"program_registry_clinical_statuses\"", "created_at": 1775621421.653073, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__program_registry_clinical_statuses"]}, "source.tamanu.tamanu.local_system_facts": {"database": "central", "schema": "public", "name": "local_system_facts", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/local_system_facts.yml", "original_file_path": "../../database/model/public/local_system_facts.yml", "unique_id": "source.tamanu.tamanu.local_system_facts", "fqn": ["tamanu", "tamanu", "local_system_facts"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "local_system_facts", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A set of values that are proper to this installation of Tamanu.\n\nThese are never synchronised.\nUsage is entirely internal to Tamanu and should never be used externally.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in local_system_facts.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in local_system_facts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in local_system_facts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in local_system_facts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "key": {"name": "key", "description": "Key of the fact.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.local_system_facts__key"]}, "value": {"name": "value", "description": "Value of the fact.\n\nThis is `text`, but may be interpreted as other things, e.g. JSON objects or numbers.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.local_system_facts__value"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"local_system_facts\"", "created_at": 1775621421.65906, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__local_system_facts"]}, "source.tamanu.tamanu.invoices_invoice_insurance_plans": {"database": "central", "schema": "public", "name": "invoices_invoice_insurance_plans", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.yml", "unique_id": "source.tamanu.tamanu.invoices_invoice_insurance_plans", "fqn": ["tamanu", "tamanu", "invoices_invoice_insurance_plans"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoices_invoice_insurance_plans", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Junction table linking invoices to insurance contracts. This many-to-many relationship allows an invoice to be associated with multiple insurance contracts.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoices_invoice_insurance_plans.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoices_invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoices_invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoices_invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoices_invoice_insurance_plans.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "invoice_id": {"name": "invoice_id", "description": "Reference to the [invoice](#!/source/source.tamanu.tamanu.invoices) that this insurance contract applies to.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices_invoice_insurance_plans__invoice_id"]}, "invoice_insurance_plan_id": {"name": "invoice_insurance_plan_id", "description": "Reference to the [insurance contract](#!/source/source.tamanu.tamanu.invoice_insurance_plans) being applied to the invoice.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices_invoice_insurance_plans__invoice_insurance_plan_id"]}}, "meta": {"triggers": ["notify_invoices_invoice_insurance_plans_changed", "record_invoices_invoice_insurance_plans_changelog", "set_invoices_invoice_insurance_plans_updated_at", "set_invoices_invoice_insurance_plans_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoices_invoice_insurance_plans_changed", "record_invoices_invoice_insurance_plans_changelog", "set_invoices_invoice_insurance_plans_updated_at", "set_invoices_invoice_insurance_plans_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_invoices_invoice_insurance_plans_changed", "record_invoices_invoice_insurance_plans_changelog", "set_invoices_invoice_insurance_plans_updated_at", "set_invoices_invoice_insurance_plans_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoices_invoice_insurance_plans\"", "created_at": 1775621421.6739557, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoices_invoice_insurance_plans"]}, "source.tamanu.tamanu.refresh_tokens": {"database": "central", "schema": "public", "name": "refresh_tokens", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/refresh_tokens.yml", "original_file_path": "../../database/model/public/refresh_tokens.yml", "unique_id": "source.tamanu.tamanu.refresh_tokens", "fqn": ["tamanu", "tamanu", "refresh_tokens"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "refresh_tokens", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Refresh tokens are used by API clients to refresh their authentication quickly, within a timeout.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in refresh_tokens.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "refresh_id": {"name": "refresh_id", "description": "Random value given to the client to use as this refresh token.", "meta": {"masking": "string"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.refresh_tokens__refresh_id"]}, "device_id": {"name": "device_id", "description": "Unique device ID from the client.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.refresh_tokens__device_id"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users) being authenticated as.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.refresh_tokens__user_id"]}, "expires_at": {"name": "expires_at", "description": "When the refresh token expires.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.refresh_tokens__expires_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in refresh_tokens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in refresh_tokens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in refresh_tokens.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"refresh_tokens\"", "created_at": 1775621421.690531, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__refresh_tokens"]}, "source.tamanu.tamanu.death_revert_logs": {"database": "central", "schema": "public", "name": "death_revert_logs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/death_revert_logs.yml", "original_file_path": "../../database/model/public/death_revert_logs.yml", "unique_id": "source.tamanu.tamanu.death_revert_logs", "fqn": ["tamanu", "tamanu", "death_revert_logs"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "death_revert_logs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Patient deaths can be reverted if they were recorded in error, this tracks those reverts.\n\nSee [`patient_death_data`](#!/source/source.tamanu.tamanu.patient_death_data).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in death_revert_logs.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in death_revert_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in death_revert_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in death_revert_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "revert_time": {"name": "revert_time", "description": "When the reversion happened.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.death_revert_logs__revert_time"]}, "death_data_id": {"name": "death_data_id", "description": "The [`patient_death_data`](#!/source/source.tamanu.tamanu.patient_death_data) record this is reverting.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.death_revert_logs__death_data_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.death_revert_logs__patient_id"]}, "reverted_by_id": {"name": "reverted_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who reverted this death record.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.death_revert_logs__reverted_by_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in death_revert_logs.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_death_revert_logs_changed", "record_death_revert_logs_changelog", "set_death_revert_logs_updated_at", "set_death_revert_logs_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_death_revert_logs_changed", "record_death_revert_logs_changelog", "set_death_revert_logs_updated_at", "set_death_revert_logs_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_death_revert_logs_changed", "record_death_revert_logs_changelog", "set_death_revert_logs_updated_at", "set_death_revert_logs_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"death_revert_logs\"", "created_at": 1775621421.7225943, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__death_revert_logs"]}, "source.tamanu.tamanu.patient_program_registration_conditions": {"database": "central", "schema": "public", "name": "patient_program_registration_conditions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_program_registration_conditions.yml", "original_file_path": "../../database/model/public/patient_program_registration_conditions.yml", "unique_id": "source.tamanu.tamanu.patient_program_registration_conditions", "fqn": ["tamanu", "tamanu", "patient_program_registration_conditions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_program_registration_conditions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of conditions related to patients in a program registration.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_program_registration_conditions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_program_registration_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_program_registration_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_program_registration_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in patient_program_registration_conditions.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "deletion_date": {"name": "deletion_date", "description": "Date field which is a timestamp of record being deleted in patient_program_registration_conditions.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deletion_date"]}, "program_registry_condition_id": {"name": "program_registry_condition_id", "description": "Reference to the [Program Registry Condition](#!/source/source.tamanu.tamanu.program_registry_conditions).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registration_conditions__program_registry_condition_id"]}, "clinician_id": {"name": "clinician_id", "description": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) recording that condition.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registration_conditions__clinician_id"]}, "deletion_clinician_id": {"name": "deletion_clinician_id", "description": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) that removed the condition.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registration_conditions__deletion_clinician_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_program_registration_conditions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "reason_for_change": {"name": "reason_for_change", "description": "Optional field for recording the reason for changing the condition.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registration_conditions__reason_for_change"]}, "patient_program_registration_id": {"name": "patient_program_registration_id", "description": "Reference to the [Patient Program Registry](#!/source/source.tamanu.tamanu.patient_program_registrations)\nof the condition.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registration_conditions__patient_program_registration_id"]}, "program_registry_condition_category_id": {"name": "program_registry_condition_category_id", "description": "Reference to the [Program Registry Condition Category](#!/source/source.tamanu.tamanu.program_registry_condition_categories)\nof the condition.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registration_conditions__program_registry_condition_category_id"]}}, "meta": {"triggers": ["notify_patient_program_registration_conditions_changed", "record_patient_program_registration_conditions_changelog", "set_patient_program_registration_conditions_updated_at", "set_patient_program_registration_conditions_updated_at_sync_tic"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_program_registration_conditions_changed", "record_patient_program_registration_conditions_changelog", "set_patient_program_registration_conditions_updated_at", "set_patient_program_registration_conditions_updated_at_sync_tic"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_program_registration_conditions_changed", "record_patient_program_registration_conditions_changelog", "set_patient_program_registration_conditions_updated_at", "set_patient_program_registration_conditions_updated_at_sync_tic"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_program_registration_conditions\"", "created_at": 1775621421.7514434, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_program_registration_conditions"]}, "source.tamanu.tamanu.patients": {"database": "central", "schema": "public", "name": "patients", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patients.yml", "original_file_path": "../../database/model/public/patients.yml", "unique_id": "source.tamanu.tamanu.patients", "fqn": ["tamanu", "tamanu", "patients"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patients", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "The central record for a patient.\n\n\u26a0\ufe0f The full contents of this table are synced to all devices, and in larger deployments this may be\nhundreds of thousands of records (or even millions), so it is critical to keep the row size small.\n\nOnly contains basic patient data (name, dob, etc.): the bare minimum to be able to find that patient\nin the system from the search page.\n\nThe remainder of the patient data is stored in the `patient_additional_data` table, which is only\nsynced to a device once it has marked that patient for sync (in the `patient_facility` table).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patients.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patients.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patients.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patients.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "display_id": {"name": "display_id", "description": "Tamanu identifier for patients that is used on the front-end to refer to a patient.\n\nIt is usually the primary \"health system\" ID for this patient (ie something like a medicare number,\nnational healthcare number, etc), and may be imported from an external system or allocated by Tamanu\nitself.\n\nInformally this is called NHN or \"Display ID\" interchangeably.\n\nAdditional external IDs are tracked in the `patient_secondary_ids` table.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__display_id"]}, "first_name": {"name": "first_name", "description": "First name of patient", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__first_name"]}, "middle_name": {"name": "middle_name", "description": "Middle name of patient", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__middle_name"]}, "last_name": {"name": "last_name", "description": "Last name of patient", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__last_name"]}, "cultural_name": {"name": "cultural_name", "description": "Cultural name of patient", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__cultural_name"]}, "email": {"name": "email", "description": "Email address of patient", "meta": {"masking": "email"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "email"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__email"]}, "date_of_birth": {"name": "date_of_birth", "description": "Date of birth of patient", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__date_of_birth"]}, "sex": {"name": "sex", "description": "Sex of patient.\n\nOne of:\n- `male`\n- `female`\n- `other`", "meta": {}, "data_type": "user-defined", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__sex"]}, "village_id": {"name": "village_id", "description": "Tamanu village identifier defined in the reference data", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__village_id"]}, "additional_details": {"name": "additional_details", "description": "[Deprecated] Additional details of the patient", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__additional_details"]}, "date_of_death": {"name": "date_of_death", "description": "Date and time of death of patient", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__date_of_death"]}, "merged_into_id": {"name": "merged_into_id", "description": "Tamanu identifier for the patient the patient record was merged into", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__merged_into_id"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in patients.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "date_of_death_legacy": {"name": "date_of_death_legacy", "description": "[Deprecated] Timestamp of death of patient", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__date_of_death_legacy"]}, "date_of_birth_legacy": {"name": "date_of_birth_legacy", "description": "[Deprecated] Timestamp of birth of patient", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patients__date_of_birth_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patients.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patients_changed", "record_patients_changelog", "set_patients_updated_at", "set_patients_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["patient"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patients_changed", "record_patients_changelog", "set_patients_updated_at", "set_patients_updated_at_sync_tick"]}, "tags": ["patient"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["patient"], "meta": {"triggers": ["notify_patients_changed", "record_patients_changelog", "set_patients_updated_at", "set_patients_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patients\"", "created_at": 1775621421.7710547, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patients"]}, "source.tamanu.tamanu.departments": {"database": "central", "schema": "public", "name": "departments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/departments.yml", "original_file_path": "../../database/model/public/departments.yml", "unique_id": "source.tamanu.tamanu.departments", "fqn": ["tamanu", "tamanu", "departments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "departments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Basic department info with a reference to parent facility.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in departments.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in departments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in departments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in departments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Code for department.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.departments__code"]}, "name": {"name": "name", "description": "Full readable name for department.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.departments__name"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this department is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.departments__facility_id"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in departments.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in departments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_departments_changed", "record_departments_changelog", "set_departments_updated_at", "set_departments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_departments_changed", "record_departments_changelog", "set_departments_updated_at", "set_departments_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_departments_changed", "record_departments_changelog", "set_departments_updated_at", "set_departments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"departments\"", "created_at": 1775621421.785774, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__departments"]}, "source.tamanu.tamanu.note_pages": {"database": "central", "schema": "public", "name": "note_pages", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/note_pages.yml", "original_file_path": "../../database/model/public/note_pages.yml", "unique_id": "source.tamanu.tamanu.note_pages", "fqn": ["tamanu", "tamanu", "note_pages"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "note_pages", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Version 2 of note management.\n\nIn this version, notes were split between note pages and actual note (item) content.\n\nDeprecated.\n\nSee also [`note_items`](#!/source/source.tamanu.tamanu.note_items).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in note_pages.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in note_pages.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in note_pages.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in note_pages.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note_type": {"name": "note_type", "description": "Type of the note page.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_pages__note_type"]}, "record_id": {"name": "record_id", "description": "Polymorphic relationship to the record to which the note is attached (id).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_pages__record_id"]}, "record_type": {"name": "record_type", "description": "Polymorphic relationship to the record to which the note is attached (type).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.note_pages__record_type"]}, "date": {"name": "date", "description": "Local date for the record in note_pages.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in note_pages.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in note_pages.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in note_pages.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}}, "meta": {"triggers": ["notify_note_pages_changed", "record_note_pages_changelog", "set_note_pages_updated_at", "set_note_pages_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical", "deprecated"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_note_pages_changed", "record_note_pages_changelog", "set_note_pages_updated_at", "set_note_pages_updated_at_sync_tick"]}, "tags": ["clinical", "deprecated"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical", "deprecated"], "meta": {"triggers": ["notify_note_pages_changed", "record_note_pages_changelog", "set_note_pages_updated_at", "set_note_pages_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"note_pages\"", "created_at": 1775621421.8020053, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__note_pages"]}, "source.tamanu.tamanu.invoice_insurance_plan_items": {"database": "central", "schema": "public", "name": "invoice_insurance_plan_items", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_insurance_plan_items.yml", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.yml", "unique_id": "source.tamanu.tamanu.invoice_insurance_plan_items", "fqn": ["tamanu", "tamanu", "invoice_insurance_plan_items"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_insurance_plan_items", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table for insurance contract items used for invoicing.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_insurance_plan_items.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_insurance_plan_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_insurance_plan_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_insurance_plan_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_insurance_plan_items.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "invoice_insurance_plan_id": {"name": "invoice_insurance_plan_id", "description": "Reference to the [insurance contract](#!/source/source.tamanu.tamanu.invoice_insurance_plans).", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurance_plan_items__invoice_insurance_plan_id"]}, "invoice_product_id": {"name": "invoice_product_id", "description": "Reference to the [invoice product](#!/source/source.tamanu.tamanu.invoice_products).", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurance_plan_items__invoice_product_id"]}, "coverage_value": {"name": "coverage_value", "description": "The amount of coverage (in percentage) of the insurance contract item.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurance_plan_items__coverage_value"]}}, "meta": {"triggers": ["notify_invoice_insurance_plan_items_changed", "record_invoice_insurance_plan_items_changelog", "set_invoice_insurance_plan_items_updated_at", "set_invoice_insurance_plan_items_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_insurance_plan_items_changed", "record_invoice_insurance_plan_items_changelog", "set_invoice_insurance_plan_items_updated_at", "set_invoice_insurance_plan_items_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_invoice_insurance_plan_items_changed", "record_invoice_insurance_plan_items_changelog", "set_invoice_insurance_plan_items_updated_at", "set_invoice_insurance_plan_items_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_insurance_plan_items\"", "created_at": 1775621421.8146, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_insurance_plan_items"]}, "source.tamanu.tamanu.lab_tests": {"database": "central", "schema": "public", "name": "lab_tests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_tests.yml", "original_file_path": "../../database/model/public/lab_tests.yml", "unique_id": "source.tamanu.tamanu.lab_tests", "fqn": ["tamanu", "tamanu", "lab_tests"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_tests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A single test as part of a [lab request](#!/source/source.tamanu.tamanu.lab_requests).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_tests.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_tests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_tests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_tests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in lab_tests.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "result": {"name": "result", "description": "The result of the test.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__result"]}, "lab_request_id": {"name": "lab_request_id", "description": "The [lab request](#!/source/source.tamanu.tamanu.lab_requests) this test is part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__lab_request_id"]}, "lab_test_type_id": {"name": "lab_test_type_id", "description": "The [type](#!/source/source.tamanu.tamanu.lab_test_types) of the test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__lab_test_type_id"]}, "category_id": {"name": "category_id", "description": "Reference to the category ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__category_id"]}, "lab_test_method_id": {"name": "lab_test_method_id", "description": "Reference to the method ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__lab_test_method_id"]}, "laboratory_officer": {"name": "laboratory_officer", "description": "Name of the lab officer performing the test.", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__laboratory_officer"]}, "completed_date": {"name": "completed_date", "description": "Datetime at which the test was completed.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__completed_date"]}, "verification": {"name": "verification", "description": "Free-form field for a verification indication.\n\nMay be a verifying or supervising officer's name, a department, lab notes...", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__verification"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in lab_tests.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "completed_date_legacy": {"name": "completed_date_legacy", "description": "[Deprecated] Timestamp at which the test was completed.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_tests__completed_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_tests.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_lab_tests_changed", "record_lab_tests_changelog", "set_lab_tests_updated_at", "set_lab_tests_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_tests_changed", "record_lab_tests_changelog", "set_lab_tests_updated_at", "set_lab_tests_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_lab_tests_changed", "record_lab_tests_changelog", "set_lab_tests_updated_at", "set_lab_tests_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_tests\"", "created_at": 1775621421.8491006, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_tests"]}, "source.tamanu.tamanu.invoice_items": {"database": "central", "schema": "public", "name": "invoice_items", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_items.yml", "original_file_path": "../../database/model/public/invoice_items.yml", "unique_id": "source.tamanu.tamanu.invoice_items", "fqn": ["tamanu", "tamanu", "invoice_items"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_items", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Items (products) on invoices.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_items.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "invoice_id": {"name": "invoice_id", "description": "The [invoice](#!/source/source.tamanu.tamanu.invoices).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__invoice_id"]}, "order_date": {"name": "order_date", "description": "When the item was ordered.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__order_date"]}, "product_id": {"name": "product_id", "description": "The [product](#!/source/source.tamanu.tamanu.invoice_products).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__product_id"]}, "quantity": {"name": "quantity", "description": "Quantity ordered.", "meta": {"masking": {"kind": "integer", "range": "0-10"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__quantity"]}, "product_name_final": {"name": "product_name_final", "description": "The final product name used on the invoice. Saved from the product name field when the invoice is finalised.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__product_name_final"]}, "manual_entry_price": {"name": "manual_entry_price", "description": "Manually entered price override for this item, if specified. When set, this takes precedence over the product's standard price.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__manual_entry_price"]}, "ordered_by_user_id": {"name": "ordered_by_user_id", "description": "[Who](#!/source/source.tamanu.tamanu.users) ordered the item.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__ordered_by_user_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "product_code_final": {"name": "product_code_final", "description": "The final product code used on the invoice. Saved from the product code field when the invoice is finalised.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__product_code_final"]}, "note": {"name": "note", "description": "Free-form note for this item.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__note"]}, "source_record_type": {"name": "source_record_type", "description": "The underlying model that the source record belongs to.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__source_record_type"]}, "source_record_id": {"name": "source_record_id", "description": "Foreign key relation for record type.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__source_record_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_items.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "approved": {"name": "approved", "description": "A boolean field that enables clinicians to track the approval status of individual invoice line items", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__approved"]}, "price_final": {"name": "price_final", "description": "The final price per unit for this item on the invoice. This is determined by the manual_entry_price if provided, otherwise from the product's price when the invoice is finalised.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_items__price_final"]}}, "meta": {"triggers": ["notify_invoice_items_changed", "record_invoice_items_changelog", "set_invoice_items_updated_at", "set_invoice_items_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_items_changed", "record_invoice_items_changelog", "set_invoice_items_updated_at", "set_invoice_items_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoice_items_changed", "record_invoice_items_changelog", "set_invoice_items_updated_at", "set_invoice_items_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_items\"", "created_at": 1775621421.8808973, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_items"]}, "source.tamanu.tamanu.lab_requests": {"database": "central", "schema": "public", "name": "lab_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_requests.yml", "original_file_path": "../../database/model/public/lab_requests.yml", "unique_id": "source.tamanu.tamanu.lab_requests", "fqn": ["tamanu", "tamanu", "lab_requests"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Lab requests are the entrypoint of laboratory workflows in Tamanu.\n\nEach row is a request for a laboratory to perform a group of tests on a sample taken from a patient.\n\nIt will be updated over the course of the workflow to various statuses, starting with\n`reception_pending` (lab has not received the request yet), up to `published` (lab has completed the\ntests and has attached verified results).\n\nSee also: `lab_request_attachments`, `lab_request_logs`, `lab_results`, `lab_tests`,\n`lab_test_panels`, and related tables to those.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_requests.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "sample_time": {"name": "sample_time", "description": "When the sample was collected.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__sample_time"]}, "requested_date": {"name": "requested_date", "description": "When the request was submitted.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__requested_date"]}, "urgent": {"name": "urgent", "description": "Deprecated.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__urgent"]}, "specimen_attached": {"name": "specimen_attached", "description": "Whether a specimen is attached.\n\nThis implies `specimen_type_id`.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__specimen_attached"]}, "status": {"name": "status", "description": "The status of the request.\n\nOne of:\n- `reception_pending`\n- `results_pending`\n- `interim_results`\n- `to_be_verified`\n- `verified`\n- `published`\n- `cancelled`\n- `invalidated`\n- `deleted`\n- `sample-not-collected`\n- `entered-in-error`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__status"]}, "senaite_id": {"name": "senaite_id", "description": "When the [SENAITE](https://www.senaite.com/) integration is enabled, this is filled to the SENAITE\nID for the request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__senaite_id"]}, "sample_id": {"name": "sample_id", "description": "When the [SENAITE](https://www.senaite.com/) integration is enabled, this is filled to the SENAITE\nID for the sample.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__sample_id"]}, "requested_by_id": {"name": "requested_by_id", "description": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) who submitted the request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__requested_by_id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [Encounter](#!/source/source.tamanu.tamanu.encounters) the request is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__encounter_id"]}, "lab_test_category_id": {"name": "lab_test_category_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\ncategory of this request's test.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__lab_test_category_id"]}, "display_id": {"name": "display_id", "description": "Short unique identifier used on the frontend.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__display_id"]}, "lab_test_priority_id": {"name": "lab_test_priority_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\npriority of this request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__lab_test_priority_id"]}, "lab_test_laboratory_id": {"name": "lab_test_laboratory_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\nlaboratory fulfilling this request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__lab_test_laboratory_id"]}, "sample_time_legacy": {"name": "sample_time_legacy", "description": "[Deprecated] When the sample was collected.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__sample_time_legacy"]}, "requested_date_legacy": {"name": "requested_date_legacy", "description": "[Deprecated] When the request was submitted.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__requested_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_requests.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "reason_for_cancellation": {"name": "reason_for_cancellation", "description": "Why this request was cancelled.\n\nOne of:\n- `clinical`\n- `duplicate`\n- `entered-in-error`\n- `other`\n- `patient-discharged`\n- `patient-refused`", "meta": {}, "data_type": "character varying(31)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__reason_for_cancellation"]}, "published_date": {"name": "published_date", "description": "When this lab request's results were published.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__published_date"]}, "department_id": {"name": "department_id", "description": "Reference to the [Department](#!/source/source.tamanu.tamanu.departments) the request comes from.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__department_id"]}, "lab_test_panel_request_id": {"name": "lab_test_panel_request_id", "description": "Reference to the [Test Panel Request](#!/source/source.tamanu.tamanu.lab_test_panel_requests)\nassociated with this request, if any.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__lab_test_panel_request_id"]}, "lab_sample_site_id": {"name": "lab_sample_site_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing where\non the patient the sample was taken.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__lab_sample_site_id"]}, "specimen_type_id": {"name": "specimen_type_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\ntype of the specimen for the request, if specified.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__specimen_type_id"]}, "collected_by_id": {"name": "collected_by_id", "description": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) who collected the sample.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__collected_by_id"]}, "results_interpretation": {"name": "results_interpretation", "description": "Free-text interpretation and clinical commentary on the laboratory test results.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_requests__results_interpretation"]}}, "meta": {"triggers": ["notify_lab_requests_changed", "record_lab_requests_changelog", "set_lab_requests_updated_at", "set_lab_requests_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_requests_changed", "record_lab_requests_changelog", "set_lab_requests_updated_at", "set_lab_requests_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_lab_requests_changed", "record_lab_requests_changelog", "set_lab_requests_updated_at", "set_lab_requests_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_requests\"", "created_at": 1775621421.9576643, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_requests"]}, "source.tamanu.tamanu.SequelizeMeta": {"database": "central", "schema": "public", "name": "SequelizeMeta", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/SequelizeMeta.yml", "original_file_path": "../../database/model/public/SequelizeMeta.yml", "unique_id": "source.tamanu.tamanu.SequelizeMeta", "fqn": ["tamanu", "tamanu", "SequelizeMeta"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "SequelizeMeta", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This table tracks which migrations have been run. It is automatically managed by Sequelize (within Tamanu's `migrate`\nsubcommand), should never be edited manually", "columns": {"name": {"name": "name", "description": "Name of the migration", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.SequelizeMeta__name"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"SequelizeMeta\"", "created_at": 1775621421.961729, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__SequelizeMeta"]}, "source.tamanu.tamanu.invoices": {"database": "central", "schema": "public", "name": "invoices", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoices.yml", "original_file_path": "../../database/model/public/invoices.yml", "unique_id": "source.tamanu.tamanu.invoices", "fqn": ["tamanu", "tamanu", "invoices"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoices", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Invoices related to encounters.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoices.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "display_id": {"name": "display_id", "description": "Short unique identifier used on the frontend.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices__display_id"]}, "date": {"name": "date", "description": "Local date for the record in invoices.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "status": {"name": "status", "description": "Status of the invoice.\n\nOne of:\n- `cancelled`\n- `in_progress`\n- `finalised`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices__status"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this invoice is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices__encounter_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "patient_payment_status": {"name": "patient_payment_status", "description": "Payment status (patient portion, if applicable).\n\nOne of:\n- `unpaid`\n- `paid`\n- `partial`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices__patient_payment_status"]}, "insurer_payment_status": {"name": "insurer_payment_status", "description": "Payment status (insurer portion, if applicable).\n\nOne of:\n- `unpaid`\n- `paid`\n- `partial`\n- `rejected`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoices__insurer_payment_status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoices.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_invoices_changed", "record_invoices_changelog", "set_invoices_updated_at", "set_invoices_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoices_changed", "record_invoices_changelog", "set_invoices_updated_at", "set_invoices_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoices_changed", "record_invoices_changelog", "set_invoices_updated_at", "set_invoices_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoices\"", "created_at": 1775621422.0008945, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoices"]}, "source.tamanu.tamanu.patient_communications": {"database": "central", "schema": "public", "name": "patient_communications", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_communications.yml", "original_file_path": "../../database/model/public/patient_communications.yml", "unique_id": "source.tamanu.tamanu.patient_communications", "fqn": ["tamanu", "tamanu", "patient_communications"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_communications", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Messages being sent to a patient, via a variety of channels.\n\nThis is a multiplexed queue to send emails, SMS, IM messages, etc specifically to patients.\n\nProcessed by the `PatientEmailCommunicationProcessor` scheduled task.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_communications.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_communications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_communications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_communications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "type": {"name": "type", "description": "The type of communication.\n\nThis affects the template or action being taken.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__type"]}, "channel": {"name": "channel", "description": "The channel to send the message with.\n\nOne of:\n- Email\n- Sms\n- WhatsApp\n- Telegram", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__channel"]}, "subject": {"name": "subject", "description": "Subject line (short summary of the message).\n\nThis is the subject line of an email, or equivalent for other channels.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__subject"]}, "content": {"name": "content", "description": "Content of the message.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__content"]}, "status": {"name": "status", "description": "Processing status of the communication.\n\nOne of:\n- `Queued`\n- `Processed`\n- `Sent`\n- `Error`\n- `Delivered`\n- `Bad Format`", "meta": {}, "data_type": "user-defined", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__status"]}, "error": {"name": "error", "description": "If the communication sending fails, this is the error.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__error"]}, "retry_count": {"name": "retry_count", "description": "How many times the sending has been retried.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__retry_count"]}, "patient_id": {"name": "patient_id", "description": "The [patient](#!/source/source.tamanu.tamanu.patients) that communication is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__patient_id"]}, "destination": {"name": "destination", "description": "Destination address to send this message to.\n\nIf this is not provided here, it will be derived from the patient, such as using the\n[`patient_contacts`](#!/source/source.tamanu.tamanu.patient_contacts) table.", "meta": {"masking": "email"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "email"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__destination"]}, "attachment": {"name": "attachment", "description": "The attachment as a string.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__attachment"]}, "hash": {"name": "hash", "description": "Hash of original data that went into creating the row, for purposes of deduplication.\n\nThe hashing is done with the `hashtext` postgres function.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_communications__hash"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_communications.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patient_communications_changed", "record_patient_communications_changelog", "set_patient_communications_updated_at", "set_patient_communications_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_communications_changed", "record_patient_communications_changelog", "set_patient_communications_updated_at", "set_patient_communications_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_communications_changed", "record_patient_communications_changelog", "set_patient_communications_updated_at", "set_patient_communications_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_communications\"", "created_at": 1775621422.0206702, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_communications"]}, "source.tamanu.tamanu.signers_historical": {"database": "central", "schema": "public", "name": "signers_historical", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/signers_historical.yml", "original_file_path": "../../database/model/public/signers_historical.yml", "unique_id": "source.tamanu.tamanu.signers_historical", "fqn": ["tamanu", "tamanu", "signers_historical"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "signers_historical", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Historical VDS-NC signer records retained for compliance. Private keys have been\ncleared. The table is renamed from `signers` and is no longer actively used.\n\nSee also the `certifiable_vaccines` table.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in signers_historical.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in signers_historical.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in signers_historical.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in signers_historical.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "country_code": {"name": "country_code", "description": "ISO country code for the Health CA.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__country_code"]}, "private_key": {"name": "private_key", "description": "Private key data (cleared to NULL during migration).", "meta": {}, "data_type": "bytea", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__private_key"]}, "public_key": {"name": "public_key", "description": "Public key data.", "meta": {}, "data_type": "bytea", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__public_key"]}, "request": {"name": "request", "description": "Certificate Signing Request.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__request"]}, "certificate": {"name": "certificate", "description": "Signed Certificate (signed by the Health CA).", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__certificate"]}, "validity_period_start": {"name": "validity_period_start", "description": "Before that date, the key cannot be used, and signatures generated by it cannot be trusted.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__validity_period_start"]}, "validity_period_end": {"name": "validity_period_end", "description": "After that date, the key cannot be used, and signatures generated by it cannot be trusted.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__validity_period_end"]}, "signatures_issued": {"name": "signatures_issued", "description": "Counter of digital signatures issued from this key.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__signatures_issued"]}, "request_sent_at": {"name": "request_sent_at", "description": "Date at which the CSR was sent to be signed by the Health CA.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__request_sent_at"]}, "working_period_start": {"name": "working_period_start", "description": "Before that date, the key cannot be used.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__working_period_start"]}, "working_period_end": {"name": "working_period_end", "description": "After that date, the key cannot be used.\n\nAfter that date, the private key may also be nulled.\n\nThis is always less than or equal to `validity_period_end`.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.signers_historical__working_period_end"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"signers_historical\"", "created_at": 1775621422.0362542, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__signers_historical"]}, "source.tamanu.tamanu.invoice_price_list_items": {"database": "central", "schema": "public", "name": "invoice_price_list_items", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_price_list_items.yml", "original_file_path": "../../database/model/public/invoice_price_list_items.yml", "unique_id": "source.tamanu.tamanu.invoice_price_list_items", "fqn": ["tamanu", "tamanu", "invoice_price_list_items"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_price_list_items", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Contains individual pricing entries for specific products within a price list. Each record defines the price or pricing configuration for a particular product in the context of a specific price list.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_price_list_items.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_price_list_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_price_list_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_price_list_items.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_price_list_items.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "invoice_price_list_id": {"name": "invoice_price_list_id", "description": "Foreign key reference to the invoice_price_lists table. Links this pricing item to its parent price list.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_list_items__invoice_price_list_id"]}, "invoice_product_id": {"name": "invoice_product_id", "description": "Foreign key reference to the invoice products/services that can be priced. Identifies which product or service this pricing item applies to.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_list_items__invoice_product_id"]}, "price": {"name": "price", "description": "The price amount for this product in the context of this price list. Stored as a numeric value representing the cost in the system's base currency.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_list_items__price"]}, "is_hidden": {"name": "is_hidden", "description": "Determines whether the related invoice product should be hidden from searches on the frontend and also whether it should be automatically added to the invoice.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_price_list_items__is_hidden"]}}, "meta": {"triggers": ["notify_invoice_price_list_items_changed", "record_invoice_price_list_items_changelog", "set_invoice_price_list_items_updated_at", "set_invoice_price_list_items_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_price_list_items_changed", "record_invoice_price_list_items_changelog", "set_invoice_price_list_items_updated_at", "set_invoice_price_list_items_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_invoice_price_list_items_changed", "record_invoice_price_list_items_changelog", "set_invoice_price_list_items_updated_at", "set_invoice_price_list_items_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_price_list_items\"", "created_at": 1775621422.0508246, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_price_list_items"]}, "source.tamanu.tamanu.notes": {"database": "central", "schema": "public", "name": "notes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/notes.yml", "original_file_path": "../../database/model/public/notes.yml", "unique_id": "source.tamanu.tamanu.notes", "fqn": ["tamanu", "tamanu", "notes"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "notes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Notes recorded by clinicians or system generated.\n\nAlso see the deprecated [`note_items`](#!/source/source.tamanu.tamanu.note_items),\n[`note_pages`](#!/source/source.tamanu.tamanu.note_pages), and the even older\n[`notes_legacy`](#!/source/source.tamanu.tamanu.notes_legacy).\n\nThis is the current version (3) of the notes system.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in notes.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in notes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in notes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in notes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "record_id": {"name": "record_id", "description": "Polymorphic relationship to the record to which the note is attached (id).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__record_id"]}, "record_type": {"name": "record_type", "description": "Polymorphic relationship to the record to which the note is attached (type).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__record_type"]}, "date": {"name": "date", "description": "Local date for the record in notes.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in notes.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in notes.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in notes.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "author_id": {"name": "author_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who published this note.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__author_id"]}, "on_behalf_of_id": {"name": "on_behalf_of_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who wrote this note, if it wasn't the user who published it.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__on_behalf_of_id"]}, "content": {"name": "content", "description": "The content of the note recorded.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__content"]}, "revised_by_id": {"name": "revised_by_id", "description": "Reference to the [note](#!/source/source.tamanu.tamanu.notes) that is being revised.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__revised_by_id"]}, "note_type_id": {"name": "note_type_id", "description": "Reference to the note type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = noteType`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes__note_type_id"]}}, "meta": {"triggers": ["notify_notes_changed", "record_notes_changelog", "set_notes_updated_at", "set_notes_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_notes_changed", "record_notes_changelog", "set_notes_updated_at", "set_notes_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_notes_changed", "record_notes_changelog", "set_notes_updated_at", "set_notes_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"notes\"", "created_at": 1775621422.0911932, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__notes"]}, "source.tamanu.tamanu.imaging_results": {"database": "central", "schema": "public", "name": "imaging_results", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/imaging_results.yml", "original_file_path": "../../database/model/public/imaging_results.yml", "unique_id": "source.tamanu.tamanu.imaging_results", "fqn": ["tamanu", "tamanu", "imaging_results"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "imaging_results", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Result of an [imaging request](#!/source/source.tamanu.tamanu.imaging_requests).\n\nIn practice, there is usually one or two results per request:\n- one containing a reference to a PACS image, when imaging integrations are enabled;\n- one containing notes from a doctor who analysed the image.\n\nHowever there is no limit; for example there may be multiple notes from multiple doctors.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in imaging_results.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in imaging_results.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in imaging_results.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in imaging_results.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in imaging_results.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in imaging_results.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "imaging_request_id": {"name": "imaging_request_id", "description": "Reference to the [imaging request](#!/source/source.tamanu.tamanu.imaging_requests).", "meta": {}, "data_type": "character varying", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_results__imaging_request_id"]}, "completed_by_id": {"name": "completed_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who completed this imaging.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_results__completed_by_id"]}, "description": {"name": "description", "description": "Free-form description / notes about this imaging.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_results__description"]}, "external_code": {"name": "external_code", "description": "External code for this result, used with PACS integration (generally via FHIR).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_results__external_code"]}, "completed_at": {"name": "completed_at", "description": "When this result was completed.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_results__completed_at"]}, "result_image_url": {"name": "result_image_url", "description": "Link to external imaging result viewer.", "meta": {"masking": "url"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "url"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_results__result_image_url"]}}, "meta": {"triggers": ["notify_imaging_results_changed", "record_imaging_results_changelog", "set_imaging_results_updated_at", "set_imaging_results_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_imaging_results_changed", "record_imaging_results_changelog", "set_imaging_results_updated_at", "set_imaging_results_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_imaging_results_changed", "record_imaging_results_changelog", "set_imaging_results_updated_at", "set_imaging_results_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"imaging_results\"", "created_at": 1775621422.1161942, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__imaging_results"]}, "source.tamanu.tamanu.discharges": {"database": "central", "schema": "public", "name": "discharges", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/discharges.yml", "original_file_path": "../../database/model/public/discharges.yml", "unique_id": "source.tamanu.tamanu.discharges", "fqn": ["tamanu", "tamanu", "discharges"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "discharges", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Information about a discharge.\n\nA discharge is the end of the lifecycle for an encounter.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in discharges.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in discharges.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in discharges.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in discharges.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note": {"name": "note", "description": "Free-form notes about the discharge.\n\nMay include treatment plan and follow-ups, written by the discharging clinician.\n\nSince v2.0, also see the [`notes`](#!/source/source.tamanu.tamanu.notes) table for encounter and discharge notes.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__note"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this discharge is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__encounter_id"]}, "discharger_id": {"name": "discharger_id", "description": "The [discharging clinician](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__discharger_id"]}, "disposition_id": {"name": "disposition_id", "description": "The discharge disposition or classification of the discharge ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__disposition_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in discharges.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "facility_name": {"name": "facility_name", "description": "Name of the discharging facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__facility_name"]}, "facility_address": {"name": "facility_address", "description": "Address of the discharging facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__facility_address"]}, "facility_town": {"name": "facility_town", "description": "Town of the discharging facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.discharges__facility_town"]}}, "meta": {"triggers": ["notify_discharges_changed", "record_discharges_changelog", "set_discharges_updated_at", "set_discharges_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_discharges_changed", "record_discharges_changelog", "set_discharges_updated_at", "set_discharges_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_discharges_changed", "record_discharges_changelog", "set_discharges_updated_at", "set_discharges_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"discharges\"", "created_at": 1775621422.154963, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__discharges"]}, "source.tamanu.tamanu.patient_ongoing_prescriptions": {"database": "central", "schema": "public", "name": "patient_ongoing_prescriptions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_ongoing_prescriptions.yml", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.yml", "unique_id": "source.tamanu.tamanu.patient_ongoing_prescriptions", "fqn": ["tamanu", "tamanu", "patient_ongoing_prescriptions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_ongoing_prescriptions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association of patient to prescription", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_ongoing_prescriptions.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "patient_id": {"name": "patient_id", "description": "The [patient](#!/source/source.tamanu.tamanu.patients)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_ongoing_prescriptions__patient_id"]}, "prescription_id": {"name": "prescription_id", "description": "The [prescription](#!/source/source.tamanu.tamanu.prescriptions)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_ongoing_prescriptions__prescription_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_ongoing_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_ongoing_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_ongoing_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_ongoing_prescriptions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patient_ongoing_prescriptions_changed", "record_patient_ongoing_prescriptions_changelog", "set_patient_ongoing_prescriptions_updated_at", "set_patient_ongoing_prescriptions_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_ongoing_prescriptions_changed", "record_patient_ongoing_prescriptions_changelog", "set_patient_ongoing_prescriptions_updated_at", "set_patient_ongoing_prescriptions_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_patient_ongoing_prescriptions_changed", "record_patient_ongoing_prescriptions_changelog", "set_patient_ongoing_prescriptions_updated_at", "set_patient_ongoing_prescriptions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_ongoing_prescriptions\"", "created_at": 1775621422.1678538, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_ongoing_prescriptions"]}, "source.tamanu.tamanu.location_assignment_templates": {"database": "central", "schema": "public", "name": "location_assignment_templates", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/location_assignment_templates.yml", "original_file_path": "../../database/model/public/location_assignment_templates.yml", "unique_id": "source.tamanu.tamanu.location_assignment_templates", "fqn": ["tamanu", "tamanu", "location_assignment_templates"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "location_assignment_templates", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Templates for recurring location assignments that define when healthcare staff are scheduled to work at specific locations.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in location_assignment_templates.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) assigned to this location.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__user_id"]}, "location_id": {"name": "location_id", "description": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) where the user is assigned.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__location_id"]}, "date": {"name": "date", "description": "Local date for the record in location_assignment_templates.", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "start_time": {"name": "start_time", "description": "Start time of the daily assignment period.", "meta": {}, "data_type": "time without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__start_time"]}, "end_time": {"name": "end_time", "description": "End time of the daily assignment period.", "meta": {}, "data_type": "time without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__end_time"]}, "repeat_end_date": {"name": "repeat_end_date", "description": "Date when the repeating assignments should stop being generated.", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__repeat_end_date"]}, "repeat_frequency": {"name": "repeat_frequency", "description": "Number of frequency units between each assignment (e.g., every 2 weeks).", "meta": {}, "data_type": "smallint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__repeat_frequency"]}, "repeat_unit": {"name": "repeat_unit", "description": "Frequency unit for repeating assignments.\n\nOne of:\n- `WEEKLY`\n- `MONTHLY`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignment_templates__repeat_unit"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in location_assignment_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in location_assignment_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in location_assignment_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in location_assignment_templates.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_location_assignment_templates_changed", "record_location_assignment_templates_changelog", "set_location_assignment_templates_updated_at", "set_location_assignment_templates_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_location_assignment_templates_changed", "record_location_assignment_templates_changelog", "set_location_assignment_templates_updated_at", "set_location_assignment_templates_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_location_assignment_templates_changed", "record_location_assignment_templates_changelog", "set_location_assignment_templates_updated_at", "set_location_assignment_templates_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"location_assignment_templates\"", "created_at": 1775621422.1911132, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__location_assignment_templates"]}, "source.tamanu.tamanu.patient_facilities": {"database": "central", "schema": "public", "name": "patient_facilities", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_facilities.yml", "original_file_path": "../../database/model/public/patient_facilities.yml", "unique_id": "source.tamanu.tamanu.patient_facilities", "fqn": ["tamanu", "tamanu", "patient_facilities"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_facilities", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Tracks which patients are of interest to which facilities.\n\nThis is used to refine sync data: only patient data related to these patients is synced to a\nfacility (plus general data, and some exceptions apply like vaccine data under some conditions).\n\nIn Tamanu, this can be set manually on the facility server (via the \"mark for sync\" button), or\ncentrally (via some labs / vaccine programs, or via bulk-imports).\n\n_(\"Joe Patient attends X Clinic\" is clinical info; even though an entry in patient facilities\ndoesn't necessarily imply this, it often does.)_", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_facilities.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_facilities__facility_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_facilities__patient_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_facilities.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"js_class": "PatientFacility", "triggers": ["notify_patient_facilities_changed", "record_patient_facilities_changelog", "set_patient_facilities_updated_at", "set_patient_facilities_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientFacility", "triggers": ["notify_patient_facilities_changed", "record_patient_facilities_changelog", "set_patient_facilities_updated_at", "set_patient_facilities_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"js_class": "PatientFacility", "triggers": ["notify_patient_facilities_changed", "record_patient_facilities_changelog", "set_patient_facilities_updated_at", "set_patient_facilities_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_facilities\"", "created_at": 1775621422.2057555, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_facilities"]}, "source.tamanu.tamanu.patient_care_plans": {"database": "central", "schema": "public", "name": "patient_care_plans", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_care_plans.yml", "original_file_path": "../../database/model/public/patient_care_plans.yml", "unique_id": "source.tamanu.tamanu.patient_care_plans", "fqn": ["tamanu", "tamanu", "patient_care_plans"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_care_plans", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "List of current care plans the patient is on.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Care plans\".\n\nSee also: `public.patient_allergies`, `public.patient_conditions`, `public.patient_family_histories`,\n`public.patient_issues`.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_care_plans.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_care_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_care_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_care_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in patient_care_plans.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_care_plans__patient_id"]}, "examiner_id": {"name": "examiner_id", "description": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) who prescribed this care plan.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_care_plans__examiner_id"]}, "care_plan_id": {"name": "care_plan_id", "description": "Reference to the care plan ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_care_plans__care_plan_id"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in patient_care_plans.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_care_plans.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patient_care_plans_changed", "record_patient_care_plans_changelog", "set_patient_care_plans_updated_at", "set_patient_care_plans_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_care_plans_changed", "record_patient_care_plans_changelog", "set_patient_care_plans_updated_at", "set_patient_care_plans_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_care_plans_changed", "record_patient_care_plans_changelog", "set_patient_care_plans_updated_at", "set_patient_care_plans_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_care_plans\"", "created_at": 1775621422.2167895, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_care_plans"]}, "source.tamanu.tamanu.surveys": {"database": "central", "schema": "public", "name": "surveys", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/surveys.yml", "original_file_path": "../../database/model/public/surveys.yml", "unique_id": "source.tamanu.tamanu.surveys", "fqn": ["tamanu", "tamanu", "surveys"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "surveys", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Surveys, aka custom forms that can be filled by practitioners.\n\nThese are composed of [screen components](#!/source/source.tamanu.tamanu.survey_screen_components).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in surveys.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in surveys.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in surveys.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in surveys.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Machine-friendly code.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__code"]}, "name": {"name": "name", "description": "Human-friendly name.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__name"]}, "program_id": {"name": "program_id", "description": "The [program](#!/source/source.tamanu.tamanu.programs) grouping this survey.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__program_id"]}, "survey_type": {"name": "survey_type", "description": "Type of survey.\n\nOne of:\n- `programs`\n- `referral`\n- `obsolete`\n- `vitals`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__survey_type"]}, "is_sensitive": {"name": "is_sensitive", "description": "Whether the data recorded in the survey is sensitive.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__is_sensitive"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in surveys.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "notifiable": {"name": "notifiable", "description": "Whether filling this survey sends a notification email.\n\nThese are sent by the `SurveyCompletionNotifierProcessor` scheduled task.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__notifiable"]}, "notify_email_addresses": {"name": "notify_email_addresses", "description": "If `notifiable` is true, where to send the notification.", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.surveys__notify_email_addresses"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in surveys.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}}, "meta": {"triggers": ["notify_surveys_changed", "record_surveys_changelog", "set_surveys_updated_at", "set_surveys_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_surveys_changed", "record_surveys_changelog", "set_surveys_updated_at", "set_surveys_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_surveys_changed", "record_surveys_changelog", "set_surveys_updated_at", "set_surveys_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"surveys\"", "created_at": 1775621422.2441945, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__surveys"]}, "source.tamanu.tamanu.appointment_procedure_types": {"database": "central", "schema": "public", "name": "appointment_procedure_types", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/appointment_procedure_types.yml", "original_file_path": "../../database/model/public/appointment_procedure_types.yml", "unique_id": "source.tamanu.tamanu.appointment_procedure_types", "fqn": ["tamanu", "tamanu", "appointment_procedure_types"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "appointment_procedure_types", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Junction table linking appointments to procedure types, allowing multiple procedure types to be associated with a single appointment.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in appointment_procedure_types.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "appointment_id": {"name": "appointment_id", "description": "Reference to the [appointment](#!/source/source.tamanu.tamanu.appointments) this procedure type is associated with.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_procedure_types__appointment_id"]}, "procedure_type_id": {"name": "procedure_type_id", "description": "Reference to the procedure type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = procedureType`) associated with this appointment.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointment_procedure_types__procedure_type_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in appointment_procedure_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in appointment_procedure_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in appointment_procedure_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in appointment_procedure_types.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_appointment_procedure_types_changed", "record_appointment_procedure_types_changelog", "set_appointment_procedure_types_updated_at", "set_appointment_procedure_types_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_appointment_procedure_types_changed", "record_appointment_procedure_types_changelog", "set_appointment_procedure_types_updated_at", "set_appointment_procedure_types_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_appointment_procedure_types_changed", "record_appointment_procedure_types_changelog", "set_appointment_procedure_types_updated_at", "set_appointment_procedure_types_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"appointment_procedure_types\"", "created_at": 1775621422.257033, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__appointment_procedure_types"]}, "source.tamanu.tamanu.report_requests": {"database": "central", "schema": "public", "name": "report_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/report_requests.yml", "original_file_path": "../../database/model/public/report_requests.yml", "unique_id": "source.tamanu.tamanu.report_requests", "fqn": ["tamanu", "tamanu", "report_requests"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "report_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Queued requests for reports by users.\n\nReports can be generated on-demand on the server a user is connected to, or it can be queued and\nexecuted at the server's leisure, and then sent attached to an email.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in report_requests.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in report_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in report_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in report_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "report_type": {"name": "report_type", "description": "If the report is defined in code, this is the code of that report.\n\nMost reports are now created in SQL, but there are still a number of legacy reports that are\nhardcoded in the Tamanu source code, and this is how they're referenced.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__report_type"]}, "recipients": {"name": "recipients", "description": "JSON array of email addresses.\n\nSome legacy data may exist that specifies this as a comma-separated values.", "meta": {"masking": "email"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "email"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__recipients"]}, "parameters": {"name": "parameters", "description": "JSON parameters for the report.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__parameters"]}, "status": {"name": "status", "description": "Processing status of the report request.\n\nOne of:\n- `Received`\n- `Processing`\n- `Processed`\n- `Error`", "meta": {}, "data_type": "character varying(31)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__status"]}, "requested_by_user_id": {"name": "requested_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) requesting this report generation.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__requested_by_user_id"]}, "error": {"name": "error", "description": "If the report fails to process, the error.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__error"]}, "process_started_time": {"name": "process_started_time", "description": "When processing started.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__process_started_time"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this report request is from.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__facility_id"]}, "export_format": {"name": "export_format", "description": "The format the report results must be exported as.\n\nOne of:\n- `xlsx`\n- `csv`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__export_format"]}, "report_definition_version_id": {"name": "report_definition_version_id", "description": "The [report version](#!/source/source.tamanu.tamanu.report_definition_versions) being generated.\n\nNote that this is a version, not a report. If a report is updated after a request is queued, the\n\"old\" version will be executed. Additionally, new versions must be synced to facilities to be usable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_requests__report_definition_version_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in report_requests.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_report_requests_changed", "record_report_requests_changelog", "set_report_requests_updated_at", "set_report_requests_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_report_requests_changed", "record_report_requests_changelog", "set_report_requests_updated_at", "set_report_requests_updated_at_sync_tick"]}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": ["notify_report_requests_changed", "record_report_requests_changelog", "set_report_requests_updated_at", "set_report_requests_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"report_requests\"", "created_at": 1775621422.2993705, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__report_requests"]}, "source.tamanu.tamanu.reference_drugs": {"database": "central", "schema": "public", "name": "reference_drugs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/reference_drugs.yml", "original_file_path": "../../database/model/public/reference_drugs.yml", "unique_id": "source.tamanu.tamanu.reference_drugs", "fqn": ["tamanu", "tamanu", "reference_drugs"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "reference_drugs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Additional information about referenceData that is of the type \u201cdrug\u201d", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in reference_drugs.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "reference_data_id": {"name": "reference_data_id", "description": "Id of the associated reference data", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drugs__reference_data_id"]}, "route": {"name": "route", "description": "Route of the drug", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drugs__route"]}, "units": {"name": "units", "description": "Units of the drug", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drugs__units"]}, "notes": {"name": "notes", "description": "Notes of the drug", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drugs__notes"]}, "is_sensitive": {"name": "is_sensitive", "description": "Whether the drug is sensitive and requires special handling", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drugs__is_sensitive"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in reference_drugs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in reference_drugs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in reference_drugs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in reference_drugs.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_reference_drugs_changed", "record_reference_drugs_changelog", "set_reference_drugs_updated_at", "set_reference_drugs_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_reference_drugs_changed", "record_reference_drugs_changelog", "set_reference_drugs_updated_at", "set_reference_drugs_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_reference_drugs_changed", "record_reference_drugs_changelog", "set_reference_drugs_updated_at", "set_reference_drugs_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"reference_drugs\"", "created_at": 1775621422.313998, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__reference_drugs"]}, "source.tamanu.tamanu.invoice_insurer_payments": {"database": "central", "schema": "public", "name": "invoice_insurer_payments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_insurer_payments.yml", "original_file_path": "../../database/model/public/invoice_insurer_payments.yml", "unique_id": "source.tamanu.tamanu.invoice_insurer_payments", "fqn": ["tamanu", "tamanu", "invoice_insurer_payments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_insurer_payments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Extra metadata about a payment when it was done by a patient.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_insurer_payments.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "invoice_payment_id": {"name": "invoice_payment_id", "description": "The [payment](#!/source/source.tamanu.tamanu.invoice_payments).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurer_payments__invoice_payment_id"]}, "insurer_id": {"name": "insurer_id", "description": "The insurer ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurer_payments__insurer_id"]}, "status": {"name": "status", "description": "The status of this payment.\n\nOne of:\n- `unpaid`\n- `paid`\n- `partial`\n- `rejected`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurer_payments__status"]}, "reason": {"name": "reason", "description": "The reason for the payment. Generally this is used for rejections.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_insurer_payments__reason"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_insurer_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_insurer_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_insurer_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_insurer_payments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_invoice_insurer_payments_changed", "record_invoice_insurer_payments_changelog", "set_invoice_insurer_payments_updated_at", "set_invoice_insurer_payments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_insurer_payments_changed", "record_invoice_insurer_payments_changelog", "set_invoice_insurer_payments_updated_at", "set_invoice_insurer_payments_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoice_insurer_payments_changed", "record_invoice_insurer_payments_changelog", "set_invoice_insurer_payments_updated_at", "set_invoice_insurer_payments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_insurer_payments\"", "created_at": 1775621422.3448274, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_insurer_payments"]}, "source.tamanu.tamanu.procedures": {"database": "central", "schema": "public", "name": "procedures", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/procedures.yml", "original_file_path": "../../database/model/public/procedures.yml", "unique_id": "source.tamanu.tamanu.procedures", "fqn": ["tamanu", "tamanu", "procedures"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "procedures", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Record of each procedure in progress or completed.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in procedures.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in procedures.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in procedures.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in procedures.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "completed": {"name": "completed", "description": "Whether the procedure has completed.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__completed"]}, "date": {"name": "date", "description": "Local date for the record in procedures.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "end_time": {"name": "end_time", "description": "When the procedure ended, if it's completed.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__end_time"]}, "note": {"name": "note", "description": "Free-form description of the procedure.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__note"]}, "completed_note": {"name": "completed_note", "description": "Free-form notes at completion of the procedure.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__completed_note"]}, "encounter_id": {"name": "encounter_id", "description": "The [encounter](#!/source/source.tamanu.tamanu.encounters) this procedure is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__encounter_id"]}, "location_id": {"name": "location_id", "description": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) the procedure happens in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__location_id"]}, "procedure_type_id": {"name": "procedure_type_id", "description": "Reference to the procedure type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = procedureType`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__procedure_type_id"]}, "anaesthetic_id": {"name": "anaesthetic_id", "description": "Reference to the anaesthetic ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = drug`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__anaesthetic_id"]}, "physician_id": {"name": "physician_id", "description": "Reference to the [physician](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__physician_id"]}, "anaesthetist_id": {"name": "anaesthetist_id", "description": "Reference to the [anaesthetist](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__anaesthetist_id"]}, "start_time": {"name": "start_time", "description": "When the procedure started.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__start_time"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in procedures.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "start_time_legacy": {"name": "start_time_legacy", "description": "[Deprecated] When the procedure started.", "meta": {"masking": "datetime"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__start_time_legacy"]}, "end_time_legacy": {"name": "end_time_legacy", "description": "[Deprecated] When the procedure ended.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__end_time_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in procedures.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "department_id": {"name": "department_id", "description": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) where the procedure is performed.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__department_id"]}, "assistant_anaesthetist_id": {"name": "assistant_anaesthetist_id", "description": "Reference to the assistant [anaesthetist](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__assistant_anaesthetist_id"]}, "time_in": {"name": "time_in", "description": "The time when the patient entered the procedure room or when the procedure setup began.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__time_in"]}, "time_out": {"name": "time_out", "description": "The time when the patient left the procedure room or when the procedure cleanup was completed.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedures__time_out"]}}, "meta": {"triggers": ["notify_procedures_changed", "record_procedures_changelog", "set_procedures_updated_at", "set_procedures_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_procedures_changed", "record_procedures_changelog", "set_procedures_updated_at", "set_procedures_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_procedures_changed", "record_procedures_changelog", "set_procedures_updated_at", "set_procedures_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"procedures\"", "created_at": 1775621422.3897443, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__procedures"]}, "source.tamanu.tamanu.roles": {"database": "central", "schema": "public", "name": "roles", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/roles.yml", "original_file_path": "../../database/model/public/roles.yml", "unique_id": "source.tamanu.tamanu.roles", "fqn": ["tamanu", "tamanu", "roles"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "roles", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "These are sets of permissions that are given to users to determine what they can do in Tamanu.\n\nThe actual permissions are associated to the role in the\n[`permissions`](#!/source/source.tamanu.tamanu.permissions) table.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in roles.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in roles.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in roles.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in roles.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Readable name for the role.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.roles__name"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in roles.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_roles_changed", "record_roles_changelog", "set_roles_updated_at", "set_roles_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_roles_changed", "record_roles_changelog", "set_roles_updated_at", "set_roles_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_roles_changed", "record_roles_changelog", "set_roles_updated_at", "set_roles_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"roles\"", "created_at": 1775621422.3974314, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__roles"]}, "source.tamanu.tamanu.imaging_requests": {"database": "central", "schema": "public", "name": "imaging_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/imaging_requests.yml", "original_file_path": "../../database/model/public/imaging_requests.yml", "unique_id": "source.tamanu.tamanu.imaging_requests", "fqn": ["tamanu", "tamanu", "imaging_requests"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "imaging_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Imaging requests are the entrypoint of imaging workflows in Tamanu.\n\nEach row is a request for radiology to perform one or more imagings on a patient.\n\nImagings can have one or more [request areas](#!/source/source.tamanu.tamanu.imaging_request_areas)\nattached, and when completed will have [results](#!/source/source.tamanu.tamanu.imaging_results).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in imaging_requests.", "meta": {}, "data_type": "character varying", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in imaging_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in imaging_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in imaging_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "status": {"name": "status", "description": "The status of the request.\n\nOne of:\n- `pending`\n- `in_progress`\n- `completed`\n- `cancelled`\n- `deleted`\n- `entered_in_error`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__status"]}, "requested_date": {"name": "requested_date", "description": "When the imaging was requested.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__requested_date"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this imaging request is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__encounter_id"]}, "requested_by_id": {"name": "requested_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who requested this imaging.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__requested_by_id"]}, "legacy_results": {"name": "legacy_results", "description": "[Deprecated] Description of the results.\n\nSince v1.24 this has moved to the [imaging results](#!/source/source.tamanu.tamanu.imaging_results) table.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__legacy_results"]}, "completed_by_id": {"name": "completed_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who completed this imaging.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__completed_by_id"]}, "location_id": {"name": "location_id", "description": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) for this imaging request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__location_id"]}, "imaging_type": {"name": "imaging_type", "description": "Type of imaging.\n\nOne of:\n- `angiogram`\n- `colonoscopy`\n- `ctScan`\n- `ecg`\n- `echocardiogram`\n- `endoscopy`\n- `fluroscopy`\n- `holterMonitor`\n- `mammogram`\n- `orthopantomography`\n- `mri`\n- `stressTest`\n- `ultrasound`\n- `vascularStudy`\n- `xRay`", "meta": {}, "data_type": "character varying(31)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__imaging_type"]}, "requested_date_legacy": {"name": "requested_date_legacy", "description": "[Deprecated] Timestamp when the imaging was requested.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__requested_date_legacy"]}, "priority": {"name": "priority", "description": "Priority of the request.\n\nThis is a customisable list; by default the values are `routine`, `urgent`, `asap`, `stat`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__priority"]}, "location_group_id": {"name": "location_group_id", "description": "Reference to the [location group](#!/source/source.tamanu.tamanu.location_groups) for this imaging request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__location_group_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in imaging_requests.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "reason_for_cancellation": {"name": "reason_for_cancellation", "description": "If the request is cancelled, why that is.\n\nThis is a customisable list; by default the values are `duplicate` and `entered-in-error`.\n\nThe 31-character limit was [arbitrary to avoid extremely long values set in error](https://github.com/beyondessential/tamanu/pull/3512/files#r1102169113).", "meta": {"masking": "text"}, "data_type": "character varying(1024)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__reason_for_cancellation"]}, "display_id": {"name": "display_id", "description": "Short unique identifier used on the frontend.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_requests__display_id"]}}, "meta": {"triggers": ["notify_imaging_requests_changed", "record_imaging_requests_changelog", "set_imaging_requests_updated_at", "set_imaging_requests_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_imaging_requests_changed", "record_imaging_requests_changelog", "set_imaging_requests_updated_at", "set_imaging_requests_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_imaging_requests_changed", "record_imaging_requests_changelog", "set_imaging_requests_updated_at", "set_imaging_requests_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"imaging_requests\"", "created_at": 1775621422.4504018, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__imaging_requests"]}, "source.tamanu.tamanu.reference_data": {"database": "central", "schema": "public", "name": "reference_data", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/reference_data.yml", "original_file_path": "../../database/model/public/reference_data.yml", "unique_id": "source.tamanu.tamanu.reference_data", "fqn": ["tamanu", "tamanu", "reference_data"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "reference_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "User imported reference data for the environment grouped by type.\n\n- Catch-all for simple reference data types - there are a LOT of kinds of reference data that exist as just an ID, a \nstring label, and occasionally a code; these are all grouped into this table to avoid overcomplicating the schema.\n- Occasionally a type of simple reference data will gain some complexity, at which point it will be refactored/migrated \nout to use its own table.\n- Simple reference data types include a code, type, name and visibility status.\n- Example types include `diagnosis`, `procedures`", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in reference_data.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in reference_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in reference_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in reference_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Code of the data item (short value, alphanumerics and hyphens).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data__code"]}, "type": {"name": "type", "description": "Class of the data (referred to in code).\n\nWhenever this table is referred to in a relationship, it's to a specific `type` here. For example a\ntable might have a `diagnosis_id`, which is a reference to this table, for specifically only the\nrows with `type = diagnosis`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data__type"]}, "name": {"name": "name", "description": "Actual data", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data__name"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in reference_data.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in reference_data.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "system_required": {"name": "system_required", "description": "Indicates if this record is system-managed and cannot be modified by users", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data__system_required"]}}, "meta": {"triggers": ["notify_reference_data_changed", "record_reference_data_changelog", "set_reference_data_updated_at", "set_reference_data_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_reference_data_changed", "record_reference_data_changelog", "set_reference_data_updated_at", "set_reference_data_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_reference_data_changed", "record_reference_data_changelog", "set_reference_data_updated_at", "set_reference_data_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"reference_data\"", "created_at": 1775621422.4666111, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__reference_data"]}, "source.tamanu.tamanu.patient_issues": {"database": "central", "schema": "public", "name": "patient_issues", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_issues.yml", "original_file_path": "../../database/model/public/patient_issues.yml", "unique_id": "source.tamanu.tamanu.patient_issues", "fqn": ["tamanu", "tamanu", "patient_issues"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_issues", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "List of \"other issues\" known about a patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Other patient issues\".\n\nSee also: `public.patient_allergies`, `public.patient_care_plans`, `public.patient_conditions`,\n`public.patient_family_histories`.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_issues.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_issues.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_issues.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_issues.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note": {"name": "note", "description": "Free-form description of this issue.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_issues__note"]}, "recorded_date": {"name": "recorded_date", "description": "Datetime at which this issue was recorded.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_issues__recorded_date"]}, "type": {"name": "type", "description": "If set to `Warning`, an alert will pop up when visiting the patient.", "meta": {}, "data_type": "user-defined", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_issues__type"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_issues__patient_id"]}, "recorded_date_legacy": {"name": "recorded_date_legacy", "description": "[Deprecated] Timestamp at which this issue was recorded.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_issues__recorded_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_issues.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"js_class": "PatientIssue", "triggers": ["notify_patient_issues_changed", "record_patient_issues_changelog", "set_patient_issues_updated_at", "set_patient_issues_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientIssue", "triggers": ["notify_patient_issues_changed", "record_patient_issues_changelog", "set_patient_issues_updated_at", "set_patient_issues_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"js_class": "PatientIssue", "triggers": ["notify_patient_issues_changed", "record_patient_issues_changelog", "set_patient_issues_updated_at", "set_patient_issues_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_issues\"", "created_at": 1775621422.4847472, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_issues"]}, "source.tamanu.tamanu.sync_lookup_ticks": {"database": "central", "schema": "public", "name": "sync_lookup_ticks", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/sync_lookup_ticks.yml", "original_file_path": "../../database/model/public/sync_lookup_ticks.yml", "unique_id": "source.tamanu.tamanu.sync_lookup_ticks", "fqn": ["tamanu", "tamanu", "sync_lookup_ticks"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "sync_lookup_ticks", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Stores range of sync lookup ticks per sync.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in sync_lookup_ticks.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "source_start_tick": {"name": "source_start_tick", "description": "Represents the previous lookup up to tick.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup_ticks__source_start_tick"]}, "lookup_end_tick": {"name": "lookup_end_tick", "description": "Represents the new sync tick at time of updating lookup-pending records.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup_ticks__lookup_end_tick"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"sync_lookup_ticks\"", "created_at": 1775621422.4906502, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__sync_lookup_ticks"]}, "source.tamanu.tamanu.settings": {"database": "central", "schema": "public", "name": "settings", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/settings.yml", "original_file_path": "../../database/model/public/settings.yml", "unique_id": "source.tamanu.tamanu.settings", "fqn": ["tamanu", "tamanu", "settings"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "settings", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Shared and synced configuration values.\n\nAlways set from the Central server / Admin interfaces and then synced to facilities.\n\nThose can change dynamically when a server/client is up, some settings are read at point of use and\nso change is applied \"immediately\", some settings are read once at server start but those should be\nrare and eventually eliminated as there's no facility within Tamanu to restart its own servers.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in settings.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in settings.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in settings.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in settings.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "key": {"name": "key", "description": "Dotted JSON path.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.settings__key"]}, "value": {"name": "value", "description": "JSON value.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.settings__value"]}, "facility_id": {"name": "facility_id", "description": "The [facility](#!/source/source.tamanu.tamanu.facilities) this setting is scoped to.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.settings__facility_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in settings.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "scope": {"name": "scope", "description": "Scope of the setting, which determines how it's applied.\n\nOne of:\n- `global`\n- `central`\n- `facility`", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.settings__scope"]}}, "meta": {"triggers": ["notify_settings_changed", "record_settings_changelog", "set_settings_updated_at", "set_settings_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_settings_changed", "record_settings_changelog", "set_settings_updated_at", "set_settings_updated_at_sync_tick"]}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": ["notify_settings_changed", "record_settings_changelog", "set_settings_updated_at", "set_settings_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"settings\"", "created_at": 1775621422.514408, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__settings"]}, "source.tamanu.tamanu.lab_test_panel_requests": {"database": "central", "schema": "public", "name": "lab_test_panel_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_test_panel_requests.yml", "original_file_path": "../../database/model/public/lab_test_panel_requests.yml", "unique_id": "source.tamanu.tamanu.lab_test_panel_requests", "fqn": ["tamanu", "tamanu", "lab_test_panel_requests"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_test_panel_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A request for a lab test panel.\n\nSee [`lab_test_panels`](#!/source/source.tamanu.tamanu.lab_test_panels) for more about those.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_test_panel_requests.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_test_panel_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_test_panel_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_test_panel_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "lab_test_panel_id": {"name": "lab_test_panel_id", "description": "The [test panel](#!/source/source.tamanu.tamanu.lab_test_panels).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panel_requests__lab_test_panel_id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this lab test panel request is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panel_requests__encounter_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_test_panel_requests.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_lab_test_panel_requests_changed", "record_lab_test_panel_requests_changelog", "set_lab_test_panel_requests_updated_at", "set_lab_test_panel_requests_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_test_panel_requests_changed", "record_lab_test_panel_requests_changelog", "set_lab_test_panel_requests_updated_at", "set_lab_test_panel_requests_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_lab_test_panel_requests_changed", "record_lab_test_panel_requests_changelog", "set_lab_test_panel_requests_updated_at", "set_lab_test_panel_requests_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_test_panel_requests\"", "created_at": 1775621422.5388052, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_test_panel_requests"]}, "source.tamanu.tamanu.vitals": {"database": "central", "schema": "public", "name": "vitals", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/vitals.yml", "original_file_path": "../../database/model/public/vitals.yml", "unique_id": "source.tamanu.tamanu.vitals", "fqn": ["tamanu", "tamanu", "vitals"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "vitals", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "[Deprecated] Patient's observed vitals. This is now done as a survey response.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in vitals.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in vitals.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in vitals.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in vitals.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date_recorded": {"name": "date_recorded", "description": "Local date and time of the event being recorded in vitals.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_recorded"]}, "temperature": {"name": "temperature", "description": "Observed patient's body temperature", "meta": {"masking": {"kind": "float", "range": "35-42"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "35-42"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__temperature"]}, "weight": {"name": "weight", "description": "Observed patient's body weight", "meta": {"masking": {"kind": "float", "range": "20-120"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "20-120"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__weight"]}, "height": {"name": "height", "description": "Observed patient's height", "meta": {"masking": {"kind": "float", "range": "50-220"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "50-220"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__height"]}, "sbp": {"name": "sbp", "description": "Observed patient's systolic blood pressure", "meta": {"masking": {"kind": "float", "range": "60-150"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "60-150"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__sbp"]}, "dbp": {"name": "dbp", "description": "Observed patient's diastolic blood pressure", "meta": {"masking": {"kind": "float", "range": "60-150"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "60-150"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__dbp"]}, "heart_rate": {"name": "heart_rate", "description": "Observed patient's heart rate", "meta": {"masking": {"kind": "float", "range": "60-200"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "60-200"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__heart_rate"]}, "respiratory_rate": {"name": "respiratory_rate", "description": "Observed patient's respiratory rate", "meta": {"masking": {"kind": "float", "range": "10-100"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "10-100"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__respiratory_rate"]}, "spo2": {"name": "spo2", "description": "Observed patient's SpO2 level or saturation of peripheral oxygen", "meta": {"masking": {"kind": "float", "range": "90-100"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "90-100"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__spo2"]}, "avpu": {"name": "avpu", "description": "Observed patient's AVPU (alert, verbal, pain, unresponsive) level", "meta": {}, "data_type": "user-defined", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__avpu"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this recording of vitals is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__encounter_id"]}, "gcs": {"name": "gcs", "description": "Observed patient's Glasgow coma scale (GCS)", "meta": {"masking": {"kind": "integer", "range": "3-15"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "3-15"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__gcs"]}, "hemoglobin": {"name": "hemoglobin", "description": "Observed patient's hemoglobin levels", "meta": {"masking": {"kind": "integer", "range": "10-30"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "10-30"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__hemoglobin"]}, "fasting_blood_glucose": {"name": "fasting_blood_glucose", "description": "Observed patient's fasting blood glucose level", "meta": {"masking": {"kind": "float", "range": "4-10"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "4-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__fasting_blood_glucose"]}, "urine_ph": {"name": "urine_ph", "description": "Observed patient's urine pH", "meta": {"masking": {"kind": "float", "range": "3-10"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "3-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_ph"]}, "urine_leukocytes": {"name": "urine_leukocytes", "description": "Observed patient's urine leukocytes level", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_leukocytes"]}, "urine_nitrites": {"name": "urine_nitrites", "description": "Observed patient's urine nitrites", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_nitrites"]}, "urobilinogen": {"name": "urobilinogen", "description": "Observed patient's urobilinogen level", "meta": {"masking": {"kind": "float", "range": "0-1"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "0-1"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urobilinogen"]}, "urine_protein": {"name": "urine_protein", "description": "Observed patient's urine protein level", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_protein"]}, "blood_in_urine": {"name": "blood_in_urine", "description": "Observed patient's blood in urine", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__blood_in_urine"]}, "urine_specific_gravity": {"name": "urine_specific_gravity", "description": "Observed patient's urine_specific_gravity", "meta": {"masking": {"kind": "float", "range": "1.001-1.03"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "1.001-1.03"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_specific_gravity"]}, "urine_ketone": {"name": "urine_ketone", "description": "Observed patient's urine ketone level", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_ketone"]}, "urine_bilirubin": {"name": "urine_bilirubin", "description": "Observed patient's urine bilirubin level", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_bilirubin"]}, "urine_glucose": {"name": "urine_glucose", "description": "Observed patient's urine glucose levels", "meta": {"masking": {"kind": "float", "range": "0-300"}}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "float", "range": "0-300"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__urine_glucose"]}, "date_recorded_legacy": {"name": "date_recorded_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in vitals.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_recorded_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in vitals.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "migrated_record": {"name": "migrated_record", "description": "Tamanu identifier for the survey response the vitals record was migrated to", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vitals__migrated_record"]}}, "meta": {"triggers": ["notify_vitals_changed", "record_vitals_changelog", "set_vitals_updated_at", "set_vitals_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical", "deprecated"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_vitals_changed", "record_vitals_changelog", "set_vitals_updated_at", "set_vitals_updated_at_sync_tick"]}, "tags": ["clinical", "deprecated"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical", "deprecated"], "meta": {"triggers": ["notify_vitals_changed", "record_vitals_changelog", "set_vitals_updated_at", "set_vitals_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"vitals\"", "created_at": 1775621422.549918, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__vitals"]}, "source.tamanu.tamanu.imaging_type_external_codes": {"database": "central", "schema": "public", "name": "imaging_type_external_codes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/imaging_type_external_codes.yml", "original_file_path": "../../database/model/public/imaging_type_external_codes.yml", "unique_id": "source.tamanu.tamanu.imaging_type_external_codes", "fqn": ["tamanu", "tamanu", "imaging_type_external_codes"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "imaging_type_external_codes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Mapping table for imaging types to external codes.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in imaging_type_external_codes.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in imaging_type_external_codes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in imaging_type_external_codes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in imaging_type_external_codes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in imaging_type_external_codes.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "imaging_type_code": {"name": "imaging_type_code", "description": "Tamanu's imaging type code.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_type_external_codes__imaging_type_code"]}, "code": {"name": "code", "description": "External code.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_type_external_codes__code"]}, "description": {"name": "description", "description": "Description of code.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_type_external_codes__description"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in imaging_type_external_codes.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["fhir_refresh", "notify_imaging_type_external_codes_changed", "record_imaging_type_external_codes_changelog", "set_imaging_type_external_codes_updated_at", "set_imaging_type_external_codes_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["fhir_refresh", "notify_imaging_type_external_codes_changed", "record_imaging_type_external_codes_changelog", "set_imaging_type_external_codes_updated_at", "set_imaging_type_external_codes_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["fhir_refresh", "notify_imaging_type_external_codes_changed", "record_imaging_type_external_codes_changelog", "set_imaging_type_external_codes_updated_at", "set_imaging_type_external_codes_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"imaging_type_external_codes\"", "created_at": 1775621422.564524, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__imaging_type_external_codes"]}, "source.tamanu.tamanu.contributing_death_causes": {"database": "central", "schema": "public", "name": "contributing_death_causes", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/contributing_death_causes.yml", "original_file_path": "../../database/model/public/contributing_death_causes.yml", "unique_id": "source.tamanu.tamanu.contributing_death_causes", "fqn": ["tamanu", "tamanu", "contributing_death_causes"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "contributing_death_causes", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Contributing causes recorded with the patient's death data.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in contributing_death_causes.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "time_after_onset": {"name": "time_after_onset", "description": "Time between onset of recorded cause and death in minutes.", "meta": {"masking": {"kind": "integer", "range": "0-50000"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-50000"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.contributing_death_causes__time_after_onset"]}, "patient_death_data_id": {"name": "patient_death_data_id", "description": "The [`patient_death_data`](#!/source/source.tamanu.tamanu.patient_death_data) record.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.contributing_death_causes__patient_death_data_id"]}, "condition_id": {"name": "condition_id", "description": "Reference to the condition ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = diagnosis`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.contributing_death_causes__condition_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in contributing_death_causes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in contributing_death_causes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in contributing_death_causes.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in contributing_death_causes.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_contributing_death_causes_changed", "record_contributing_death_causes_changelog", "set_contributing_death_causes_updated_at", "set_contributing_death_causes_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_contributing_death_causes_changed", "record_contributing_death_causes_changelog", "set_contributing_death_causes_updated_at", "set_contributing_death_causes_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_contributing_death_causes_changed", "record_contributing_death_causes_changelog", "set_contributing_death_causes_updated_at", "set_contributing_death_causes_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"contributing_death_causes\"", "created_at": 1775621422.586301, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__contributing_death_causes"]}, "source.tamanu.tamanu.user_login_attempts": {"database": "central", "schema": "public", "name": "user_login_attempts", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_login_attempts.yml", "original_file_path": "../../database/model/public/user_login_attempts.yml", "unique_id": "source.tamanu.tamanu.user_login_attempts", "fqn": ["tamanu", "tamanu", "user_login_attempts"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_login_attempts", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A table that tracks user login attempts for the lockout feature.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_login_attempts.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_login_attempts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_login_attempts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_login_attempts.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "outcome": {"name": "outcome", "description": "A string specifying the outcome of the login attempt.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_login_attempts__outcome"]}, "device_id": {"name": "device_id", "description": "The [device](#!/source/source.tamanu.tamanu.devices).", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_login_attempts__device_id"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_login_attempts__user_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in user_login_attempts.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_user_login_attempts_changed", "record_user_login_attempts_changelog", "set_user_login_attempts_updated_at", "set_user_login_attempts_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_user_login_attempts_changed", "record_user_login_attempts_changelog", "set_user_login_attempts_updated_at", "set_user_login_attempts_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_user_login_attempts_changed", "record_user_login_attempts_changelog", "set_user_login_attempts_updated_at", "set_user_login_attempts_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_login_attempts\"", "created_at": 1775621422.6097357, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_login_attempts"]}, "source.tamanu.tamanu.notes_legacy": {"database": "central", "schema": "public", "name": "notes_legacy", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/notes_legacy.yml", "original_file_path": "../../database/model/public/notes_legacy.yml", "unique_id": "source.tamanu.tamanu.notes_legacy", "fqn": ["tamanu", "tamanu", "notes_legacy"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "notes_legacy", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Legacy notes", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in notes_legacy.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in notes_legacy.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in notes_legacy.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in notes_legacy.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "record_id": {"name": "record_id", "description": "Legacy notes record_id", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes_legacy__record_id"]}, "record_type": {"name": "record_type", "description": "Legacy notes record_type", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes_legacy__record_type"]}, "date": {"name": "date", "description": "Local date for the record in notes_legacy.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "note_type": {"name": "note_type", "description": "Legacy notes note_type", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes_legacy__note_type"]}, "content": {"name": "content", "description": "Legacy notes content", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes_legacy__content"]}, "author_id": {"name": "author_id", "description": "Legacy notes author_id", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes_legacy__author_id"]}, "on_behalf_of_id": {"name": "on_behalf_of_id", "description": "Legacy notes on_behalf_of_id", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notes_legacy__on_behalf_of_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in notes_legacy.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_notes_legacy_changed", "record_notes_legacy_changelog", "set_notes_legacy_updated_at", "set_notes_legacy_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_notes_legacy_changed", "record_notes_legacy_changelog", "set_notes_legacy_updated_at", "set_notes_legacy_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_notes_legacy_changed", "record_notes_legacy_changelog", "set_notes_legacy_updated_at", "set_notes_legacy_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"notes_legacy\"", "created_at": 1775621422.6266263, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__notes_legacy"]}, "source.tamanu.tamanu.users": {"database": "central", "schema": "public", "name": "users", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/users.yml", "original_file_path": "../../database/model/public/users.yml", "unique_id": "source.tamanu.tamanu.users", "fqn": ["tamanu", "tamanu", "users"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "users", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records of each user that can login to Tamanu.\n\nThis includes machine users.\n\nThere is one special user account with an all-zero `id`, which is the global \"system\" user. This is\nused as a pseudo identity where the Tamanu system itself takes an action that normally is performed\nby a human or API user.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in users.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in users.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in users.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in users.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "email": {"name": "email", "description": "Email address for user. This is used to login and receive emails.", "meta": {"masking": "email"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "email"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__email"]}, "password": {"name": "password", "description": "Hashed password for user login.\n\nThe value is encoded as a \"standard password hash\" with a `$[type]$[params]$[salt]$[hash]` general\nformat. This allows upgrading algorithms and parameters seamlessly. The current algorithm is bcrypt.\n\nThis may be null to prevent a user from being able to login.", "meta": {"masking": "nil"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "nil"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__password"]}, "display_name": {"name": "display_name", "description": "The human readable display name for the user.", "meta": {"masking": "name"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__display_name"]}, "role": {"name": "role", "description": "The role of the user, which sets their permission level.\n\nThe special values `admin` and `system` indicate a superadmin and a system user respectively.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__role"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in users.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "display_id": {"name": "display_id", "description": "Display identifier for the user.\n\nThis may be the employee code or badge number.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__display_id"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in users.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "phone_number": {"name": "phone_number", "description": "Phone number for the user.\n\nThis is not currently available anywhere visible.", "meta": {"masking": "phone"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "phone"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__phone_number"]}, "device_registration_quota": {"name": "device_registration_quota", "description": "How many devices this user can register (when `features.deviceRegistrationQuota` is enabled).\n\nSee [`devices`](#!/source/source.tamanu.tamanu.devices) for more.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.users__device_registration_quota"]}}, "meta": {"triggers": ["notify_users_changed", "record_users_changelog", "set_users_updated_at", "set_users_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_users_changed", "record_users_changelog", "set_users_updated_at", "set_users_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_users_changed", "record_users_changelog", "set_users_updated_at", "set_users_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"users\"", "created_at": 1775621422.6549528, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__users"]}, "source.tamanu.tamanu.location_assignments": {"database": "central", "schema": "public", "name": "location_assignments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/location_assignments.yml", "original_file_path": "../../database/model/public/location_assignments.yml", "unique_id": "source.tamanu.tamanu.location_assignments", "fqn": ["tamanu", "tamanu", "location_assignments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "location_assignments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Individual location assignment records representing specific time periods when healthcare staff are scheduled to work at particular locations.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in location_assignments.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) assigned to this location.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignments__user_id"]}, "location_id": {"name": "location_id", "description": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) where the user is assigned.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignments__location_id"]}, "date": {"name": "date", "description": "Local date for the record in location_assignments.", "meta": {}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "start_time": {"name": "start_time", "description": "Start time of the assignment period.", "meta": {}, "data_type": "time without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignments__start_time"]}, "end_time": {"name": "end_time", "description": "End time of the assignment period.", "meta": {}, "data_type": "time without time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignments__end_time"]}, "template_id": {"name": "template_id", "description": "Reference to the [location assignment template](#!/source/source.tamanu.tamanu.location_assignment_templates) that generated this assignment.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.location_assignments__template_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in location_assignments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in location_assignments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in location_assignments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in location_assignments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_location_assignments_changed", "record_location_assignments_changelog", "set_location_assignments_updated_at", "set_location_assignments_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_location_assignments_changed", "record_location_assignments_changelog", "set_location_assignments_updated_at", "set_location_assignments_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_location_assignments_changed", "record_location_assignments_changelog", "set_location_assignments_updated_at", "set_location_assignments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"location_assignments\"", "created_at": 1775621422.6730766, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__location_assignments"]}, "source.tamanu.tamanu.survey_screen_components": {"database": "central", "schema": "public", "name": "survey_screen_components", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/survey_screen_components.yml", "original_file_path": "../../database/model/public/survey_screen_components.yml", "unique_id": "source.tamanu.tamanu.survey_screen_components", "fqn": ["tamanu", "tamanu", "survey_screen_components"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "survey_screen_components", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Describes how a survey question gets displayed.\n\nSee [program data element](#!/source/source.tamanu.tamanu.program_data_elements), which describes\nhow the data from the question is stored.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in survey_screen_components.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in survey_screen_components.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in survey_screen_components.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in survey_screen_components.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "screen_index": {"name": "screen_index", "description": "Screen this component should appear on.\n\nSurveys can have multiple \"screens\" or pages, this index sets where this particular question sits.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__screen_index"]}, "component_index": {"name": "component_index", "description": "The absolute index (order) of the component in the survey.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__component_index"]}, "text": {"name": "text", "description": "Description or question of this component.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__text"]}, "visibility_criteria": {"name": "visibility_criteria", "description": "JSON criteria that determines when this component is visible.\n\nA criteria is a list of other components' codes and the value that will make this question show up:\n\n```json\n{\n  \"otherQuestion\": \"Yes\"\n}\n```\n\nThere can also be the special criterium `{\"hidden\": true}` which always hides the question, and the\nspecial key `\"_conjunction\": \"or\"` which makes it so _any one_ item in the list is sufficient to\nshow the question, instead of the default where _all_ items must match.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__visibility_criteria"]}, "validation_criteria": {"name": "validation_criteria", "description": "JSON criteria that determines whether the value entered in this component is accepted.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__validation_criteria"]}, "detail": {"name": "detail", "description": "Longer description or explanatory text of this component.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__detail"]}, "config": {"name": "config", "description": "JSON additional config of the component.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__config"]}, "options": {"name": "options", "description": "JSON array of strings of options to be selected.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__options"]}, "calculation": {"name": "calculation", "description": "Math expression to do calculations on the entered value before it's saved.\n\nFor example `questionCode + 3`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__calculation"]}, "survey_id": {"name": "survey_id", "description": "The [survey](#!/source/source.tamanu.tamanu.surveys).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__survey_id"]}, "data_element_id": {"name": "data_element_id", "description": "Reference to the [data element](#!/source/source.tamanu.tamanu.program_data_elements) configuring\nhow the data from the question is stored.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_screen_components__data_element_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in survey_screen_components.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in survey_screen_components.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}}, "meta": {"triggers": ["notify_survey_screen_components_changed", "record_survey_screen_components_changelog", "set_survey_screen_components_updated_at", "set_survey_screen_components_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_survey_screen_components_changed", "record_survey_screen_components_changelog", "set_survey_screen_components_updated_at", "set_survey_screen_components_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_survey_screen_components_changed", "record_survey_screen_components_changelog", "set_survey_screen_components_updated_at", "set_survey_screen_components_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"survey_screen_components\"", "created_at": 1775621422.682461, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__survey_screen_components"]}, "source.tamanu.tamanu.tasks": {"database": "central", "schema": "public", "name": "tasks", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/tasks.yml", "original_file_path": "../../database/model/public/tasks.yml", "unique_id": "source.tamanu.tamanu.tasks", "fqn": ["tamanu", "tamanu", "tasks"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "tasks", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Tasks related to encounters", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in tasks.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this task is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__encounter_id"]}, "name": {"name": "name", "description": "Name of the task.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__name"]}, "due_time": {"name": "due_time", "description": "When the task is due.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__due_time"]}, "end_time": {"name": "end_time", "description": "When the repeating task is end.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__end_time"]}, "requested_by_user_id": {"name": "requested_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who requested this task.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__requested_by_user_id"]}, "request_time": {"name": "request_time", "description": "When the task is requested.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__request_time"]}, "status": {"name": "status", "description": "Status of the task.\n\nOne of:\n- `todo`\n- `completed`\n- `non_completed`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__status"]}, "note": {"name": "note", "description": "Note of the task.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__note"]}, "frequency_value": {"name": "frequency_value", "description": "Frequency value of the task (if the task is repeating), must go with frequency unit.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__frequency_value"]}, "frequency_unit": {"name": "frequency_unit", "description": "Frequency unit of the task (if the task is repeating).\n\nOne of:\n- `minute`\n- `hour`\n- `day`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__frequency_unit"]}, "high_priority": {"name": "high_priority", "description": "Boolean specify if the task is high priority.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__high_priority"]}, "parent_task_id": {"name": "parent_task_id", "description": "Reference to the original [task](#!/source/source.tamanu.tamanu.tasks) that the task is repeated from if it is a repeating task.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__parent_task_id"]}, "completed_by_user_id": {"name": "completed_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who marked this task as completed.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__completed_by_user_id"]}, "completed_time": {"name": "completed_time", "description": "When the task is marked as completed.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__completed_time"]}, "completed_note": {"name": "completed_note", "description": "Completed note of the task.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__completed_note"]}, "not_completed_by_user_id": {"name": "not_completed_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who marked this task as not completed.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__not_completed_by_user_id"]}, "not_completed_time": {"name": "not_completed_time", "description": "When the task is marked as not completed.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__not_completed_time"]}, "not_completed_reason_id": {"name": "not_completed_reason_id", "description": "The reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why this task is not completed.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__not_completed_reason_id"]}, "todo_by_user_id": {"name": "todo_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who marked this task as to-do.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__todo_by_user_id"]}, "todo_time": {"name": "todo_time", "description": "When the task is marked as to-do.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__todo_time"]}, "todo_note": {"name": "todo_note", "description": "To-do note of the task.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__todo_note"]}, "deleted_by_user_id": {"name": "deleted_by_user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who delete this task.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__deleted_by_user_id"]}, "deleted_time": {"name": "deleted_time", "description": "When the task is deleted.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__deleted_time"]}, "deleted_reason_id": {"name": "deleted_reason_id", "description": "The reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why this task is deleted.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__deleted_reason_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in tasks.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in tasks.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in tasks.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "deleted_reason_for_sync_id": {"name": "deleted_reason_for_sync_id", "description": "The reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why this task is deleted if it is deleted by the system.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__deleted_reason_for_sync_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in tasks.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "duration_value": {"name": "duration_value", "description": "Numeric value specifying the expected duration of the task, must be used in conjunction with duration_unit.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__duration_value"]}, "duration_unit": {"name": "duration_unit", "description": "Unit of time for the task duration.\n\nOne of:\n- `hours`\n- `days`\n- `occurrences`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__duration_unit"]}, "task_type": {"name": "task_type", "description": "Type of the task.\n\nOne of:\n- `normal_task`\n- `medication_due_task`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.tasks__task_type"]}}, "meta": {"triggers": ["notify_tasks_changed", "record_tasks_changelog", "set_tasks_updated_at", "set_tasks_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_tasks_changed", "record_tasks_changelog", "set_tasks_updated_at", "set_tasks_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_tasks_changed", "record_tasks_changelog", "set_tasks_updated_at", "set_tasks_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"tasks\"", "created_at": 1775621422.7040305, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__tasks"]}, "source.tamanu.tamanu.imaging_request_areas": {"database": "central", "schema": "public", "name": "imaging_request_areas", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/imaging_request_areas.yml", "original_file_path": "../../database/model/public/imaging_request_areas.yml", "unique_id": "source.tamanu.tamanu.imaging_request_areas", "fqn": ["tamanu", "tamanu", "imaging_request_areas"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "imaging_request_areas", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Areas to be imaged as part of an [imaging request](#!/source/source.tamanu.tamanu.imaging_requests).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in imaging_request_areas.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in imaging_request_areas.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in imaging_request_areas.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in imaging_request_areas.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "imaging_request_id": {"name": "imaging_request_id", "description": "The [imaging request](#!/source/source.tamanu.tamanu.imaging_requests).", "meta": {}, "data_type": "character varying", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_request_areas__imaging_request_id"]}, "area_id": {"name": "area_id", "description": "The imaging area ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.imaging_request_areas__area_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in imaging_request_areas.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_imaging_request_areas_changed", "record_imaging_request_areas_changelog", "set_imaging_request_areas_updated_at", "set_imaging_request_areas_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_imaging_request_areas_changed", "record_imaging_request_areas_changelog", "set_imaging_request_areas_updated_at", "set_imaging_request_areas_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_imaging_request_areas_changed", "record_imaging_request_areas_changelog", "set_imaging_request_areas_updated_at", "set_imaging_request_areas_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"imaging_request_areas\"", "created_at": 1775621422.7279882, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__imaging_request_areas"]}, "source.tamanu.tamanu.assets": {"database": "central", "schema": "public", "name": "assets", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/assets.yml", "original_file_path": "../../database/model/public/assets.yml", "unique_id": "source.tamanu.tamanu.assets", "fqn": ["tamanu", "tamanu", "assets"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "assets", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of assets used in the tamanu app ui and patient letters.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in assets.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in assets.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in assets.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in assets.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Name of the asset set by the user on upload.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.assets__name"]}, "type": {"name": "type", "description": "This is the type of asset stored.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.assets__type"]}, "data": {"name": "data", "description": "Contains a binary version of image data uploaded by user.", "meta": {}, "data_type": "bytea", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.assets__data"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facilities](#!/source/source.tamanu.tamanu.facilities) this asset is associated with.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.assets__facility_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in assets.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_assets_changed", "record_assets_changelog", "set_assets_updated_at", "set_assets_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_assets_changed", "record_assets_changelog", "set_assets_updated_at", "set_assets_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_assets_changed", "record_assets_changelog", "set_assets_updated_at", "set_assets_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"assets\"", "created_at": 1775621422.7443054, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__assets"]}, "source.tamanu.tamanu.reference_drug_facilities": {"database": "central", "schema": "public", "name": "reference_drug_facilities", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/reference_drug_facilities.yml", "original_file_path": "../../database/model/public/reference_drug_facilities.yml", "unique_id": "source.tamanu.tamanu.reference_drug_facilities", "fqn": ["tamanu", "tamanu", "reference_drug_facilities"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "reference_drug_facilities", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Tracks the availability status of drugs at specific facilities.\n\n- Links reference drugs to facilities with their availability status\n- Allows facilities to manage which drugs are available, unavailable, or have limited stock\n- Used for medication dispensing workflows to determine drug availability at a facility", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in reference_drug_facilities.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "reference_drug_id": {"name": "reference_drug_id", "description": "Foreign key reference to the associated drug in the reference_drugs table", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drug_facilities__reference_drug_id"]}, "facility_id": {"name": "facility_id", "description": "Foreign key reference to the facility where this drug availability applies", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drug_facilities__facility_id"]}, "quantity": {"name": "quantity", "description": "The numeric quantity of the drug available at this facility. Stored as an INTEGER:\n- Positive integer: Number of units available (e.g., 10, 50, 100)\n- 0: Drug is out of stock\n- NULL: Quantity is not tracked or unknown (used when stock_status is 'unknown' or 'unavailable')", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drug_facilities__quantity"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in reference_drug_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in reference_drug_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in reference_drug_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in reference_drug_facilities.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "stock_status": {"name": "stock_status", "description": "Indicates the stock availability status of the drug at this facility. Stored as a STRING with the following valid values:\n- 'in_stock': Drug is available (quantity > 0)\n- 'out_of_stock': Drug is not available but tracked (quantity = 0)\n- 'unavailable': Drug is not available at this facility (quantity IS NULL)\n- 'unknown': Stock status is unknown or not tracked (quantity IS NULL)\n\nThis column is stored separately from quantity and is enforced by database constraints to maintain consistency:\n- 'in_stock' requires quantity > 0\n- 'out_of_stock' requires quantity = 0\n- 'unknown' or 'unavailable' require quantity IS NULL", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_drug_facilities__stock_status"]}}, "meta": {"triggers": ["notify_reference_drug_facilities_changed", "record_reference_drug_facilities_changelog", "set_reference_drug_facilities_updated_at", "set_reference_drug_facilities_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_reference_drug_facilities_changed", "record_reference_drug_facilities_changelog", "set_reference_drug_facilities_updated_at", "set_reference_drug_facilities_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_reference_drug_facilities_changed", "record_reference_drug_facilities_changelog", "set_reference_drug_facilities_updated_at", "set_reference_drug_facilities_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"reference_drug_facilities\"", "created_at": 1775621422.7556107, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__reference_drug_facilities"]}, "source.tamanu.tamanu.patient_vrs_data": {"database": "central", "schema": "public", "name": "patient_vrs_data", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_vrs_data.yml", "original_file_path": "../../database/model/public/patient_vrs_data.yml", "unique_id": "source.tamanu.tamanu.patient_vrs_data", "fqn": ["tamanu", "tamanu", "patient_vrs_data"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_vrs_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Data for Fiji's VRS integration only.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_vrs_data.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_vrs_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_vrs_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_vrs_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "id_type": {"name": "id_type", "description": "TBC", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_vrs_data__id_type"]}, "identifier": {"name": "identifier", "description": "TBC", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_vrs_data__identifier"]}, "unmatched_village_name": {"name": "unmatched_village_name", "description": "if we don't have a matching village, persist the unmatched name here", "meta": {"masking": "place"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "place"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_vrs_data__unmatched_village_name"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_vrs_data__patient_id"]}, "is_deleted_by_remote": {"name": "is_deleted_by_remote", "description": "TBC", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_vrs_data__is_deleted_by_remote"]}}, "meta": {"js_class": "PatientVRSData", "triggers": []}, "source_meta": {}, "tags": ["patient"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientVRSData", "triggers": []}, "tags": ["patient"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["patient"], "meta": {"js_class": "PatientVRSData", "triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_vrs_data\"", "created_at": 1775621422.7667973, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_vrs_data"]}, "source.tamanu.tamanu.encounter_pause_prescriptions": {"database": "central", "schema": "public", "name": "encounter_pause_prescriptions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounter_pause_prescriptions.yml", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.yml", "unique_id": "source.tamanu.tamanu.encounter_pause_prescriptions", "fqn": ["tamanu", "tamanu", "encounter_pause_prescriptions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounter_pause_prescriptions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records details about the prescription being paused, the duration and timing of the pause, and the clinician responsible for initiating the pause.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounter_pause_prescriptions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "encounter_prescription_id": {"name": "encounter_prescription_id", "description": "References the unique identifier of the prescription being paused. This links to the `encounter_prescriptions` table to provide context about the specific prescription.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__encounter_prescription_id"]}, "pause_duration": {"name": "pause_duration", "description": "Describes the length of time for which the prescription is paused. This value works in conjunction with the `pause_time_unit` field to specify the duration (e.g., 5 days, 2 weeks).", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__pause_duration"]}, "pause_time_unit": {"name": "pause_time_unit", "description": "Specifies the unit of time for the pause duration. Common values include days, weeks and it works in conjunction with the `pause_duration` field to define the total pause period.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__pause_time_unit"]}, "pause_start_date": {"name": "pause_start_date", "description": "Indicates the date when the prescription pause begins. This field is used to track the start of the pause period.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__pause_start_date"]}, "pause_end_date": {"name": "pause_end_date", "description": "Indicates the date when the prescription pause ends. This field is used to track the end of the pause period.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__pause_end_date"]}, "notes": {"name": "notes", "description": "Provides additional information or context about the prescription pause.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__notes"]}, "pausing_clinician_id": {"name": "pausing_clinician_id", "description": "References the unique identifier of the clinician responsible for initiating the pause.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__pausing_clinician_id"]}, "created_by": {"name": "created_by", "description": "References the unique identifier of the user who created the record.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_pause_prescriptions__created_by"]}, "updated_by": {"name": "updated_by", "description": "The identifier of the user logged on when the record was created, updated or deleted in encounter_pause_prescriptions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_by"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounter_pause_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounter_pause_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounter_pause_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounter_pause_prescriptions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_encounter_pause_prescriptions_changed", "record_encounter_pause_prescriptions_changelog", "set_encounter_pause_prescriptions_updated_at", "set_encounter_pause_prescriptions_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounter_pause_prescriptions_changed", "record_encounter_pause_prescriptions_changelog", "set_encounter_pause_prescriptions_updated_at", "set_encounter_pause_prescriptions_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_encounter_pause_prescriptions_changed", "record_encounter_pause_prescriptions_changelog", "set_encounter_pause_prescriptions_updated_at", "set_encounter_pause_prescriptions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounter_pause_prescriptions\"", "created_at": 1775621422.7850435, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounter_pause_prescriptions"]}, "source.tamanu.tamanu.pharmacy_orders": {"database": "central", "schema": "public", "name": "pharmacy_orders", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/pharmacy_orders.yml", "original_file_path": "../../database/model/public/pharmacy_orders.yml", "unique_id": "source.tamanu.tamanu.pharmacy_orders", "fqn": ["tamanu", "tamanu", "pharmacy_orders"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "pharmacy_orders", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "An order for prescriptions placed by Tamanu to a Pharmacy", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in pharmacy_orders.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "ordering_clinician_id": {"name": "ordering_clinician_id", "description": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) who placed the order.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_orders__ordering_clinician_id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) for the order.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_orders__encounter_id"]}, "comments": {"name": "comments", "description": "Comments provided by the clinician when placing the order.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_orders__comments"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in pharmacy_orders.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in pharmacy_orders.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in pharmacy_orders.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in pharmacy_orders.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_discharge_prescription": {"name": "is_discharge_prescription", "description": "If the patient is being discharged with this prescription.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_orders__is_discharge_prescription"]}, "date": {"name": "date", "description": "Local date for the record in pharmacy_orders.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) where the pharmacy order was placed.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.pharmacy_orders__facility_id"]}}, "meta": {"triggers": ["notify_pharmacy_orders_changed", "record_pharmacy_orders_changelog", "set_pharmacy_orders_updated_at", "set_pharmacy_orders_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_pharmacy_orders_changed", "record_pharmacy_orders_changelog", "set_pharmacy_orders_updated_at", "set_pharmacy_orders_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_pharmacy_orders_changed", "record_pharmacy_orders_changelog", "set_pharmacy_orders_updated_at", "set_pharmacy_orders_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"pharmacy_orders\"", "created_at": 1775621422.8030672, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__pharmacy_orders"]}, "source.tamanu.tamanu.portal_survey_assignments": {"database": "central", "schema": "public", "name": "portal_survey_assignments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/portal_survey_assignments.yml", "original_file_path": "../../database/model/public/portal_survey_assignments.yml", "unique_id": "source.tamanu.tamanu.portal_survey_assignments", "fqn": ["tamanu", "tamanu", "portal_survey_assignments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "portal_survey_assignments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Assignments of surveys to patients for completion through the patient portal.\n\nThis table tracks which surveys have been assigned to which patients for self-completion through\nthe patient portal application. Patients can log into the portal to view their assigned surveys\nand complete them independently. Surveys can be assigned to patients for various purposes such as\nhealth assessments, follow-up questionnaires, or program evaluations.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in portal_survey_assignments.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in portal_survey_assignments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in portal_survey_assignments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in portal_survey_assignments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients) who has been assigned the survey.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__patient_id"]}, "survey_id": {"name": "survey_id", "description": "Reference to the [survey](#!/source/source.tamanu.tamanu.surveys) that has been assigned to the patient.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__survey_id"]}, "status": {"name": "status", "description": "The current status of the survey assignment in the patient portal.\n\nOne of:\n- `assigned` - Survey has been assigned but the patient has not yet started it in the portal\n- `in_progress` - Patient has started the survey in the portal but not completed it\n- `completed` - Survey has been fully completed by the patient through the portal\n- `expired` - Survey assignment has expired and can no longer be completed in the portal", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__status"]}, "assigned_by_id": {"name": "assigned_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who assigned the survey to the patient.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__assigned_by_id"]}, "survey_response_id": {"name": "survey_response_id", "description": "Reference to the [survey response](#!/source/source.tamanu.tamanu.survey_responses) containing the patient's answers from the portal.\n\nThis field is only populated when the survey has been completed through the patient portal and a response has been recorded.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__survey_response_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in portal_survey_assignments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "assigned_at": {"name": "assigned_at", "description": "Timestamp when the survey was assigned to the patient for completion through the patient portal.\n\nThis field is provided a value by the Tamanu web frontend when a survey assignment is created.", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__assigned_at"]}, "facility_id": {"name": "facility_id", "description": "The facility that the survey was assigned from", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_survey_assignments__facility_id"]}}, "meta": {"triggers": ["notify_portal_survey_assignments_changed", "record_portal_survey_assignments_changelog", "set_portal_survey_assignments_updated_at", "set_portal_survey_assignments_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_portal_survey_assignments_changed", "record_portal_survey_assignments_changelog", "set_portal_survey_assignments_updated_at", "set_portal_survey_assignments_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_portal_survey_assignments_changed", "record_portal_survey_assignments_changelog", "set_portal_survey_assignments_updated_at", "set_portal_survey_assignments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"portal_survey_assignments\"", "created_at": 1775621422.8228776, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__portal_survey_assignments"]}, "source.tamanu.tamanu.lab_test_panel_lab_test_types": {"database": "central", "schema": "public", "name": "lab_test_panel_lab_test_types", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.yml", "unique_id": "source.tamanu.tamanu.lab_test_panel_lab_test_types", "fqn": ["tamanu", "tamanu", "lab_test_panel_lab_test_types"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_test_panel_lab_test_types", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "The lab tests contained in a lab test panel.\n\nSee [`lab_test_panels`](#!/source/source.tamanu.tamanu.lab_test_panels) for more about lab test\npanels, and [`lab_test_types`](#!/source/source.tamanu.tamanu.lab_test_types) for the test types.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_test_panel_lab_test_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_test_panel_lab_test_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_test_panel_lab_test_types.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "lab_test_panel_id": {"name": "lab_test_panel_id", "description": "The [test panel](#!/source/source.tamanu.tamanu.lab_test_panels).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panel_lab_test_types__lab_test_panel_id"]}, "lab_test_type_id": {"name": "lab_test_type_id", "description": "The [test type](#!/source/source.tamanu.tamanu.lab_test_types).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panel_lab_test_types__lab_test_type_id"]}, "order": {"name": "order", "description": "The position of this test within the panel, used to control the display\nand processing order of lab tests in a lab test panel. Lower values are\nshown and processed before higher values.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panel_lab_test_types__order"]}, "id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_test_panel_lab_test_types.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_test_panel_lab_test_types.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_lab_test_panel_lab_test_types_changed", "record_lab_test_panel_lab_test_types_changelog", "set_lab_test_panel_lab_test_types_updated_at", "set_lab_test_panel_lab_test_types_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_test_panel_lab_test_types_changed", "record_lab_test_panel_lab_test_types_changelog", "set_lab_test_panel_lab_test_types_updated_at", "set_lab_test_panel_lab_test_types_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_lab_test_panel_lab_test_types_changed", "record_lab_test_panel_lab_test_types_changelog", "set_lab_test_panel_lab_test_types_updated_at", "set_lab_test_panel_lab_test_types_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_test_panel_lab_test_types\"", "created_at": 1775621422.8452134, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_test_panel_lab_test_types"]}, "source.tamanu.tamanu.programs": {"database": "central", "schema": "public", "name": "programs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/programs.yml", "original_file_path": "../../database/model/public/programs.yml", "unique_id": "source.tamanu.tamanu.programs", "fqn": ["tamanu", "tamanu", "programs"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "programs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Groups of [surveys](#!/source/source.tamanu.tamanu.surveys) or [program registries](#!/source/source.tamanu.tamanu.program_registries).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in programs.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in programs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in programs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in programs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Machine-friendly code.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.programs__code"]}, "name": {"name": "name", "description": "Human-friendly name.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.programs__name"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in programs.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_programs_changed", "record_programs_changelog", "set_programs_updated_at", "set_programs_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_programs_changed", "record_programs_changelog", "set_programs_updated_at", "set_programs_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_programs_changed", "record_programs_changelog", "set_programs_updated_at", "set_programs_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"programs\"", "created_at": 1775621422.8545144, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__programs"]}, "source.tamanu.tamanu.sync_device_ticks": {"database": "central", "schema": "public", "name": "sync_device_ticks", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/sync_device_ticks.yml", "original_file_path": "../../database/model/public/sync_device_ticks.yml", "unique_id": "source.tamanu.tamanu.sync_device_ticks", "fqn": ["tamanu", "tamanu", "sync_device_ticks"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "sync_device_ticks", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Cache of which syncing device is at which tick.\n\nThis is used internally as part of sync.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in sync_device_ticks.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "persisted_at_sync_tick": {"name": "persisted_at_sync_tick", "description": "The sync tick.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_device_ticks__persisted_at_sync_tick"]}, "device_id": {"name": "device_id", "description": "The device that's at this sync tick.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_device_ticks__device_id"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"sync_device_ticks\"", "created_at": 1775621422.8602948, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__sync_device_ticks"]}, "source.tamanu.tamanu.sync_sessions": {"database": "central", "schema": "public", "name": "sync_sessions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/sync_sessions.yml", "original_file_path": "../../database/model/public/sync_sessions.yml", "unique_id": "source.tamanu.tamanu.sync_sessions", "fqn": ["tamanu", "tamanu", "sync_sessions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "sync_sessions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records of each user that can login to the site", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in sync_sessions.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in sync_sessions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in sync_sessions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in sync_sessions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "start_time": {"name": "start_time", "description": "Timestamp when sync session started", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__start_time"]}, "last_connection_time": {"name": "last_connection_time", "description": "Timestamp when sync session made last connection", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__last_connection_time"]}, "snapshot_completed_at": {"name": "snapshot_completed_at", "description": "Timestamp when sync session snapshot was completed", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__snapshot_completed_at"]}, "debug_info": {"name": "debug_info", "description": "Debug information for the sync session", "meta": {}, "data_type": "json", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__debug_info"]}, "parameters": {"name": "parameters", "description": "Parameters for the sync session", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__parameters"]}, "completed_at": {"name": "completed_at", "description": "Timestamp when sync session was completed", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__completed_at"]}, "persist_completed_at": {"name": "persist_completed_at", "description": "Timestamp when sync session completion record is persisted", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__persist_completed_at"]}, "pull_since": {"name": "pull_since", "description": "Sync tick that the sync session pulled since", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__pull_since"]}, "pull_until": {"name": "pull_until", "description": "Sync tick that the sync session pulled until", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__pull_until"]}, "started_at_tick": {"name": "started_at_tick", "description": "Sync tick that the sync session started at", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__started_at_tick"]}, "snapshot_started_at": {"name": "snapshot_started_at", "description": "Timestamp the sync session snapshot started at", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__snapshot_started_at"]}, "errors": {"name": "errors", "description": "If a sync fails, the error(s).", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_sessions__errors"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"sync_sessions\"", "created_at": 1775621422.8731742, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__sync_sessions"]}, "source.tamanu.tamanu.invoice_patient_payments": {"database": "central", "schema": "public", "name": "invoice_patient_payments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_patient_payments.yml", "original_file_path": "../../database/model/public/invoice_patient_payments.yml", "unique_id": "source.tamanu.tamanu.invoice_patient_payments", "fqn": ["tamanu", "tamanu", "invoice_patient_payments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_patient_payments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Extra metadata about a payment when it was done by a patient.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_patient_payments.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "invoice_payment_id": {"name": "invoice_payment_id", "description": "The [payment](#!/source/source.tamanu.tamanu.invoice_payments).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_patient_payments__invoice_payment_id"]}, "method_id": {"name": "method_id", "description": "The method used to pay ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_patient_payments__method_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_patient_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_patient_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_patient_payments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "cheque_number": {"name": "cheque_number", "description": "The cheque number for cheque payments.", "meta": {"masking": {"kind": "integer", "range": "10000000-99999999"}}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "10000000-99999999"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_patient_payments__cheque_number"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_patient_payments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_invoice_patient_payments_changed", "record_invoice_patient_payments_changelog", "set_invoice_patient_payments_updated_at", "set_invoice_patient_payments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_patient_payments_changed", "record_invoice_patient_payments_changelog", "set_invoice_patient_payments_updated_at", "set_invoice_patient_payments_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_invoice_patient_payments_changed", "record_invoice_patient_payments_changelog", "set_invoice_patient_payments_updated_at", "set_invoice_patient_payments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_patient_payments\"", "created_at": 1775621422.8970375, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_patient_payments"]}, "source.tamanu.tamanu.locations": {"database": "central", "schema": "public", "name": "locations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/locations.yml", "original_file_path": "../../database/model/public/locations.yml", "unique_id": "source.tamanu.tamanu.locations", "fqn": ["tamanu", "tamanu", "locations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "locations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Information on the hospital locations.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in locations.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in locations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in locations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in locations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Code for location", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.locations__code"]}, "name": {"name": "name", "description": "Full readable name for location", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.locations__name"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this location is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.locations__facility_id"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in locations.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "location_group_id": {"name": "location_group_id", "description": "Reference to the [group](#!/source/source.tamanu.tamanu.location_groups) this location is in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.locations__location_group_id"]}, "max_occupancy": {"name": "max_occupancy", "description": "The maximum number of patients that can be in this location", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.locations__max_occupancy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in locations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_locations_changed", "record_locations_changelog", "set_locations_updated_at", "set_locations_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_locations_changed", "record_locations_changelog", "set_locations_updated_at", "set_locations_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_locations_changed", "record_locations_changelog", "set_locations_updated_at", "set_locations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"locations\"", "created_at": 1775621422.9234881, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__locations"]}, "source.tamanu.tamanu.portal_users": {"database": "central", "schema": "public", "name": "portal_users", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/portal_users.yml", "original_file_path": "../../database/model/public/portal_users.yml", "unique_id": "source.tamanu.tamanu.portal_users", "fqn": ["tamanu", "tamanu", "portal_users"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "portal_users", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "This table manages user accounts for patients who can access the patient portal. It establishes the relationship between patients and their portal login credentials, tracking their registration status and access permissions. Each record represents a patient's portal account with authentication and role information.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in portal_users.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in portal_users.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in portal_users.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in portal_users.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "patient_id": {"name": "patient_id", "description": "Foreign key reference to the patients table. Links the portal user account to a specific patient record in the system. This field is required and establishes the one-to-one relationship between a patient and their portal access.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_users__patient_id"]}, "email": {"name": "email", "description": "Unique email address used for patient portal authentication and communication. This serves as the primary identifier for login purposes and must be unique across all patient portal accounts. The field is optional to allow for patients who may not have email addresses, or who have not yet completed the\nregistration flow.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_users__email"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in portal_users.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "status": {"name": "status", "description": "Current registration status of the patient portal account. Possible values are 'pending' (default, when account is first created) and 'registered' (when patient has completed the registration process). This field tracks the progression of patient portal onboarding and account activation.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.portal_users__status"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in portal_users.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_portal_users_changed", "record_portal_users_changelog", "set_portal_users_updated_at", "set_portal_users_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_portal_users_changed", "record_portal_users_changelog", "set_portal_users_updated_at", "set_portal_users_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_portal_users_changed", "record_portal_users_changelog", "set_portal_users_updated_at", "set_portal_users_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"portal_users\"", "created_at": 1775621422.9405098, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__portal_users"]}, "source.tamanu.tamanu.invoice_item_finalised_insurances": {"database": "central", "schema": "public", "name": "invoice_item_finalised_insurances", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/invoice_item_finalised_insurances.yml", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.yml", "unique_id": "source.tamanu.tamanu.invoice_item_finalised_insurances", "fqn": ["tamanu", "tamanu", "invoice_item_finalised_insurances"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "invoice_item_finalised_insurances", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Finalised insurance coverage values for invoice items.\n\nThis table stores the insurance coverage amounts that were locked in when an invoice item is finalised, \npreserving the coverage percentage at that point in time even if the insurance plan's coverage changes later.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in invoice_item_finalised_insurances.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in invoice_item_finalised_insurances.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in invoice_item_finalised_insurances.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in invoice_item_finalised_insurances.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in invoice_item_finalised_insurances.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "invoice_item_id": {"name": "invoice_item_id", "description": "The [invoice item](#!/source/source.tamanu.tamanu.invoice_items) this insurance coverage applies to.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_finalised_insurances__invoice_item_id"]}, "coverage_value_final": {"name": "coverage_value_final", "description": "The finalised coverage percentage for this invoice item.\n\nThis value is copied from the insurance plan's coverage at the time the invoice item is finalised,\npreserving it for the record even if the insurance plan's coverage percentage changes later.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_finalised_insurances__coverage_value_final"]}, "invoice_insurance_plan_id": {"name": "invoice_insurance_plan_id", "description": "The [insurance plan](#!/source/source.tamanu.tamanu.invoice_insurance_plans) providing the coverage.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.invoice_item_finalised_insurances__invoice_insurance_plan_id"]}}, "meta": {"triggers": ["notify_invoice_item_finalised_insurances_changed", "record_invoice_item_finalised_insurances_changelog", "set_invoice_item_finalised_insurances_updated_at", "set_invoice_item_finalised_insurances_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_invoice_item_finalised_insurances_changed", "record_invoice_item_finalised_insurances_changelog", "set_invoice_item_finalised_insurances_updated_at", "set_invoice_item_finalised_insurances_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_invoice_item_finalised_insurances_changed", "record_invoice_item_finalised_insurances_changelog", "set_invoice_item_finalised_insurances_updated_at", "set_invoice_item_finalised_insurances_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"invoice_item_finalised_insurances\"", "created_at": 1775621422.9550526, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__invoice_item_finalised_insurances"]}, "source.tamanu.tamanu.task_templates": {"database": "central", "schema": "public", "name": "task_templates", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/task_templates.yml", "original_file_path": "../../database/model/public/task_templates.yml", "unique_id": "source.tamanu.tamanu.task_templates", "fqn": ["tamanu", "tamanu", "task_templates"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "task_templates", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Template of tasks which then can be created upon", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in task_templates.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "reference_data_id": {"name": "reference_data_id", "description": "The name of task template, referred to ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_templates__reference_data_id"]}, "high_priority": {"name": "high_priority", "description": "Boolean specify if the task template is high priority.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_templates__high_priority"]}, "frequency_value": {"name": "frequency_value", "description": "Frequency value of the task template (if the task is repeating), must go with frequency unit.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_templates__frequency_value"]}, "frequency_unit": {"name": "frequency_unit", "description": "Frequency unit of the task template (if the task is repeating).\n\nOne of:\n- `minute`\n- `hour`\n- `day`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_templates__frequency_unit"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in task_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in task_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in task_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in task_templates.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_task_templates_changed", "record_task_templates_changelog", "set_task_templates_updated_at", "set_task_templates_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_task_templates_changed", "record_task_templates_changelog", "set_task_templates_updated_at", "set_task_templates_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_task_templates_changed", "record_task_templates_changelog", "set_task_templates_updated_at", "set_task_templates_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"task_templates\"", "created_at": 1775621422.9678705, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__task_templates"]}, "source.tamanu.tamanu.attachments": {"database": "central", "schema": "public", "name": "attachments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/attachments.yml", "original_file_path": "../../database/model/public/attachments.yml", "unique_id": "source.tamanu.tamanu.attachments", "fqn": ["tamanu", "tamanu", "attachments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "attachments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Uploaded files.\n\nThese can be documents, photo IDs, patient letters...\n\nMost direct uploads will have a corresponding [`document_metadata`](#!/source/source.tamanu.tamanu.document_metadata),\nbut there's other ways to upload files, such as [for lab requests](#!/source/source.tamanu.tamanu.lab_request_attachments).\n\nUploaded files are not currently synced to facility servers. Instead, servers request the contents\nof documents just-in-time. This does require facility servers to be \"online\" but significantly\nreduces sync pressure.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in attachments.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "type": {"name": "type", "description": "The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.attachments__type"]}, "size": {"name": "size", "description": "The file size in bytes.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.attachments__size"]}, "data": {"name": "data", "description": "The file data.", "meta": {"masking": "zero"}, "data_type": "bytea", "constraints": [], "quote": null, "config": {"meta": {"masking": "zero"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.attachments__data"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in attachments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_attachments_changed", "record_attachments_changelog", "set_attachments_updated_at", "set_attachments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_attachments_changed", "record_attachments_changelog", "set_attachments_updated_at", "set_attachments_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_attachments_changed", "record_attachments_changelog", "set_attachments_updated_at", "set_attachments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"attachments\"", "created_at": 1775621422.9770641, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__attachments"]}, "source.tamanu.tamanu.translated_strings": {"database": "central", "schema": "public", "name": "translated_strings", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/translated_strings.yml", "original_file_path": "../../database/model/public/translated_strings.yml", "unique_id": "source.tamanu.tamanu.translated_strings", "fqn": ["tamanu", "tamanu", "translated_strings"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "translated_strings", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Localisation and translation strings.\n\nThese are used for two distinct purposes:\n- to translate Tamanu in languages other than English\n- to adjust the wording of specific items in the UI", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in translated_strings.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "string_id": {"name": "string_id", "description": "The internal reference of the item being translated.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.translated_strings__string_id"]}, "language": {"name": "language", "description": "The language code.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.translated_strings__language"]}, "text": {"name": "text", "description": "The actual translated text.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.translated_strings__text"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in translated_strings.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in translated_strings.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in translated_strings.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in translated_strings.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_translated_strings_changed", "record_translated_strings_changelog", "set_translated_strings_updated_at", "set_translated_strings_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_translated_strings_changed", "record_translated_strings_changelog", "set_translated_strings_updated_at", "set_translated_strings_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_translated_strings_changed", "record_translated_strings_changelog", "set_translated_strings_updated_at", "set_translated_strings_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"translated_strings\"", "created_at": 1775621422.986297, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__translated_strings"]}, "source.tamanu.tamanu.survey_responses": {"database": "central", "schema": "public", "name": "survey_responses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/survey_responses.yml", "original_file_path": "../../database/model/public/survey_responses.yml", "unique_id": "source.tamanu.tamanu.survey_responses", "fqn": ["tamanu", "tamanu", "survey_responses"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "survey_responses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A response to a survey (as recorded by a practitioner).\n\nTypically surveys are filled on behalf of patients as part of an encounter.\n\nBecause there are multiple distinct kinds of dates at play here:\n- `created_at`, `updated_at`, `deleted_at` are system data for syncing and cannot be relied on for realtime\n- `start_time`, `end_time` are real datetimes automatically recorded when starting and submitting a survey response\n- in survey response answers, there could be a data element for targeting the date of when exactly the data is recorded in real time.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in survey_responses.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in survey_responses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in survey_responses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in survey_responses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "start_time": {"name": "start_time", "description": "When the survey was started.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__start_time"]}, "end_time": {"name": "end_time", "description": "When the survey was completed.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__end_time"]}, "result": {"name": "result", "description": "The numeric value that is the summary of the survey response.", "meta": {}, "data_type": "double precision", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__result"]}, "survey_id": {"name": "survey_id", "description": "The [survey](#!/source/source.tamanu.tamanu.surveys) being responded to.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__survey_id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this survey response is a part of.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__encounter_id"]}, "result_text": {"name": "result_text", "description": "The textual value that is the summary of the survey response.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__result_text"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) recording this survey response.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__user_id"]}, "start_time_legacy": {"name": "start_time_legacy", "description": "[Deprecated] When the survey was started.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__start_time_legacy"]}, "end_time_legacy": {"name": "end_time_legacy", "description": "[Deprecated] When the survey was completed.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__end_time_legacy"]}, "notified": {"name": "notified", "description": "If the [survey](#!/source/source.tamanu.tamanu.surveys) is `notifiable`, whether this response's\nnotification has been sent.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__notified"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in survey_responses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "metadata": {"name": "metadata", "description": "Metadata for a survey response, (eg: if a survey response is linked to another survey response)", "meta": {"masking": "empty"}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {"masking": "empty"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_responses__metadata"]}}, "meta": {"triggers": ["notify_survey_responses_changed", "record_survey_responses_changelog", "set_survey_responses_updated_at", "set_survey_responses_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_survey_responses_changed", "record_survey_responses_changelog", "set_survey_responses_updated_at", "set_survey_responses_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_survey_responses_changed", "record_survey_responses_changelog", "set_survey_responses_updated_at", "set_survey_responses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"survey_responses\"", "created_at": 1775621423.011489, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__survey_responses"]}, "source.tamanu.tamanu.devices": {"database": "central", "schema": "public", "name": "devices", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/devices.yml", "original_file_path": "../../database/model/public/devices.yml", "unique_id": "source.tamanu.tamanu.devices", "fqn": ["tamanu", "tamanu", "devices"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "devices", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Devices that are authorised to login.\n\nDevices not in the table can only connect if the user they're\n**first** logging in as has enough quota (`device_registration_quota`\non the [`users`](#!/source/source.tamanu.tamanu.users) table.)\n\nThis check is not performed when `features.deviceRegistrationQuota` is disabled.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in devices.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in devices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in devices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in devices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "last_seen_at": {"name": "last_seen_at", "description": "When this device last logged in.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.devices__last_seen_at"]}, "registered_by_id": {"name": "registered_by_id", "description": "Which user registered this device.\n\nThis is used for quota calculations.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.devices__registered_by_id"]}, "name": {"name": "name", "description": "Optional descriptive name, to make it easier to map device IDs to real devices\nin debugging and troubleshooting situations.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.devices__name"]}, "scopes": {"name": "scopes", "description": "Scopes the device is authorised to access.\n\nScopes allow access to parts of the API that are closed to other devices\notherwise. Some scopes are restricted by quota. Devices aren't allowed to\nrequest more scopes than they currently have, but may login without\nspecifying the full scopes they have.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.devices__scopes"]}}, "meta": {"triggers": ["record_devices_changelog"]}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["record_devices_changelog"]}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": ["record_devices_changelog"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"devices\"", "created_at": 1775621423.029709, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__devices"]}, "source.tamanu.tamanu.patient_invoice_insurance_plans": {"database": "central", "schema": "public", "name": "patient_invoice_insurance_plans", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_invoice_insurance_plans.yml", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.yml", "unique_id": "source.tamanu.tamanu.patient_invoice_insurance_plans", "fqn": ["tamanu", "tamanu", "patient_invoice_insurance_plans"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_invoice_insurance_plans", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table to record invoice insurance plans against patients", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_invoice_insurance_plans.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_invoice_insurance_plans.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "patient_id": {"name": "patient_id", "description": "ID of the patient", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_invoice_insurance_plans__patient_id"]}, "invoice_insurance_plan_id": {"name": "invoice_insurance_plan_id", "description": "ID of the invoice insurance plan for the patient", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_invoice_insurance_plans__invoice_insurance_plan_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_invoice_insurance_plans.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patient_invoice_insurance_plans_changed", "record_patient_invoice_insurance_plans_changelog", "set_patient_invoice_insurance_plans_updated_at", "set_patient_invoice_insurance_plans_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_invoice_insurance_plans_changed", "record_patient_invoice_insurance_plans_changelog", "set_patient_invoice_insurance_plans_updated_at", "set_patient_invoice_insurance_plans_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_patient_invoice_insurance_plans_changed", "record_patient_invoice_insurance_plans_changelog", "set_patient_invoice_insurance_plans_updated_at", "set_patient_invoice_insurance_plans_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_invoice_insurance_plans\"", "created_at": 1775621423.0429227, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_invoice_insurance_plans"]}, "source.tamanu.tamanu.patient_death_data": {"database": "central", "schema": "public", "name": "patient_death_data", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_death_data.yml", "original_file_path": "../../database/model/public/patient_death_data.yml", "unique_id": "source.tamanu.tamanu.patient_death_data", "fqn": ["tamanu", "tamanu", "patient_death_data"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_death_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Information about a patient's death.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_death_data.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "patient_id": {"name": "patient_id", "description": "The [patient](#!/source/source.tamanu.tamanu.patients) who died.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__patient_id"]}, "clinician_id": {"name": "clinician_id", "description": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) who is recording this death.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__clinician_id"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) where this death is being recorded.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__facility_id"]}, "manner": {"name": "manner", "description": "A descriptive text specifying the manner of death.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__manner"]}, "recent_surgery": {"name": "recent_surgery", "description": "Whether the deceased patient had a recent surgery, if any.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__recent_surgery"]}, "last_surgery_date": {"name": "last_surgery_date", "description": "Datetime of the most recent surgery the patient received, if any.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__last_surgery_date"]}, "last_surgery_reason_id": {"name": "last_surgery_reason_id", "description": "Reference to a `diagnosis` ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) for the\nreason of the most recent surgery the patient received, if any.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__last_surgery_reason_id"]}, "external_cause_date": {"name": "external_cause_date", "description": "Datetime of external cause of death, if applicable.", "meta": {"masking": "date"}, "data_type": "character(10)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__external_cause_date"]}, "external_cause_location": {"name": "external_cause_location", "description": "Physical location of external cause of death, if applicable.", "meta": {"masking": "place"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "place"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__external_cause_location"]}, "external_cause_notes": {"name": "external_cause_notes", "description": "Free-form description of the location of external cause of death, if applicable.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__external_cause_notes"]}, "was_pregnant": {"name": "was_pregnant", "description": "Whether the deceased was pregnant.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__was_pregnant"]}, "pregnancy_contributed": {"name": "pregnancy_contributed", "description": "Whether the pregnancy contributed to the death.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__pregnancy_contributed"]}, "fetal_or_infant": {"name": "fetal_or_infant", "description": "Whether the deceased was themselves a foetus or infant.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__fetal_or_infant"]}, "stillborn": {"name": "stillborn", "description": "Whether the deceased was themselves stillborn.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__stillborn"]}, "birth_weight": {"name": "birth_weight", "description": "If the deceased was a foetus, stillborn, or infant, their birth weight.", "meta": {"masking": {"kind": "integer", "range": "1-10"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "1-10"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__birth_weight"]}, "within_day_of_birth": {"name": "within_day_of_birth", "description": "If the deceased was a foetus, stillborn, or infant, whether their passing was on the day of their birth.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__within_day_of_birth"]}, "hours_survived_since_birth": {"name": "hours_survived_since_birth", "description": "If the deceased was an infant, how many days since the birth passed before their death.", "meta": {"masking": {"kind": "integer", "range": "1-50"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "1-50"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__hours_survived_since_birth"]}, "carrier_age": {"name": "carrier_age", "description": "If the deceased was a foetus, stillborn, or infant, the age of the carrier.", "meta": {"masking": {"kind": "integer", "range": "20-50"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "20-50"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__carrier_age"]}, "carrier_pregnancy_weeks": {"name": "carrier_pregnancy_weeks", "description": "If the deceased was a foetus, stillborn, or infant, how many weeks pregnant their carrier was.", "meta": {"masking": {"kind": "integer", "range": "0-40"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-40"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__carrier_pregnancy_weeks"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_death_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_death_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_death_data.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "outside_health_facility": {"name": "outside_health_facility", "description": "Whether the death occurred outside of the facility.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__outside_health_facility"]}, "primary_cause_time_after_onset": {"name": "primary_cause_time_after_onset", "description": "The time in minutes after onset of the primary cause of death, if known.", "meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__primary_cause_time_after_onset"]}, "primary_cause_condition_id": {"name": "primary_cause_condition_id", "description": "Reference to the primary cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if known.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__primary_cause_condition_id"]}, "antecedent_cause1_time_after_onset": {"name": "antecedent_cause1_time_after_onset", "description": "The time in minutes after onset of an antecedent (1) cause of death, if applicable.", "meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__antecedent_cause1_time_after_onset"]}, "antecedent_cause1_condition_id": {"name": "antecedent_cause1_condition_id", "description": "Reference to an antecedent (1) cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if applicable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__antecedent_cause1_condition_id"]}, "antecedent_cause2_time_after_onset": {"name": "antecedent_cause2_time_after_onset", "description": "The time in minutes after onset of an antecedent (2) cause of death, if applicable.", "meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__antecedent_cause2_time_after_onset"]}, "antecedent_cause2_condition_id": {"name": "antecedent_cause2_condition_id", "description": "Reference to an antecedent (2) cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if applicable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__antecedent_cause2_condition_id"]}, "external_cause_date_legacy": {"name": "external_cause_date_legacy", "description": "[Deprecated] Timestamp of external cause of death, if applicable.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__external_cause_date_legacy"]}, "last_surgery_date_legacy": {"name": "last_surgery_date_legacy", "description": "[Deprecated] Timestamp of the most recent surgery the patient received, if any.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__last_surgery_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_death_data.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_final": {"name": "is_final", "description": "Whether this date record is final.\n\nIn Tamanu, this is set by a supervisor after review, and cannot be reversed; it causes all fields to\nbecome read-only. The only way to undo this record is through a `death_revert_logs`.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__is_final"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in patient_death_data.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "antecedent_cause3_time_after_onset": {"name": "antecedent_cause3_time_after_onset", "description": "The time in minutes after onset of an antecedent (3) cause of death, if applicable.", "meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {"masking": {"kind": "integer", "range": "0-40000"}}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__antecedent_cause3_time_after_onset"]}, "autopsy_requested": {"name": "autopsy_requested", "description": "Whether an autopsy was requested.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__autopsy_requested"]}, "autopsy_findings_used": {"name": "autopsy_findings_used", "description": "If an autopsy was requested, whether the findings were used in the death certification.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__autopsy_findings_used"]}, "manner_of_death_description": {"name": "manner_of_death_description", "description": "If an external cause occurred, a text description on how and if applicable, notes of poisoning agent.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__manner_of_death_description"]}, "pregnancy_moment": {"name": "pregnancy_moment", "description": "The status of the pregnancy of the deceased, if applicable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__pregnancy_moment"]}, "multiple_pregnancy": {"name": "multiple_pregnancy", "description": "Whether the deceased infant happened in a multiple pregnancy.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__multiple_pregnancy"]}, "mother_condition_description": {"name": "mother_condition_description", "description": "A text description stating the conditions of mother that affected the fetus/newborn, if the death was perinatal.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__mother_condition_description"]}, "antecedent_cause3_condition_id": {"name": "antecedent_cause3_condition_id", "description": "Reference to an antecedent (3) cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if applicable.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_death_data__antecedent_cause3_condition_id"]}}, "meta": {"js_class": "PatientDeathData", "triggers": ["notify_patient_death_data_changed", "record_patient_death_data_changelog", "set_patient_death_data_updated_at", "set_patient_death_data_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientDeathData", "triggers": ["notify_patient_death_data_changed", "record_patient_death_data_changelog", "set_patient_death_data_updated_at", "set_patient_death_data_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"js_class": "PatientDeathData", "triggers": ["notify_patient_death_data_changed", "record_patient_death_data_changelog", "set_patient_death_data_updated_at", "set_patient_death_data_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_death_data\"", "created_at": 1775621423.0954347, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_death_data"]}, "source.tamanu.tamanu.procedure_assistant_clinicians": {"database": "central", "schema": "public", "name": "procedure_assistant_clinicians", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/procedure_assistant_clinicians.yml", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.yml", "unique_id": "source.tamanu.tamanu.procedure_assistant_clinicians", "fqn": ["tamanu", "tamanu", "procedure_assistant_clinicians"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "procedure_assistant_clinicians", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Junction table that links procedures to their assistant clinicians. Records which users served as assistant clinicians for specific procedures.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in procedure_assistant_clinicians.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "procedure_id": {"name": "procedure_id", "description": "Reference to the [procedure](#!/source/source.tamanu.tamanu.procedures) this assistant clinician is associated with.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedure_assistant_clinicians__procedure_id"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who served as an assistant clinician for the procedure.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedure_assistant_clinicians__user_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in procedure_assistant_clinicians.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in procedure_assistant_clinicians.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in procedure_assistant_clinicians.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in procedure_assistant_clinicians.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_procedure_assistant_clinicians_changed", "record_procedure_assistant_clinicians_changelog", "set_procedure_assistant_clinicians_updated_at", "set_procedure_assistant_clinicians_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_procedure_assistant_clinicians_changed", "record_procedure_assistant_clinicians_changelog", "set_procedure_assistant_clinicians_updated_at", "set_procedure_assistant_clinicians_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_procedure_assistant_clinicians_changed", "record_procedure_assistant_clinicians_changelog", "set_procedure_assistant_clinicians_updated_at", "set_procedure_assistant_clinicians_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"procedure_assistant_clinicians\"", "created_at": 1775621423.108204, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__procedure_assistant_clinicians"]}, "source.tamanu.tamanu.user_facilities": {"database": "central", "schema": "public", "name": "user_facilities", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_facilities.yml", "original_file_path": "../../database/model/public/user_facilities.yml", "unique_id": "source.tamanu.tamanu.user_facilities", "fqn": ["tamanu", "tamanu", "user_facilities"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_facilities", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association of users to facilities.\n\nThis can be used to assign users to certain facilities, for authorisation purposes or for staff convenience.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_facilities.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "facility_id": {"name": "facility_id", "description": "The [facility](#!/source/source.tamanu.tamanu.facilities).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_facilities__facility_id"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_facilities__user_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in user_facilities.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_user_facilities_changed", "record_user_facilities_changelog", "set_user_facilities_updated_at", "set_user_facilities_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_user_facilities_changed", "record_user_facilities_changelog", "set_user_facilities_updated_at", "set_user_facilities_updated_at_sync_tick"]}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": ["notify_user_facilities_changed", "record_user_facilities_changelog", "set_user_facilities_updated_at", "set_user_facilities_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_facilities\"", "created_at": 1775621423.1140559, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_facilities"]}, "source.tamanu.tamanu.document_metadata": {"database": "central", "schema": "public", "name": "document_metadata", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/document_metadata.yml", "original_file_path": "../../database/model/public/document_metadata.yml", "unique_id": "source.tamanu.tamanu.document_metadata", "fqn": ["tamanu", "tamanu", "document_metadata"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "document_metadata", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Information about an uploaded document or file, typically attached to an encounter or directly to a patient.\n\nThe actual file data is stored in [`attachments`](#!/source/source.tamanu.tamanu.attachments).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in document_metadata.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "name": {"name": "name", "description": "Free-form name of the document.\n\nOften this is the filename.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__name"]}, "type": {"name": "type", "description": "The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__type"]}, "document_created_at": {"name": "document_created_at", "description": "When the document was created.\n\nHistorically (before v2.0) this was the \"created at\" timestamp of the file itself, as reported by\nthe OS. However that information is no longer available to Tamanu in most contexts, so this is now\nusually set to the upload time.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__document_created_at"]}, "document_uploaded_at": {"name": "document_uploaded_at", "description": "When the document was uploaded.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__document_uploaded_at"]}, "document_owner": {"name": "document_owner", "description": "Name of the person who owns the document.\n\nTypically this is the uploader's name.", "meta": {"masking": "name"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__document_owner"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients) the document was uploaded to.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__patient_id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) the document was uploaded to.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__encounter_id"]}, "attachment_id": {"name": "attachment_id", "description": "The [file data](#!/source/source.tamanu.tamanu.attachments).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__attachment_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in document_metadata.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in document_metadata.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in document_metadata.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "department_id": {"name": "department_id", "description": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) the document was uploaded from.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__department_id"]}, "note": {"name": "note", "description": "Free-form description of the document.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__note"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in document_metadata.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "document_created_at_legacy": {"name": "document_created_at_legacy", "description": "[Deprecated] When the document was created.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__document_created_at_legacy"]}, "document_uploaded_at_legacy": {"name": "document_uploaded_at_legacy", "description": "[Deprecated] When the document was uploaded.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__document_uploaded_at_legacy"]}, "source": {"name": "source", "description": "Where the document came from.\n\nOne of:\n- `patient_letter`\n- `uploaded`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.document_metadata__source"]}}, "meta": {"triggers": ["notify_document_metadata_changed", "record_document_metadata_changelog", "set_document_metadata_updated_at", "set_document_metadata_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_document_metadata_changed", "record_document_metadata_changelog", "set_document_metadata_updated_at", "set_document_metadata_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_document_metadata_changed", "record_document_metadata_changelog", "set_document_metadata_updated_at", "set_document_metadata_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"document_metadata\"", "created_at": 1775621423.155149, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__document_metadata"]}, "source.tamanu.tamanu.procedure_type_surveys": {"database": "central", "schema": "public", "name": "procedure_type_surveys", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/procedure_type_surveys.yml", "original_file_path": "../../database/model/public/procedure_type_surveys.yml", "unique_id": "source.tamanu.tamanu.procedure_type_surveys", "fqn": ["tamanu", "tamanu", "procedure_type_surveys"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "procedure_type_surveys", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association between procedure types and surveys\n\nThis link is used to populate an embedded survey in the procedure modal", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in procedure_type_surveys.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "procedure_type_id": {"name": "procedure_type_id", "description": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data) (`type=procedureType`)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedure_type_surveys__procedure_type_id"]}, "survey_id": {"name": "survey_id", "description": "Reference to a [survey](#!/source/source.tamanu.tamanu.surveys).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.procedure_type_surveys__survey_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in procedure_type_surveys.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in procedure_type_surveys.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in procedure_type_surveys.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in procedure_type_surveys.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_procedure_type_surveys_changed", "record_procedure_type_surveys_changelog", "set_procedure_type_surveys_updated_at", "set_procedure_type_surveys_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_procedure_type_surveys_changed", "record_procedure_type_surveys_changelog", "set_procedure_type_surveys_updated_at", "set_procedure_type_surveys_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_procedure_type_surveys_changed", "record_procedure_type_surveys_changelog", "set_procedure_type_surveys_updated_at", "set_procedure_type_surveys_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"procedure_type_surveys\"", "created_at": 1775621423.167991, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__procedure_type_surveys"]}, "source.tamanu.tamanu.administered_vaccines": {"database": "central", "schema": "public", "name": "administered_vaccines", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/administered_vaccines.yml", "original_file_path": "../../database/model/public/administered_vaccines.yml", "unique_id": "source.tamanu.tamanu.administered_vaccines", "fqn": ["tamanu", "tamanu", "administered_vaccines"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "administered_vaccines", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of vaccines administered to patients.\n\nVaccinations are recorded via the Vaccinations modal; they are selected\nfrom a list of Scheduled Vaccines and linked to a Patient via an Encounter.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in administered_vaccines.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in administered_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in administered_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in administered_vaccines.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "batch": {"name": "batch", "description": "Batch identifier of vaccine administrations recorded", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__batch"]}, "status": {"name": "status", "description": "Status of vaccine administrations recorded. \n\nThe `RECORDED_IN_ERROR` status is assigned to vaccines initially recorded\nas `GIVEN` that are then deleted.\n\nThe `HISTORICAL` status is assigned to vaccines initially recorded as \n`NOT_GIVEN` that are then recorded as `GIVEN`. This `HISTORICAL` status \nkeeps a record that the vaccine was marked as `NOT_GIVEN` but hides this\nrecord from the frontend to avoid confusion or conflict with the `GIVEN`\nrecord.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__status"]}, "reason": {"name": "reason", "description": "Reason for vaccine administrations `NOT_GIVEN` status. This is a free text field", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__reason"]}, "date": {"name": "date", "description": "Local date for the record in administered_vaccines.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "scheduled_vaccine_id": {"name": "scheduled_vaccine_id", "description": "Reference to the [Scheduled Vaccine](#!/source/source.tamanu.tamanu.scheduled_vaccines) that was\nadministered.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__scheduled_vaccine_id"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [Encounter](#!/source/source.tamanu.tamanu.encounters) this vaccine was given in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__encounter_id"]}, "injection_site": {"name": "injection_site", "description": "Injection site of the vaccine administrations recorded", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__injection_site"]}, "consent": {"name": "consent", "description": "Consent of the vaccine administrations recorded", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__consent"]}, "recorder_id": {"name": "recorder_id", "description": "Reference to the [User](#!/source/source.tamanu.tamanu.users) who recorded this vaccination.\nThis may differ from the User or person who administered the vaccine.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__recorder_id"]}, "location_id": {"name": "location_id", "description": "Reference to the [Location](#!/source/source.tamanu.tamanu.locations) at which the vaccine was\ngiven.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__location_id"]}, "department_id": {"name": "department_id", "description": "Reference to the [Department](#!/source/source.tamanu.tamanu.departments) at which the vaccine was\ngiven.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__department_id"]}, "given_by": {"name": "given_by", "description": "Free text field for the name of the health practitioner who administered the\nvaccine. This is defaulted to the `display_name` of the logged-in User, but can\nbe changed. It is not a requirement that the administerer is a Tamanu User.", "meta": {"masking": "name"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__given_by"]}, "date_legacy": {"name": "date_legacy", "description": "[Deprecated] date field which is a timestamp of the event being recorded in administered_vaccines.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in administered_vaccines.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "not_given_reason_id": {"name": "not_given_reason_id", "description": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=vaccineNotGivenReason`).\n\nThese are presented as a dropdown for ease of recording and reporting, alongside the free-text field.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__not_given_reason_id"]}, "given_elsewhere": {"name": "given_elsewhere", "description": "Checks if the vaccine was given elsewhere", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__given_elsewhere"]}, "vaccine_name": {"name": "vaccine_name", "description": "Vaccine name of the vaccine administration recorded", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__vaccine_name"]}, "vaccine_brand": {"name": "vaccine_brand", "description": "Vaccine brand of the vaccine administration recorded", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__vaccine_brand"]}, "disease": {"name": "disease", "description": "Disease the vaccine addresses of the vaccine administration recorded", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__disease"]}, "circumstance_ids": {"name": "circumstance_ids", "description": "Array of references to [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=vaccineCircumstance`).", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__circumstance_ids"]}, "consent_given_by": {"name": "consent_given_by", "description": "Free text field recording who gave consent for the vaccination.\nThis is usually the patient themselves, but may differ for children or dependent\npersons or other cases.", "meta": {"masking": "name"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "name"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.administered_vaccines__consent_given_by"]}}, "meta": {"triggers": ["notify_administered_vaccines_changed", "record_administered_vaccines_changelog", "set_administered_vaccines_updated_at", "set_administered_vaccines_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_administered_vaccines_changed", "record_administered_vaccines_changelog", "set_administered_vaccines_updated_at", "set_administered_vaccines_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_administered_vaccines_changed", "record_administered_vaccines_changelog", "set_administered_vaccines_updated_at", "set_administered_vaccines_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"administered_vaccines\"", "created_at": 1775621423.2079666, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__administered_vaccines"]}, "source.tamanu.tamanu.report_definition_versions": {"database": "central", "schema": "public", "name": "report_definition_versions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/report_definition_versions.yml", "original_file_path": "../../database/model/public/report_definition_versions.yml", "unique_id": "source.tamanu.tamanu.report_definition_versions", "fqn": ["tamanu", "tamanu", "report_definition_versions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "report_definition_versions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A report definition containing the actual executable SQL query.\n\nReport versions are immutable and changes to a report create a new version.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in report_definition_versions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in report_definition_versions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in report_definition_versions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in report_definition_versions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "version_number": {"name": "version_number", "description": "The version number.\n\nVersion numbers are incrementing integers i.e 1,2,3,4.\n\nThe active version is determined by the highest `status = 'published'` version number", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__version_number"]}, "notes": {"name": "notes", "description": "Free-form description or usage notes.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__notes"]}, "status": {"name": "status", "description": "Status of this version of the report.\n\nOne of:\n- `draft`\n- `published`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__status"]}, "query": {"name": "query", "description": "The SQL query.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__query"]}, "query_options": {"name": "query_options", "description": "JSON config containing additional options for the query.\n\n- Form fields to allow customisation of the query when generating reports (query replacements)\n- Default date range e.g. last 30 days\n- Context for executing query e.g. this facility or all facilities (facility or central server)", "meta": {}, "data_type": "json", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__query_options"]}, "report_definition_id": {"name": "report_definition_id", "description": "The [report definition](#!/source/source.tamanu.tamanu.report_definitions).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__report_definition_id"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who saved this report version.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.report_definition_versions__user_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in report_definition_versions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_report_definition_versions_changed", "record_report_definition_versions_changelog", "set_report_definition_versions_updated_at", "set_report_definition_versions_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_report_definition_versions_changed", "record_report_definition_versions_changelog", "set_report_definition_versions_updated_at", "set_report_definition_versions_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_report_definition_versions_changed", "record_report_definition_versions_changelog", "set_report_definition_versions_updated_at", "set_report_definition_versions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"report_definition_versions\"", "created_at": 1775621423.23447, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__report_definition_versions"]}, "source.tamanu.tamanu.sync_lookup": {"database": "central", "schema": "public", "name": "sync_lookup", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/sync_lookup.yml", "original_file_path": "../../database/model/public/sync_lookup.yml", "unique_id": "source.tamanu.tamanu.sync_lookup", "fqn": ["tamanu", "tamanu", "sync_lookup"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "sync_lookup", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Cache of records to use for sync.\n\nThis is used internally in the sync process.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in sync_lookup.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "record_id": {"name": "record_id", "description": "The `id` field of the record.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__record_id"]}, "record_type": {"name": "record_type", "description": "The table name of the record.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__record_type"]}, "data": {"name": "data", "description": "All the fields of the record.", "meta": {}, "data_type": "json", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__data"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in sync_lookup.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "patient_id": {"name": "patient_id", "description": "If the record has a [patient](#!/source/source.tamanu.tamanu.patients) reference, this is it extracted here.\n\nThis is used to filter records efficiently during the sync process.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__patient_id"]}, "encounter_id": {"name": "encounter_id", "description": "If the record has an [encounter](#!/source/source.tamanu.tamanu.encounters) reference, this is it extracted here.\n\nThis is used to filter records efficiently during the sync process.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__encounter_id"]}, "facility_id": {"name": "facility_id", "description": "If the record has a [facility](#!/source/source.tamanu.tamanu.facilitys) reference, this is it extracted here.\n\nThis is used to filter records efficiently during the sync process.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__facility_id"]}, "is_lab_request": {"name": "is_lab_request", "description": "Whether the record is or is related to a lab request.\n\nThis is used to filter records efficiently during the sync process.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__is_lab_request"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record is deleted (`deleted_at` is not null).\n\nThis is used to sort and filter records efficiently during the sync process.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__is_deleted"]}, "updated_at_by_field_sum": {"name": "updated_at_by_field_sum", "description": "If the record has an `updatedAtByField`, the sum of those values.\n\nThis is used to sort and filter records efficiently during the sync process.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__updated_at_by_field_sum"]}, "pushed_by_device_id": {"name": "pushed_by_device_id", "description": "The unique device that pushed this record.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_lookup__pushed_by_device_id"]}}, "meta": {"masking": "truncate", "triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"masking": "truncate", "triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"masking": "truncate", "triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"sync_lookup\"", "created_at": 1775621423.2645607, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__sync_lookup"]}, "source.tamanu.tamanu.encounter_prescriptions": {"database": "central", "schema": "public", "name": "encounter_prescriptions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounter_prescriptions.yml", "original_file_path": "../../database/model/public/encounter_prescriptions.yml", "unique_id": "source.tamanu.tamanu.encounter_prescriptions", "fqn": ["tamanu", "tamanu", "encounter_prescriptions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounter_prescriptions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association of encounter to prescription", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounter_prescriptions.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "encounter_id": {"name": "encounter_id", "description": "The [encounter](#!/source/source.tamanu.tamanu.encounters)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_prescriptions__encounter_id"]}, "prescription_id": {"name": "prescription_id", "description": "The [prescription](#!/source/source.tamanu.tamanu.prescriptions)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_prescriptions__prescription_id"]}, "is_selected_for_discharge": {"name": "is_selected_for_discharge", "description": "Whether the prescription is for when the patient is discharged.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_prescriptions__is_selected_for_discharge"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounter_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounter_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounter_prescriptions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounter_prescriptions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_encounter_prescriptions_changed", "record_encounter_prescriptions_changelog", "set_encounter_prescriptions_updated_at", "set_encounter_prescriptions_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounter_prescriptions_changed", "record_encounter_prescriptions_changelog", "set_encounter_prescriptions_updated_at", "set_encounter_prescriptions_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_encounter_prescriptions_changed", "record_encounter_prescriptions_changelog", "set_encounter_prescriptions_updated_at", "set_encounter_prescriptions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounter_prescriptions\"", "created_at": 1775621423.2790966, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounter_prescriptions"]}, "source.tamanu.tamanu.notifications": {"database": "central", "schema": "public", "name": "notifications", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/notifications.yml", "original_file_path": "../../database/model/public/notifications.yml", "unique_id": "source.tamanu.tamanu.notifications", "fqn": ["tamanu", "tamanu", "notifications"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "notifications", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Notifications for the clinician dashboard", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in notifications.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "type": {"name": "type", "description": "Type of the notification\n\nOne of:\n- `imaging_request`\n- `lab_request`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notifications__type"]}, "status": {"name": "status", "description": "Status of the notification\n\nOne of:\n- `unread`\n- `read`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notifications__status"]}, "user_id": {"name": "user_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) that get the notification.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notifications__user_id"]}, "patient_id": {"name": "patient_id", "description": "Related patient of the notification", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notifications__patient_id"]}, "created_time": {"name": "created_time", "description": "When the notification was created", "meta": {}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notifications__created_time"]}, "metadata": {"name": "metadata", "description": "Metadata of the notification", "meta": {"masking": "empty"}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {"masking": "empty"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.notifications__metadata"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in notifications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in notifications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in notifications.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in notifications.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_notifications_changed", "record_notifications_changelog", "set_notifications_updated_at", "set_notifications_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_notifications_changed", "record_notifications_changelog", "set_notifications_updated_at", "set_notifications_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_notifications_changed", "record_notifications_changelog", "set_notifications_updated_at", "set_notifications_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"notifications\"", "created_at": 1775621423.2970982, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__notifications"]}, "source.tamanu.tamanu.reference_medication_templates": {"database": "central", "schema": "public", "name": "reference_medication_templates", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/reference_medication_templates.yml", "original_file_path": "../../database/model/public/reference_medication_templates.yml", "unique_id": "source.tamanu.tamanu.reference_medication_templates", "fqn": ["tamanu", "tamanu", "reference_medication_templates"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "reference_medication_templates", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Stores templates for medications, allowing for pre-defined medication orders.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in reference_medication_templates.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "reference_data_id": {"name": "reference_data_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) for this medication template.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__reference_data_id"]}, "medication_id": {"name": "medication_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) for the specific drug in this template.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__medication_id"]}, "is_variable_dose": {"name": "is_variable_dose", "description": "Boolean indicating if the medication is to be administered \"pro re nata\" (as needed).", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__is_variable_dose"]}, "is_prn": {"name": "is_prn", "description": "Boolean indicating if the medication dose is variable.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__is_prn"]}, "dose_amount": {"name": "dose_amount", "description": "The amount of medication per dose.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__dose_amount"]}, "units": {"name": "units", "description": "The unit for the dose amount (e.g., mg, mL).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__units"]}, "frequency": {"name": "frequency", "description": "How often the medication should be administered (e.g., BID, TID, QID).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__frequency"]}, "route": {"name": "route", "description": "The route of administration for the medication (e.g., Oral, IV, IM).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__route"]}, "duration_value": {"name": "duration_value", "description": "The numeric value for the duration the medication should be taken (e.g., 7, 14).", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__duration_value"]}, "duration_unit": {"name": "duration_unit", "description": "The unit for the medication duration (e.g., days, weeks, months).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__duration_unit"]}, "notes": {"name": "notes", "description": "Additional notes or instructions for the medication template.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__notes"]}, "discharge_quantity": {"name": "discharge_quantity", "description": "The quantity of medication to be dispensed upon patient discharge.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__discharge_quantity"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in reference_medication_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in reference_medication_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in reference_medication_templates.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in reference_medication_templates.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_ongoing": {"name": "is_ongoing", "description": "A boolean indicating if the medication is ongoing", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_medication_templates__is_ongoing"]}}, "meta": {"triggers": ["notify_reference_medication_templates_changed", "record_reference_medication_templates_changelog", "set_reference_medication_templates_updated_at", "set_reference_medication_templates_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_reference_medication_templates_changed", "record_reference_medication_templates_changelog", "set_reference_medication_templates_updated_at", "set_reference_medication_templates_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_reference_medication_templates_changed", "record_reference_medication_templates_changelog", "set_reference_medication_templates_updated_at", "set_reference_medication_templates_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"reference_medication_templates\"", "created_at": 1775621423.3201842, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__reference_medication_templates"]}, "source.tamanu.tamanu.patient_conditions": {"database": "central", "schema": "public", "name": "patient_conditions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_conditions.yml", "original_file_path": "../../database/model/public/patient_conditions.yml", "unique_id": "source.tamanu.tamanu.patient_conditions", "fqn": ["tamanu", "tamanu", "patient_conditions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_conditions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "List of ongoing conditions known about a patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Ongoing conditions\".\n\nSee also: `public.patient_allergies`, `public.patient_care_plans`,\n`public.patient_family_histories`, `public.patient_issues`.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_conditions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_conditions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note": {"name": "note", "description": "Free-form description of this condition.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__note"]}, "recorded_date": {"name": "recorded_date", "description": "Datetime at which this issue was recorded.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__recorded_date"]}, "resolved": {"name": "resolved", "description": "Whether the condition has resolved.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__resolved"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__patient_id"]}, "examiner_id": {"name": "examiner_id", "description": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) diagnosing/recording this\ncondition.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__examiner_id"]}, "condition_id": {"name": "condition_id", "description": "Reference to a diagnosis describing this issue ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__condition_id"]}, "recorded_date_legacy": {"name": "recorded_date_legacy", "description": "[Deprecated] Timestamp at which this issue was recorded.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__recorded_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_conditions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "resolution_date": {"name": "resolution_date", "description": "Datetime at which this issue was resolved.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__resolution_date"]}, "resolution_practitioner_id": {"name": "resolution_practitioner_id", "description": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) diagnosing/recording the\nresolution of this condition.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__resolution_practitioner_id"]}, "resolution_note": {"name": "resolution_note", "description": "Free-form description or notes about the resolution of this condition.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_conditions__resolution_note"]}}, "meta": {"triggers": ["notify_patient_conditions_changed", "record_patient_conditions_changelog", "set_patient_conditions_updated_at", "set_patient_conditions_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_conditions_changed", "record_patient_conditions_changelog", "set_patient_conditions_updated_at", "set_patient_conditions_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_conditions_changed", "record_patient_conditions_changelog", "set_patient_conditions_updated_at", "set_patient_conditions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_conditions\"", "created_at": 1775621423.4363422, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_conditions"]}, "source.tamanu.tamanu.survey_response_answers": {"database": "central", "schema": "public", "name": "survey_response_answers", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/survey_response_answers.yml", "original_file_path": "../../database/model/public/survey_response_answers.yml", "unique_id": "source.tamanu.tamanu.survey_response_answers", "fqn": ["tamanu", "tamanu", "survey_response_answers"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "survey_response_answers", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A single answer as part of a [survey response](#!/source/source.tamanu.tamanu.survey_responses).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in survey_response_answers.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in survey_response_answers.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in survey_response_answers.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in survey_response_answers.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Name of the question.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_response_answers__name"]}, "body": {"name": "body", "description": "Value of the answer.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_response_answers__body"]}, "response_id": {"name": "response_id", "description": "The [survey response](#!/source/source.tamanu.tamanu.survey_responses).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_response_answers__response_id"]}, "data_element_id": {"name": "data_element_id", "description": "Reference to the [question](#!/source/source.tamanu.tamanu.program_data_elements).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_response_answers__data_element_id"]}, "body_legacy": {"name": "body_legacy", "description": "[Deprecated] Value of the answer in old format.", "meta": {"masking": "text"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.survey_response_answers__body_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in survey_response_answers.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_survey_response_answers_changed", "record_survey_response_answers_changelog", "set_survey_response_answers_updated_at", "set_survey_response_answers_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_survey_response_answers_changed", "record_survey_response_answers_changelog", "set_survey_response_answers_updated_at", "set_survey_response_answers_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_survey_response_answers_changed", "record_survey_response_answers_changelog", "set_survey_response_answers_updated_at", "set_survey_response_answers_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"survey_response_answers\"", "created_at": 1775621423.4572308, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__survey_response_answers"]}, "source.tamanu.tamanu.reference_data_relations": {"database": "central", "schema": "public", "name": "reference_data_relations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/reference_data_relations.yml", "original_file_path": "../../database/model/public/reference_data_relations.yml", "unique_id": "source.tamanu.tamanu.reference_data_relations", "fqn": ["tamanu", "tamanu", "reference_data_relations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "reference_data_relations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Entity hierarchy for reference data.\n\nSome reference datas can be organised in a hierarchy. This is how that's done.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in reference_data_relations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in reference_data_relations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in reference_data_relations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in reference_data_relations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "reference_data_id": {"name": "reference_data_id", "description": "The [reference data](#!/source/source.tamanu.tamanu.reference_data) item.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data_relations__reference_data_id"]}, "reference_data_parent_id": {"name": "reference_data_parent_id", "description": "Another [reference data](#!/source/source.tamanu.tamanu.reference_data) item which is the parent of this one.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data_relations__reference_data_parent_id"]}, "type": {"name": "type", "description": "The type of hierarchy being described.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.reference_data_relations__type"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in reference_data_relations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_reference_data_relations_changed", "record_reference_data_relations_changelog", "set_reference_data_relations_updated_at", "set_reference_data_relations_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_reference_data_relations_changed", "record_reference_data_relations_changelog", "set_reference_data_relations_updated_at", "set_reference_data_relations_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_reference_data_relations_changed", "record_reference_data_relations_changelog", "set_reference_data_relations_updated_at", "set_reference_data_relations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"reference_data_relations\"", "created_at": 1775621423.4686127, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__reference_data_relations"]}, "source.tamanu.tamanu.task_template_designations": {"database": "central", "schema": "public", "name": "task_template_designations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/task_template_designations.yml", "original_file_path": "../../database/model/public/task_template_designations.yml", "unique_id": "source.tamanu.tamanu.task_template_designations", "fqn": ["tamanu", "tamanu", "task_template_designations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "task_template_designations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Association of designation to task template", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in task_template_designations.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "task_template_id": {"name": "task_template_id", "description": "The task template ([Task Template](#!/source/source.tamanu.tamanu.task_templates)).", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_template_designations__task_template_id"]}, "designation_id": {"name": "designation_id", "description": "The designation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.task_template_designations__designation_id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in task_template_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in task_template_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in task_template_designations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in task_template_designations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_task_template_designations_changed", "record_task_template_designations_changelog", "set_task_template_designations_updated_at", "set_task_template_designations_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_task_template_designations_changed", "record_task_template_designations_changelog", "set_task_template_designations_updated_at", "set_task_template_designations_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_task_template_designations_changed", "record_task_template_designations_changelog", "set_task_template_designations_updated_at", "set_task_template_designations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"task_template_designations\"", "created_at": 1775621423.481525, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__task_template_designations"]}, "source.tamanu.tamanu.permissions": {"database": "central", "schema": "public", "name": "permissions", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/permissions.yml", "original_file_path": "../../database/model/public/permissions.yml", "unique_id": "source.tamanu.tamanu.permissions", "fqn": ["tamanu", "tamanu", "permissions"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "permissions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "These are associations of permissions to roles.\n\nPermissions are modeled on the concept of a sentence like\n\n```\nROLE can VERB the NOUN\nROLE can VERB the NOUN which is specifically the OBJECT ID\n```\n\nSee also the [`roles`](#!/source/source.tamanu.tamanu.roles) and\n[`users`](#!/source/source.tamanu.tamanu.users) tables.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in permissions.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in permissions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in permissions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in permissions.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "role_id": {"name": "role_id", "description": "The [`role`](#!/source/source.tamanu.tamanu.roles) authorised for this permission.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.permissions__role_id"]}, "noun": {"name": "noun", "description": "The subject of the action/permission, usually the model or resource being affected.\n\nNouns are defined in `PascalCase` and are singular.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.permissions__noun"]}, "verb": {"name": "verb", "description": "The action verb for this permission.\n\nSome common verbs include: `create`, `read`, `write`, `list`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.permissions__verb"]}, "object_id": {"name": "object_id", "description": "An optional object ID to specialise the permission.\n\nIf this is not set the permission is generally for the entire class of objects, if it _is_ set then\nthe permission is _only_ for the specific object.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.permissions__object_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in permissions.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_permissions_changed", "record_permissions_changelog", "set_permissions_updated_at", "set_permissions_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["administration"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_permissions_changed", "record_permissions_changelog", "set_permissions_updated_at", "set_permissions_updated_at_sync_tick"]}, "tags": ["administration"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["administration"], "meta": {"triggers": ["notify_permissions_changed", "record_permissions_changelog", "set_permissions_updated_at", "set_permissions_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"permissions\"", "created_at": 1775621423.498567, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__permissions"]}, "source.tamanu.tamanu.patient_field_definition_categories": {"database": "central", "schema": "public", "name": "patient_field_definition_categories", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_field_definition_categories.yml", "original_file_path": "../../database/model/public/patient_field_definition_categories.yml", "unique_id": "source.tamanu.tamanu.patient_field_definition_categories", "fqn": ["tamanu", "tamanu", "patient_field_definition_categories"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_field_definition_categories", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Groupings for [patient field definitions](#!/source/source.tamanu.tamanu.patient_field_definitions).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_field_definition_categories.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_field_definition_categories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_field_definition_categories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_field_definition_categories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Name of category.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_field_definition_categories__name"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_field_definition_categories.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_patient_field_definition_categories_changed", "record_patient_field_definition_categories_changelog", "set_patient_field_definition_categories_updated_at", "set_patient_field_definition_categories_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_field_definition_categories_changed", "record_patient_field_definition_categories_changelog", "set_patient_field_definition_categories_updated_at", "set_patient_field_definition_categories_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_patient_field_definition_categories_changed", "record_patient_field_definition_categories_changelog", "set_patient_field_definition_categories_updated_at", "set_patient_field_definition_categories_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_field_definition_categories\"", "created_at": 1775621423.5098052, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_field_definition_categories"]}, "source.tamanu.tamanu.medication_administration_record_doses": {"database": "central", "schema": "public", "name": "medication_administration_record_doses", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/medication_administration_record_doses.yml", "original_file_path": "../../database/model/public/medication_administration_record_doses.yml", "unique_id": "source.tamanu.tamanu.medication_administration_record_doses", "fqn": ["tamanu", "tamanu", "medication_administration_record_doses"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "medication_administration_record_doses", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Stores details about individual doses given as part of a medication administration record. A single administration event may involve multiple distinct doses (e.g., taking two tablets).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in medication_administration_record_doses.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "dose_amount": {"name": "dose_amount", "description": "The amount or quantity of the medication administered in this specific dose entry.", "meta": {}, "data_type": "numeric", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__dose_amount"]}, "given_time": {"name": "given_time", "description": "The precise date and time when this specific dose was administered to the patient. This may differ slightly from the overall `administered_at` time in the parent record if multiple doses were given sequentially.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__given_time"]}, "given_by_user_id": {"name": "given_by_user_id", "description": "Reference to the [user](#!/model/model.public.users) who physically administered this dose to the patient.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__given_by_user_id"]}, "recorded_by_user_id": {"name": "recorded_by_user_id", "description": "Reference to the [user](#!/model/model.public.users) who recorded the details of this specific dose administration in the system. This may or may not be the same user who physically administered the dose (`given_by_user_id`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__recorded_by_user_id"]}, "mar_id": {"name": "mar_id", "description": "Reference to the MAR [medication administration record](#!/model/model.public.medication_administration_records) to which this dose belongs.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__mar_id"]}, "is_removed": {"name": "is_removed", "description": "Indicates whether this dose record has been removed or voided.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__is_removed"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in medication_administration_record_doses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in medication_administration_record_doses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in medication_administration_record_doses.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in medication_administration_record_doses.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "reason_for_removal": {"name": "reason_for_removal", "description": "A text field explaining why this dose record was removed or voided.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__reason_for_removal"]}, "dose_index": {"name": "dose_index", "description": "A sequential number indicating the order of this dose within a multi-dose administration. Helps track the sequence when multiple doses are given in a single administration event.", "meta": {}, "data_type": "integer", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__dose_index"]}, "reason_for_change": {"name": "reason_for_change", "description": "A text field documenting the reason for any modifications made to this dose record after it was initially recorded. This helps maintain an audit trail of changes and ensures proper documentation of why dose details were updated.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.medication_administration_record_doses__reason_for_change"]}}, "meta": {"triggers": ["notify_medication_administration_record_doses_changed", "record_medication_administration_record_doses_changelog", "set_medication_administration_record_doses_updated_at", "set_medication_administration_record_doses_updated_at_sync_tick"]}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_medication_administration_record_doses_changed", "record_medication_administration_record_doses_changelog", "set_medication_administration_record_doses_updated_at", "set_medication_administration_record_doses_updated_at_sync_tick"]}, "tags": []}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": [], "meta": {"triggers": ["notify_medication_administration_record_doses_changed", "record_medication_administration_record_doses_changelog", "set_medication_administration_record_doses_updated_at", "set_medication_administration_record_doses_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"medication_administration_record_doses\"", "created_at": 1775621423.5298824, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__medication_administration_record_doses"]}, "source.tamanu.tamanu.facilities": {"database": "central", "schema": "public", "name": "facilities", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/facilities.yml", "original_file_path": "../../database/model/public/facilities.yml", "unique_id": "source.tamanu.tamanu.facilities", "fqn": ["tamanu", "tamanu", "facilities"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "facilities", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of facilities.\n\nFacilities may be either or both of:\n\n- Any healthcare facility, like hospitals, clinics, mobile vaccination vans, laboratories, etc\n- A Tamanu Facility deployment.\n\nWhen syncing, patient and related records are scoped to a facility, according to the\n[`patient_facilities`](#!/source/source.tamanu.tamanu.patient_facilities) table.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in facilities.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in facilities.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "code": {"name": "code", "description": "Code (identifier) for the facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__code"]}, "name": {"name": "name", "description": "Full readable name.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__name"]}, "division": {"name": "division", "description": "Administrative division this facility lives in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__division"]}, "type": {"name": "type", "description": "Type of the facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__type"]}, "email": {"name": "email", "description": "Administrative email address of the facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__email"]}, "contact_number": {"name": "contact_number", "description": "Administrative contact number of the facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__contact_number"]}, "city_town": {"name": "city_town", "description": "City or town of the facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__city_town"]}, "street_address": {"name": "street_address", "description": "Street address of the facility.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__street_address"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in facilities.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "catchment_id": {"name": "catchment_id", "description": "Catchment area ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)).", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__catchment_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in facilities.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "is_sensitive": {"name": "is_sensitive", "description": "If set to `true`, encounters created on this facility will only be viewable when logged into this facility", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.facilities__is_sensitive"]}}, "meta": {"triggers": ["notify_facilities_changed", "record_facilities_changelog", "set_facilities_updated_at", "set_facilities_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_facilities_changed", "record_facilities_changelog", "set_facilities_updated_at", "set_facilities_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_facilities_changed", "record_facilities_changelog", "set_facilities_updated_at", "set_facilities_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"facilities\"", "created_at": 1775621423.552298, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__facilities"]}, "source.tamanu.tamanu.encounter_history": {"database": "central", "schema": "public", "name": "encounter_history", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/encounter_history.yml", "original_file_path": "../../database/model/public/encounter_history.yml", "unique_id": "source.tamanu.tamanu.encounter_history", "fqn": ["tamanu", "tamanu", "encounter_history"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "encounter_history", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Records changes to an encounter's basic details.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in encounter_history.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in encounter_history.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in encounter_history.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in encounter_history.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in encounter_history.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the original [encounter](#!/source/source.tamanu.tamanu.encounters) this history is for.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__encounter_id"]}, "department_id": {"name": "department_id", "description": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) the encounter was in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__department_id"]}, "location_id": {"name": "location_id", "description": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) the encounter was in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__location_id"]}, "examiner_id": {"name": "examiner_id", "description": "Reference to the [examiner](#!/source/source.tamanu.tamanu.users) for the encounter.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__examiner_id"]}, "encounter_type": {"name": "encounter_type", "description": "The type of the encounter.\n\nOne of:\n- `admission`\n- `clinic`\n- `imaging`\n- `emergency`\n- `observation`\n- `triage`\n- `surveyResponse`\n- `vaccination`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__encounter_type"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in encounter_history.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "actor_id": {"name": "actor_id", "description": "[Who](#!/source/source.tamanu.tamanu.users) made the change.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__actor_id"]}, "change_type": {"name": "change_type", "description": "The field which was changed.\n\nOne of:\n- `encounter_type`\n- `location`\n- `department`\n- `examiner`", "meta": {}, "data_type": "array", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.encounter_history__change_type"]}}, "meta": {"triggers": ["notify_encounter_history_changed", "record_encounter_history_changelog", "set_encounter_history_updated_at", "set_encounter_history_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_encounter_history_changed", "record_encounter_history_changelog", "set_encounter_history_updated_at", "set_encounter_history_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_encounter_history_changed", "record_encounter_history_changelog", "set_encounter_history_updated_at", "set_encounter_history_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"encounter_history\"", "created_at": 1775621423.6060174, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__encounter_history"]}, "source.tamanu.tamanu.patient_program_registrations": {"database": "central", "schema": "public", "name": "patient_program_registrations", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_program_registrations.yml", "original_file_path": "../../database/model/public/patient_program_registrations.yml", "unique_id": "source.tamanu.tamanu.patient_program_registrations", "fqn": ["tamanu", "tamanu", "patient_program_registrations"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_program_registrations", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table with information about the program registrations of a patient. This is helpful\nto enroll a specific patient within a program that will be followed for an extended\nperiod of time.\n\n**This table is append-only.**\nA new record is created every time there is a change to the status of a registration. \n\nAt the moment, this implies that when merging two patients, both with a registration to the same\nregistry, the merged patient ends up with two registrations.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_program_registrations.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_program_registrations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_program_registrations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_program_registrations.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in patient_program_registrations.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "registration_status": {"name": "registration_status", "description": "The current status of the registration.\n\nOne of:\n- `active`\n- `inactive`\n- `recordedInError`", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__registration_status"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [Patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__patient_id"]}, "program_registry_id": {"name": "program_registry_id", "description": "Reference to the [Program Registry](#!/source/source.tamanu.tamanu.program_registries)\nof the registration.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__program_registry_id"]}, "clinical_status_id": {"name": "clinical_status_id", "description": "Reference to the [Program Registry Clinical Status](#!/source/source.tamanu.tamanu.program_registry_clinical_statuses)\nof the registration.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__clinical_status_id"]}, "clinician_id": {"name": "clinician_id", "description": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) recording that\nregistration.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__clinician_id"]}, "registering_facility_id": {"name": "registering_facility_id", "description": "Reference to the [Facility](#!/source/source.tamanu.tamanu.facilities) where the\nregistration was registered in.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__registering_facility_id"]}, "facility_id": {"name": "facility_id", "description": "Reference to the [Facility](#!/source/source.tamanu.tamanu.facilities) this program\nregistration is from.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__facility_id"]}, "village_id": {"name": "village_id", "description": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=village`) this program registration is from.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__village_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_program_registrations.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "deactivated_clinician_id": {"name": "deactivated_clinician_id", "description": "The clinician that removed the patient from the program registry.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__deactivated_clinician_id"]}, "deactivated_date": {"name": "deactivated_date", "description": "The date that the patient from the program registry.", "meta": {"masking": "date"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_program_registrations__deactivated_date"]}}, "meta": {"triggers": ["notify_patient_program_registrations_changed", "record_patient_program_registrations_changelog", "set_patient_program_registrations_updated_at", "set_patient_program_registrations_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_patient_program_registrations_changed", "record_patient_program_registrations_changelog", "set_patient_program_registrations_updated_at", "set_patient_program_registrations_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_patient_program_registrations_changed", "record_patient_program_registrations_changelog", "set_patient_program_registrations_updated_at", "set_patient_program_registrations_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_program_registrations\"", "created_at": 1775621423.6629822, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_program_registrations"]}, "source.tamanu.tamanu.lab_test_panels": {"database": "central", "schema": "public", "name": "lab_test_panels", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_test_panels.yml", "original_file_path": "../../database/model/public/lab_test_panels.yml", "unique_id": "source.tamanu.tamanu.lab_test_panels", "fqn": ["tamanu", "tamanu", "lab_test_panels"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_test_panels", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A panel is a collection of lab test types, usually standardised.\n\nFor example the BMP (basic metabolic panel) is a panel of 8 blood tests. Instead of ordering all 8\ntests individually, a clinician can order the panel all at once. This may also used to more\nefficiently use samples.\n\nThis table defines the available test panels, and\n[`lab_test_panel_lab_test_types`](#!/source/source.tamanu.tamanu.lab_test_panel_lab_test_types)\ncontains the actual test types that are part of each panel. See\n[`lab_test_panel_requests`](#!/source/source.tamanu.tamanu.lab_test_panel_requests) for requesting\npanels specifically, and [`lab_test_requests`](#!/source/source.tamanu.tamanu.lab_test_requests) for\nrequesting lab tests in general.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_test_panels.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_test_panels.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_test_panels.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_test_panels.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "name": {"name": "name", "description": "Name of the test panel.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panels__name"]}, "code": {"name": "code", "description": "Internal Tamanu code of the panel.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panels__code"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in lab_test_panels.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "external_code": {"name": "external_code", "description": "External code, such as for interfacing with LIMS.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panels__external_code"]}, "category_id": {"name": "category_id", "description": "Reference to the category ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test panel.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_test_panels__category_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_test_panels.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_lab_test_panels_changed", "record_lab_test_panels_changelog", "set_lab_test_panels_updated_at", "set_lab_test_panels_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["reference"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_test_panels_changed", "record_lab_test_panels_changelog", "set_lab_test_panels_updated_at", "set_lab_test_panels_updated_at_sync_tick"]}, "tags": ["reference"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["reference"], "meta": {"triggers": ["notify_lab_test_panels_changed", "record_lab_test_panels_changelog", "set_lab_test_panels_updated_at", "set_lab_test_panels_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_test_panels\"", "created_at": 1775621423.68368, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_test_panels"]}, "source.tamanu.tamanu.appointments": {"database": "central", "schema": "public", "name": "appointments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/appointments.yml", "original_file_path": "../../database/model/public/appointments.yml", "unique_id": "source.tamanu.tamanu.appointments", "fqn": ["tamanu", "tamanu", "appointments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "appointments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Table of appointments.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in appointments.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in appointments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in appointments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in appointments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "start_time": {"name": "start_time", "description": "When the appointment starts.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__start_time"]}, "end_time": {"name": "end_time", "description": "When the appointment ends.", "meta": {"masking": "datetime"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__end_time"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__patient_id"]}, "clinician_id": {"name": "clinician_id", "description": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) recording that appointment.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__clinician_id"]}, "location_id": {"name": "location_id", "description": "The [location](#!/source/source.tamanu.tamanu.locations) where the appointment will take place.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__location_id"]}, "type_legacy": {"name": "type_legacy", "description": "The legacy type of appointment.\n\nOne of:\n- `Standard`\n- `Emergency`\n- `Specialist`\n- `Other`", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__type_legacy"]}, "status": {"name": "status", "description": "The current status of the appointment record.\n\nOne of:\n- `Confirmed`\n- `Arrived`\n- `No-show`\n- `Cancelled`", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__status"]}, "start_time_legacy": {"name": "start_time_legacy", "description": "[Deprecated] Start time.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__start_time_legacy"]}, "end_time_legacy": {"name": "end_time_legacy", "description": "[Deprecated] End time.", "meta": {"masking": "datetime"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "datetime"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__end_time_legacy"]}, "location_group_id": {"name": "location_group_id", "description": "The [location group](#!/source/source.tamanu.tamanu.location_groups) where the appointment will take place.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__location_group_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in appointments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}, "booking_type_id": {"name": "booking_type_id", "description": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=bookingType`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__booking_type_id"]}, "appointment_type_id": {"name": "appointment_type_id", "description": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=appointmentType`).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__appointment_type_id"]}, "is_high_priority": {"name": "is_high_priority", "description": "Boolean specify if the appointment is high priority.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__is_high_priority"]}, "encounter_id": {"name": "encounter_id", "description": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) linked to this appointment", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__encounter_id"]}, "schedule_id": {"name": "schedule_id", "description": "Reference to the [appointment schedule](#!/source/source.tamanu.tamanu.appointment_schedules) in the case of repeating appointments.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__schedule_id"]}, "additional_clinician_id": {"name": "additional_clinician_id", "description": "Reference to an additional [clinician](#!/source/source.tamanu.tamanu.users)", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__additional_clinician_id"]}, "link_encounter_id": {"name": "link_encounter_id", "description": "Reference to the related [encounter](#!/source/source.tamanu.tamanu.encounters) of the appointment", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.appointments__link_encounter_id"]}}, "meta": {"triggers": ["notify_appointments_changed", "record_appointments_changelog", "set_appointments_updated_at", "set_appointments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_appointments_changed", "record_appointments_changelog", "set_appointments_updated_at", "set_appointments_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_appointments_changed", "record_appointments_changelog", "set_appointments_updated_at", "set_appointments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"appointments\"", "created_at": 1775621423.734377, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__appointments"]}, "source.tamanu.tamanu.patient_family_histories": {"database": "central", "schema": "public", "name": "patient_family_histories", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_family_histories.yml", "original_file_path": "../../database/model/public/patient_family_histories.yml", "unique_id": "source.tamanu.tamanu.patient_family_histories", "fqn": ["tamanu", "tamanu", "patient_family_histories"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_family_histories", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "List of family history conditions known about a patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Family history\".\n\nSee also: `public.patient_allergies`, `public.patient_care_plans`, `public.patient_conditions`,\n`public.patient_issues`.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_family_histories.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_family_histories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_family_histories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_family_histories.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "note": {"name": "note", "description": "Free-form description of this issue.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__note"]}, "recorded_date": {"name": "recorded_date", "description": "Datetime at which this issue was recorded.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__recorded_date"]}, "relationship": {"name": "relationship", "description": "Free-form description of the family relationship.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__relationship"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__patient_id"]}, "practitioner_id": {"name": "practitioner_id", "description": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) recording this history.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__practitioner_id"]}, "diagnosis_id": {"name": "diagnosis_id", "description": "Reference to a diagnosis ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))\ndescribing this issue.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__diagnosis_id"]}, "recorded_date_legacy": {"name": "recorded_date_legacy", "description": "[Deprecated] Timestamp at which this issue was recorded.", "meta": {"masking": "date"}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_family_histories__recorded_date_legacy"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_family_histories.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"js_class": "PatientFamilyHistory", "triggers": ["notify_patient_family_histories_changed", "record_patient_family_histories_changelog", "set_patient_family_histories_updated_at", "set_patient_family_histories_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientFamilyHistory", "triggers": ["notify_patient_family_histories_changed", "record_patient_family_histories_changelog", "set_patient_family_histories_updated_at", "set_patient_family_histories_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"js_class": "PatientFamilyHistory", "triggers": ["notify_patient_family_histories_changed", "record_patient_family_histories_changelog", "set_patient_family_histories_updated_at", "set_patient_family_histories_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_family_histories\"", "created_at": 1775621423.76137, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_family_histories"]}, "source.tamanu.tamanu.ips_requests": {"database": "central", "schema": "public", "name": "ips_requests", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/ips_requests.yml", "original_file_path": "../../database/model/public/ips_requests.yml", "unique_id": "source.tamanu.tamanu.ips_requests", "fqn": ["tamanu", "tamanu", "ips_requests"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "ips_requests", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Queue of requests to generate [International Patient Summaries](https://international-patient-summary.net/) (IPS).", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in ips_requests.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in ips_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in ips_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in ips_requests.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "patient_id": {"name": "patient_id", "description": "The [patient](#!/source/source.tamanu.tamanu.patients).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.ips_requests__patient_id"]}, "created_by": {"name": "created_by", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who created this request.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.ips_requests__created_by"]}, "status": {"name": "status", "description": "Processing status.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.ips_requests__status"]}, "email": {"name": "email", "description": "Email to send the generated IPS to.", "meta": {"masking": "email"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "email"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.ips_requests__email"]}, "error": {"name": "error", "description": "If processing fails, the error.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.ips_requests__error"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in ips_requests.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_ips_requests_changed", "record_ips_requests_changelog", "set_ips_requests_updated_at", "set_ips_requests_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_ips_requests_changed", "record_ips_requests_changelog", "set_ips_requests_updated_at", "set_ips_requests_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_ips_requests_changed", "record_ips_requests_changelog", "set_ips_requests_updated_at", "set_ips_requests_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"ips_requests\"", "created_at": 1775621423.7836025, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__ips_requests"]}, "source.tamanu.tamanu.user_recently_viewed_patients": {"database": "central", "schema": "public", "name": "user_recently_viewed_patients", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/user_recently_viewed_patients.yml", "original_file_path": "../../database/model/public/user_recently_viewed_patients.yml", "unique_id": "source.tamanu.tamanu.user_recently_viewed_patients", "fqn": ["tamanu", "tamanu", "user_recently_viewed_patients"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "user_recently_viewed_patients", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "A list of patients that a user has viewed recently.\n\nThis powers the \"quick access\" list in Tamanu to get back to patients that a user was last\ninteracting with.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in user_recently_viewed_patients.", "meta": {}, "data_type": "uuid", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in user_recently_viewed_patients.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in user_recently_viewed_patients.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in user_recently_viewed_patients.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "user_id": {"name": "user_id", "description": "The [user](#!/source/source.tamanu.tamanu.users).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_recently_viewed_patients__user_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients) that was viewed.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.user_recently_viewed_patients__patient_id"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"user_recently_viewed_patients\"", "created_at": 1775621423.7946994, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__user_recently_viewed_patients"]}, "source.tamanu.tamanu.sync_queued_devices": {"database": "central", "schema": "public", "name": "sync_queued_devices", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/sync_queued_devices.yml", "original_file_path": "../../database/model/public/sync_queued_devices.yml", "unique_id": "source.tamanu.tamanu.sync_queued_devices", "fqn": ["tamanu", "tamanu", "sync_queued_devices"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "sync_queued_devices", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Devices waiting their turn to be synced.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in sync_queued_devices.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "last_seen_time": {"name": "last_seen_time", "description": "The last time the device has reached out to the syncing server.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_queued_devices__last_seen_time"]}, "facility_id_legacy": {"name": "facility_id_legacy", "description": "[Deprecated] Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this device is associated with.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_queued_devices__facility_id_legacy"]}, "last_synced_tick": {"name": "last_synced_tick", "description": "The sync tick the device is currently at.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_queued_devices__last_synced_tick"]}, "urgent": {"name": "urgent", "description": "A way for a device to bump its priority in the queue.", "meta": {}, "data_type": "boolean", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_queued_devices__urgent"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in sync_queued_devices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in sync_queued_devices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in sync_queued_devices.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "facility_ids": {"name": "facility_ids", "description": "Reference to the [facilities](#!/source/source.tamanu.tamanu.facilities) this device is associated with.", "meta": {}, "data_type": "jsonb", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.sync_queued_devices__facility_ids"]}}, "meta": {"triggers": []}, "source_meta": {}, "tags": ["system"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": []}, "tags": ["system"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["system"], "meta": {"triggers": []}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"sync_queued_devices\"", "created_at": 1775621423.809388, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__sync_queued_devices"]}, "source.tamanu.tamanu.patient_secondary_ids": {"database": "central", "schema": "public", "name": "patient_secondary_ids", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/patient_secondary_ids.yml", "original_file_path": "../../database/model/public/patient_secondary_ids.yml", "unique_id": "source.tamanu.tamanu.patient_secondary_ids", "fqn": ["tamanu", "tamanu", "patient_secondary_ids"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "patient_secondary_ids", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Alternative IDs to be checked for when searching for patient by ID.\n\nFor example, driver licence or passport numbers, or other national or local health numbers, if there\nare disparate systems or the country is in a transitional period.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in patient_secondary_ids.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in patient_secondary_ids.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in patient_secondary_ids.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in patient_secondary_ids.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "value": {"name": "value", "description": "Value of the identifier.", "meta": {"masking": "string"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_secondary_ids__value"]}, "visibility_status": {"name": "visibility_status", "description": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`. in patient_secondary_ids.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__visibility_status"]}, "type_id": {"name": "type_id", "description": "Reference to [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\nwith `type=secondaryIdType`.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_secondary_ids__type_id"]}, "patient_id": {"name": "patient_id", "description": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).\n\nThere may be zero or more `patient_secondary_ids` per patient.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.patient_secondary_ids__patient_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in patient_secondary_ids.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"js_class": "PatientSecondaryId", "triggers": ["notify_patient_secondary_ids_changed", "record_patient_secondary_ids_changelog", "set_patient_secondary_ids_updated_at", "set_patient_secondary_ids_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["patient"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"js_class": "PatientSecondaryId", "triggers": ["notify_patient_secondary_ids_changed", "record_patient_secondary_ids_changelog", "set_patient_secondary_ids_updated_at", "set_patient_secondary_ids_updated_at_sync_tick"]}, "tags": ["patient"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["patient"], "meta": {"js_class": "PatientSecondaryId", "triggers": ["notify_patient_secondary_ids_changed", "record_patient_secondary_ids_changelog", "set_patient_secondary_ids_updated_at", "set_patient_secondary_ids_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"patient_secondary_ids\"", "created_at": 1775621423.822195, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__patient_secondary_ids"]}, "source.tamanu.tamanu.lab_request_attachments": {"database": "central", "schema": "public", "name": "lab_request_attachments", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/lab_request_attachments.yml", "original_file_path": "../../database/model/public/lab_request_attachments.yml", "unique_id": "source.tamanu.tamanu.lab_request_attachments", "fqn": ["tamanu", "tamanu", "lab_request_attachments"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "lab_request_attachments", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Attachments (uploaded documents) to a lab request.\n\nThis could be forms for authorisation or consent, notes, instructions, etc.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in lab_request_attachments.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in lab_request_attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in lab_request_attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in lab_request_attachments.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "attachment_id": {"name": "attachment_id", "description": "The [attachment](#!/source/source.tamanu.tamanu.attachments) (obtained by uploading the file).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_attachments__attachment_id"]}, "lab_request_id": {"name": "lab_request_id", "description": "Reference to the [lab request](#!/source/source.tamanu.tamanu.lab_requests).", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_attachments__lab_request_id"]}, "title": {"name": "title", "description": "Short name of the attachment.", "meta": {"masking": "text"}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {"masking": "text"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_attachments__title"]}, "replaced_by_id": {"name": "replaced_by_id", "description": "Another lab request attachment which replaces this one.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.lab_request_attachments__replaced_by_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in lab_request_attachments.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_lab_request_attachments_changed", "record_lab_request_attachments_changelog", "set_lab_request_attachments_updated_at", "set_lab_request_attachments_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_lab_request_attachments_changed", "record_lab_request_attachments_changelog", "set_lab_request_attachments_updated_at", "set_lab_request_attachments_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_lab_request_attachments_changed", "record_lab_request_attachments_changelog", "set_lab_request_attachments_updated_at", "set_lab_request_attachments_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"lab_request_attachments\"", "created_at": 1775621423.8518102, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__lab_request_attachments"]}, "source.tamanu.tamanu.vital_logs": {"database": "central", "schema": "public", "name": "vital_logs", "resource_type": "source", "package_name": "tamanu", "path": "../../database/model/public/vital_logs.yml", "original_file_path": "../../database/model/public/vital_logs.yml", "unique_id": "source.tamanu.tamanu.vital_logs", "fqn": ["tamanu", "tamanu", "vital_logs"], "source_name": "tamanu", "source_description": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication.", "loader": "", "identifier": "vital_logs", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": null, "loaded_at_query": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "external": null, "description": "Change logs for vitals survey responses.", "columns": {"id": {"name": "id", "description": "Tamanu internal identifier (generally a UUID) in vital_logs.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__id"]}, "created_at": {"name": "created_at", "description": "Timestamp of when record was created in vital_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__created_at"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when record was last updated in vital_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at"]}, "deleted_at": {"name": "deleted_at", "description": "Timestamp of when record was deleted in vital_logs.", "meta": {}, "data_type": "timestamp with time zone", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__deleted_at"]}, "date": {"name": "date", "description": "Local date for the record in vital_logs.", "meta": {"masking": "date"}, "data_type": "character(19)", "constraints": [], "quote": null, "config": {"meta": {"masking": "date"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__date"]}, "previous_value": {"name": "previous_value", "description": "Previous value before the logged change in vitals survey response.", "meta": {"masking": "string"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vital_logs__previous_value"]}, "new_value": {"name": "new_value", "description": "New value after the logged change in vitals survey response.", "meta": {"masking": "string"}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {"masking": "string"}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vital_logs__new_value"]}, "reason_for_change": {"name": "reason_for_change", "description": "Reason for the logged change in the vitals survey response.", "meta": {}, "data_type": "text", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vital_logs__reason_for_change"]}, "recorded_by_id": {"name": "recorded_by_id", "description": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who made this change.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vital_logs__recorded_by_id"]}, "answer_id": {"name": "answer_id", "description": "The [survey answer](#!/source/source.tamanu.tamanu.survey_response_answers) being changed.", "meta": {}, "data_type": "character varying(255)", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.vital_logs__answer_id"]}, "updated_at_sync_tick": {"name": "updated_at_sync_tick", "description": "Last tick that the record was updated. Used to figure out old vs new data when syncing in vital_logs.", "meta": {}, "data_type": "bigint", "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tamanu.generic__updated_at_sync_tick"]}}, "meta": {"triggers": ["notify_vital_logs_changed", "record_vital_logs_changelog", "set_vital_logs_updated_at", "set_vital_logs_updated_at_sync_tick"]}, "source_meta": {}, "tags": ["clinical"], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": null, "period": null}, "error_after": {"count": null, "period": null}, "filter": null}, "loaded_at_field": null, "loaded_at_query": null, "meta": {"triggers": ["notify_vital_logs_changed", "record_vital_logs_changelog", "set_vital_logs_updated_at", "set_vital_logs_updated_at_sync_tick"]}, "tags": ["clinical"]}, "patch_path": null, "unrendered_config": {"enabled": true, "tags": ["clinical"], "meta": {"triggers": ["notify_vital_logs_changed", "record_vital_logs_changelog", "set_vital_logs_updated_at", "set_vital_logs_updated_at_sync_tick"]}, "loaded_at_field": null, "loaded_at_query": null}, "relation_name": "\"central\".\"public\".\"vital_logs\"", "created_at": 1775621423.880886, "unrendered_database": null, "unrendered_schema": "public", "doc_blocks": ["doc.tamanu.table__vital_logs"]}}, "macros": {"macro.dbt_postgres.postgres__get_catalog_relations": {"name": "postgres__get_catalog_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog_relations", "macro_sql": "{% macro postgres__get_catalog_relations(information_schema, relations) -%}\n  {%- call statement('catalog', fetch_result=True) -%}\n\n    {#\n      If the user has multiple databases set and the first one is wrong, this will fail.\n      But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n    #}\n    {% set database = information_schema.database %}\n    {{ adapter.verify_database(database) }}\n\n    select\n        '{{ database }}' as table_database,\n        sch.nspname as table_schema,\n        tbl.relname as table_name,\n        case tbl.relkind\n            when 'v' then 'VIEW'\n            when 'm' then 'MATERIALIZED VIEW'\n            else 'BASE TABLE'\n        end as table_type,\n        tbl_desc.description as table_comment,\n        col.attname as column_name,\n        col.attnum as column_index,\n        pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n        col_desc.description as column_comment,\n        pg_get_userbyid(tbl.relowner) as table_owner\n\n    from pg_catalog.pg_namespace sch\n    join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n    join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n    left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n    left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n    where (\n      {%- for relation in relations -%}\n        {%- if relation.identifier -%}\n          (upper(sch.nspname) = upper('{{ relation.schema }}') and\n           upper(tbl.relname) = upper('{{ relation.identifier }}'))\n        {%- else-%}\n          upper(sch.nspname) = upper('{{ relation.schema }}')\n        {%- endif -%}\n        {%- if not loop.last %} or {% endif -%}\n      {%- endfor -%}\n    )\n      and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n      and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n      and tbl.relkind in ('r', 'v', 'f', 'p', 'm') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table, [m]aterialized view. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table\n      and col.attnum > 0 -- negative numbers are used for system columns such as oid\n      and not col.attisdropped -- column as not been dropped\n\n    order by\n        sch.nspname,\n        tbl.relname,\n        col.attnum\n\n  {%- endcall -%}\n\n  {{ return(load_result('catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.666824, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n  {%- set relations = [] -%}\n  {%- for schema in schemas -%}\n    {%- set dummy = relations.append({'schema': schema}) -%}\n  {%- endfor -%}\n  {{ return(postgres__get_catalog_relations(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.667349, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n  {%- set unlogged = config.get('unlogged', default=false) -%}\n  {%- set sql_header = config.get('sql_header', none) -%}\n\n  {{ sql_header if sql_header is not none }}\n\n  create {% if temporary -%}\n    temporary\n  {%- elif unlogged -%}\n    unlogged\n  {%- endif %} table {{ relation }}\n  {% set contract_config = config.get('contract') %}\n  {% if contract_config.enforced %}\n    {{ get_assert_columns_equivalent(sql) }}\n  {% endif -%}\n  {% if contract_config.enforced and (not temporary) -%}\n      {{ get_table_columns_and_constraints() }} ;\n    insert into {{ relation }} (\n      {{ adapter.dispatch('get_column_names', 'dbt')() }}\n    )\n    {%- set sql = get_select_subquery(sql) %}\n  {% else %}\n    as\n  {% endif %}\n  (\n    {{ sql }}\n  );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.670275, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n  {%- set index_config = adapter.parse_index(index_dict) -%}\n  {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n  {%- set index_name = index_config.render(relation) -%}\n\n  create {% if index_config.unique -%}\n    unique\n  {%- endif %} index if not exists\n  \"{{ index_name }}\"\n  on {{ relation }} {% if index_config.type -%}\n    using {{ index_config.type }}\n  {%- endif %}\n  ({{ comma_separated_columns }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6709373, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n  {% if relation.database -%}\n    {{ adapter.verify_database(relation.database) }}\n  {%- endif -%}\n  {%- call statement('create_schema') -%}\n    create schema if not exists {{ relation.without_identifier().include(database=False) }}\n  {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6713395, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n  {% if relation.database -%}\n    {{ adapter.verify_database(relation.database) }}\n  {%- endif -%}\n  {%- call statement('drop_schema') -%}\n    drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n  {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.671747, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n  {% call statement('get_columns_in_relation', fetch_result=True) %}\n      select\n          column_name,\n          data_type,\n          character_maximum_length,\n          numeric_precision,\n          numeric_scale\n\n      from {{ relation.information_schema('columns') }}\n      where table_name = '{{ relation.identifier }}'\n        {% if relation.schema %}\n        and table_schema = '{{ relation.schema }}'\n        {% endif %}\n      order by ordinal_position\n\n  {% endcall %}\n  {% set table = load_result('get_columns_in_relation').table %}\n  {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6723242, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n  {% call statement('list_relations_without_caching', fetch_result=True) -%}\n    select\n      '{{ schema_relation.database }}' as database,\n      tablename as name,\n      schemaname as schema,\n      'table' as type\n    from pg_tables\n    where schemaname ilike '{{ schema_relation.schema }}'\n    union all\n    select\n      '{{ schema_relation.database }}' as database,\n      viewname as name,\n      schemaname as schema,\n      'view' as type\n    from pg_views\n    where schemaname ilike '{{ schema_relation.schema }}'\n    union all\n    select\n      '{{ schema_relation.database }}' as database,\n      matviewname as name,\n      schemaname as schema,\n      'materialized_view' as type\n    from pg_matviews\n    where schemaname ilike '{{ schema_relation.schema }}'\n  {% endcall %}\n  {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6728792, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n  {% if database_name -%}\n    {{ adapter.verify_database(database_name) }}\n  {%- endif -%}\n  information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6731033, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n  {% if database -%}\n    {{ adapter.verify_database(database) }}\n  {%- endif -%}\n  {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n    select distinct nspname from pg_namespace\n  {% endcall %}\n  {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6735165, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n  {% if information_schema.database -%}\n    {{ adapter.verify_database(information_schema.database) }}\n  {%- endif -%}\n  {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n    select count(*) from pg_namespace where nspname = '{{ schema }}'\n  {% endcall %}\n  {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.674011, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n    {% if dstring %}\n      {% set dt = modules.datetime.datetime.now() %}\n      {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n      {% set suffix = suffix ~ dtstring %}\n    {% endif %}\n    {% set suffix_length = suffix|length %}\n    {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n    {% if suffix_length > relation_max_name_length %}\n        {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n    {% endif %}\n    {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n    {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n  {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.675181, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n    {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6754367, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n    {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n    {{ return(temp_relation.incorporate(path={\"schema\": none,\n                                              \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6758394, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n    {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n    {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6761725, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n  {% if comment is not string %}\n    {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n  {% endif %}\n  {%- set magic = '$dbt_comment_literal_block$' -%}\n  {%- if magic in comment -%}\n    {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n  {%- endif -%}\n  {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6767206, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n  {% set escaped_comment = postgres_escape_comment(comment) %}\n  {% if relation.type == 'materialized_view' -%}\n    {% set relation_type = \"materialized view\" %}\n  {%- else -%}\n    {%- set relation_type = relation.type -%}\n  {%- endif -%}\n  comment on {{ relation_type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6771927, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n  {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n  {% for column_name in column_dict if (column_name in existing_columns) %}\n    {% set comment = column_dict[column_name]['description'] %}\n    {% set escaped_comment = postgres_escape_comment(comment) %}\n    comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n  {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6779363, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n  select grantee, privilege_type\n  from {{ relation.information_schema('role_table_grants') }}\n      where grantor = current_role\n        and grantee != current_role\n        and table_schema = '{{ relation.schema }}'\n        and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6781952, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n    {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.678341, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_indexes_sql": {"name": "postgres__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_indexes_sql", "macro_sql": "{% macro postgres__get_show_indexes_sql(relation) %}\n    select\n        i.relname                                   as name,\n        m.amname                                    as method,\n        ix.indisunique                              as \"unique\",\n        array_to_string(array_agg(a.attname), ',')  as column_names\n    from pg_index ix\n    join pg_class i\n        on i.oid = ix.indexrelid\n    join pg_am m\n        on m.oid=i.relam\n    join pg_class t\n        on t.oid = ix.indrelid\n    join pg_namespace n\n        on n.oid = t.relnamespace\n    join pg_attribute a\n        on a.attrelid = t.oid\n        and a.attnum = ANY(ix.indkey)\n    where t.relname = '{{ relation.identifier }}'\n      and n.nspname = '{{ relation.schema }}'\n      and t.relkind in ('r', 'm')\n    group by 1, 2, 3\n    order by 1, 2, 3\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.678585, "supported_languages": null}, "macro.dbt_postgres.postgres__get_drop_index_sql": {"name": "postgres__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_drop_index_sql", "macro_sql": "\n\n\n{%- macro postgres__get_drop_index_sql(relation, index_name) -%}\n    drop index if exists \"{{ relation.schema }}\".\"{{ index_name }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6787717, "supported_languages": null}, "macro.dbt_postgres.postgres__get_relations": {"name": "postgres__get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres__get_relations", "macro_sql": "{% macro postgres__get_relations() -%}\n\n  {#\n      -- in pg_depend, objid is the dependent, refobjid is the referenced object\n      --  > a pg_depend entry indicates that the referenced object cannot be\n      --  > dropped without also dropping the dependent object.\n  #}\n\n  {%- call statement('relations', fetch_result=True) -%}\n    select distinct\n        dependent_namespace.nspname as dependent_schema,\n        dependent_class.relname as dependent_name,\n        referenced_namespace.nspname as referenced_schema,\n        referenced_class.relname as referenced_name\n\n    -- Query for views: views are entries in pg_class with an entry in pg_rewrite, but we avoid\n    -- a seq scan on pg_rewrite by leveraging the fact there is an \"internal\" row in pg_depend for\n    -- the view...\n    from pg_class as dependent_class\n    join pg_namespace as dependent_namespace on dependent_namespace.oid = dependent_class.relnamespace\n    join pg_depend as dependent_depend on dependent_depend.refobjid = dependent_class.oid\n        and dependent_depend.classid = 'pg_rewrite'::regclass\n        and dependent_depend.refclassid = 'pg_class'::regclass\n        and dependent_depend.deptype = 'i'\n\n    -- ... and via pg_depend (that has a row per column, hence the need for \"distinct\" above, and\n    -- making sure to exclude the internal row to avoid a view appearing to depend on itself)...\n    join pg_depend as joining_depend on joining_depend.objid = dependent_depend.objid\n        and joining_depend.classid = 'pg_rewrite'::regclass\n        and joining_depend.refclassid = 'pg_class'::regclass\n        and joining_depend.refobjid != dependent_depend.refobjid\n\n    -- ... we can find the tables they query from in pg_class, but excluding system tables. Note we\n    -- don't need need to exclude _dependent_ system tables, because they only query from other\n    -- system tables, and so are automatically excluded by excluding _referenced_ system tables\n    join pg_class as referenced_class on referenced_class.oid = joining_depend.refobjid\n    join pg_namespace as referenced_namespace on referenced_namespace.oid = referenced_class.relnamespace\n        and referenced_namespace.nspname != 'information_schema'\n        and referenced_namespace.nspname not like 'pg\\_%'\n\n    order by\n        dependent_schema, dependent_name, referenced_schema, referenced_name;\n\n  {%- endcall -%}\n\n  {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6795113, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations() %}\n  {{ return(postgres__get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6797, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n    now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6799786, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n    {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n    {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6802108, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n  {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6803503, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n    current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.680486, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n    (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6806328, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_view_sql": {"name": "postgres__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_view_sql", "macro_sql": "{% macro postgres__get_replace_view_sql(relation, sql) -%}\n\n    {%- set sql_header = config.get('sql_header', none) -%}\n    {{ sql_header if sql_header is not none }}\n\n    create or replace view {{ relation }}\n        {% set contract_config = config.get('contract') %}\n        {% if contract_config.enforced %}\n            {{ get_assert_columns_equivalent(sql) }}\n        {%- endif %}\n    as (\n        {{ sql }}\n    );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6813145, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_view": {"name": "postgres__drop_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_view", "macro_sql": "{% macro postgres__drop_view(relation) -%}\n    drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.681507, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_view_sql": {"name": "postgres__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_view_sql", "macro_sql": "{% macro postgres__get_rename_view_sql(relation, new_name) %}\n    alter view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6817484, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": {"name": "postgres__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n    create materialized view if not exists {{ relation }} as {{ sql }};\n\n    {% for _index_dict in config.get('indexes', []) -%}\n        {{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else \"\" }}\n    {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6822968, "supported_languages": null}, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": {"name": "postgres__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_alter_materialized_view_as_sql(\n    relation,\n    configuration_changes,\n    sql,\n    existing_relation,\n    backup_relation,\n    intermediate_relation\n) %}\n\n    -- apply a full refresh immediately if needed\n    {% if configuration_changes.requires_full_refresh %}\n\n        {{ get_replace_sql(existing_relation, relation, sql) }}\n\n    -- otherwise apply individual changes as needed\n    {% else %}\n\n        {{ postgres__update_indexes_on_materialized_view(relation, configuration_changes.indexes) }}\n\n    {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6830182, "supported_languages": null}, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": {"name": "postgres__update_indexes_on_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__update_indexes_on_materialized_view", "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n    {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n    {%- for _index_change in index_changes -%}\n        {%- set _index = _index_change.context -%}\n\n        {%- if _index_change.action == \"drop\" -%}\n\n            {{ postgres__get_drop_index_sql(relation, _index.name) }}\n\n        {%- elif _index_change.action == \"create\" -%}\n\n            {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n        {%- endif -%}\n\t{{ ';' if not loop.last else \"\" }}\n\n    {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql", "macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6837146, "supported_languages": null}, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": {"name": "postgres__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes", "macro_sql": "{% macro postgres__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n    {% set _existing_materialized_view = postgres__describe_materialized_view(existing_relation) %}\n    {% set _configuration_changes = existing_relation.get_materialized_view_config_change_collection(_existing_materialized_view, new_config.model) %}\n    {% do return(_configuration_changes) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__describe_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6840858, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/describe.sql", "original_file_path": "macros/relations/materialized_view/describe.sql", "unique_id": "macro.dbt_postgres.postgres__describe_materialized_view", "macro_sql": "{% macro postgres__describe_materialized_view(relation) %}\n    -- for now just get the indexes, we don't need the name or the query yet\n    {% set _indexes = run_query(get_show_indexes_sql(relation)) %}\n    {% do return({'indexes': _indexes}) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6844661, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_materialized_view": {"name": "postgres__drop_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_materialized_view", "macro_sql": "{% macro postgres__drop_materialized_view(relation) -%}\n    drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.684673, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": {"name": "postgres__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_materialized_view_sql", "macro_sql": "{% macro postgres__get_rename_materialized_view_sql(relation, new_name) %}\n    alter materialized view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6848955, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt_postgres.postgres__refresh_materialized_view", "macro_sql": "{% macro postgres__refresh_materialized_view(relation) %}\n    refresh materialized view {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.685066, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_table_sql": {"name": "postgres__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_table_sql", "macro_sql": "{% macro postgres__get_replace_table_sql(relation, sql) -%}\n\n    {%- set sql_header = config.get('sql_header', none) -%}\n    {{ sql_header if sql_header is not none }}\n\n    create or replace table {{ relation }}\n        {% set contract_config = config.get('contract') %}\n        {% if contract_config.enforced %}\n            {{ get_assert_columns_equivalent(sql) }}\n            {{ get_table_columns_and_constraints() }}\n            {%- set sql = get_select_subquery(sql) %}\n        {% endif %}\n    as (\n        {{ sql }}\n    );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6860044, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_table": {"name": "postgres__drop_table", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_table", "macro_sql": "{% macro postgres__drop_table(relation) -%}\n    drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6862054, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_table_sql": {"name": "postgres__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_table_sql", "macro_sql": "{% macro postgres__get_rename_table_sql(relation, new_name) %}\n    alter table {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6864183, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n    {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n    {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n    update {{ target }}\n    set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n    from {{ source }} as DBT_INTERNAL_SOURCE\n    where DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }}::text = {{ target }}.{{ columns.dbt_scd_id }}::text\n      and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n      {% if config.get(\"dbt_valid_to_current\") %}\n        and ({{ target }}.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }} or {{ target }}.{{ columns.dbt_valid_to }} is null);\n      {% else %}\n        and {{ target }}.{{ columns.dbt_valid_to }} is null;\n      {% endif %}\n\n\n    insert into {{ target }} ({{ insert_cols_csv }})\n    select {% for column in insert_cols -%}\n        DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n    {%- endfor %}\n    from {{ source }} as DBT_INTERNAL_SOURCE\n    where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6878293, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n  {% if arg_dict[\"unique_key\"] %}\n    {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n  {% else %}\n    {% do return(get_incremental_append_sql(arg_dict)) %}\n  {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6883945, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_microbatch_sql": {"name": "postgres__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_microbatch_sql", "macro_sql": "{% macro postgres__get_incremental_microbatch_sql(arg_dict) %}\n\n  {% if arg_dict[\"unique_key\"] %}\n    {% do return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) %}\n  {% else %}\n    {{ exceptions.raise_compiler_error(\"dbt-postgres 'microbatch' requires a `unique_key` config\") }}\n  {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_merge_sql", "macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6888149, "supported_languages": null}, "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql": {"name": "postgres__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql", "macro_sql": "{% macro postgres__formatted_scalar_function_args_sql() %}\n    {% set args = [] %}\n    {% for arg in model.arguments -%}\n        {% set default_value = arg.get('default_value', none) %}\n        {% if default_value != none %}\n            {%- do args.append(arg.name ~ ' ' ~ arg.data_type ~ ' DEFAULT ' ~ default_value) -%}\n        {% else %}\n            {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n        {% endif %}\n    {%- endfor %}\n    {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6897087, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n    {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6900406, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n    min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6902337, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n  {% if part_number >= 0 %}\n    {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n  {% else %}\n    {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n  {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6907501, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n    {%- if datepart == 'quarter' -%}\n    -- postgres dateadd does not support quarter interval.\n    cast(\n        {{dbt.dateadd('day', '-1',\n        dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n        )}}\n        as date)\n    {%- else -%}\n    {{dbt.default_last_day(date, datepart)}}\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.691348, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n    {% if limit_num -%}\n    array_to_string(\n        (array_agg(\n            {{ measure }}\n            {% if order_by_clause -%}\n            {{ order_by_clause }}\n            {%- endif %}\n        ))[1:{{ limit_num }}],\n        {{ delimiter_text }}\n        )\n    {%- else %}\n    string_agg(\n        {{ measure }},\n        {{ delimiter_text }}\n        {% if order_by_clause -%}\n        {{ order_by_clause }}\n        {%- endif %}\n        )\n    {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6920173, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n    {% if datepart == 'year' %}\n        (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n    {% elif datepart == 'quarter' %}\n        ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n    {% elif datepart == 'month' %}\n        ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n    {% elif datepart == 'day' %}\n        (({{second_date}})::date - ({{first_date}})::date)\n    {% elif datepart == 'week' %}\n        ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n            when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n                case when {{first_date}} <= {{second_date}} then 0 else -1 end\n            else\n                case when {{first_date}} <= {{second_date}} then 1 else 0 end\n        end)\n    {% elif datepart == 'hour' %}\n        ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n    {% elif datepart == 'minute' %}\n        ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n    {% elif datepart == 'second' %}\n        ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n    {% elif datepart == 'millisecond' %}\n        ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n    {% elif datepart == 'microsecond' %}\n        ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n    {% else %}\n        {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n    {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.694449, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n    {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.694965, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n    {%- if custom_alias_name -%}\n\n        {{ custom_alias_name | trim }}\n\n    {%- elif node.version -%}\n\n        {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n    {%- else -%}\n\n        {{ node.name }}\n\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6954358, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n    {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6960113, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n    {%- set default_schema = target.schema -%}\n    {%- if custom_schema_name is none -%}\n\n        {{ default_schema }}\n\n    {%- else -%}\n\n        {{ default_schema }}_{{ custom_schema_name | trim }}\n\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6963437, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n    {%- set default_schema = target.schema -%}\n    {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n        {{ custom_schema_name | trim }}\n\n    {%- else -%}\n\n        {{ default_schema }}\n\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6967192, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n    {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6971617, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n    {%- set default_database = target.database -%}\n    {%- if custom_database_name is none -%}\n\n        {{ default_database }}\n\n    {%- else -%}\n\n        {{ custom_database_name }}\n\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6974804, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n  {%- if execute: -%}\n    {%- set compiled_code = caller() -%}\n\n    {%- if name == 'main' -%}\n      {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n      {{ write(compiled_code) }}\n    {%- endif -%}\n    {%- if language == 'sql'-%}\n      {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n    {%- elif language == 'python' -%}\n      {%- set res = submit_python_job(model, compiled_code) -%}\n      {#-- TODO: What should table be for python models? --#}\n      {%- set table = None -%}\n    {%- else -%}\n      {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n    {%- endif -%}\n\n    {%- if name is not none -%}\n      {{ store_result(name, response=res, agate_table=table) }}\n    {%- endif -%}\n\n  {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6991057, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n  {%- set sql = caller() -%}\n\n  {%- if name == 'main' -%}\n    {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n    {{ write(sql) }}\n  {%- endif -%}\n\n  {%- if name is not none -%}\n    {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n  {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.6999686, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n  {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n    {{ sql }}\n  {% endcall %}\n\n  {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7003272, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n  {% set error_msg -%}\n      The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n  {%- endset %}\n\n  {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n  {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7012713, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n    {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n    {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n    {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n    {% set day_count = (end_date - start_date).days %}\n    {% if day_count < 0 %}\n        {% set msg -%}\n            Partition start date is after the end date ({{ start_date }}, {{ end_date }})\n        {%- endset %}\n\n        {{ exceptions.raise_compiler_error(msg, model) }}\n    {% endif %}\n\n    {% set date_list = [] %}\n    {% for i in range(0, day_count + 1) %}\n        {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n        {% if not out_fmt %}\n            {% set _ = date_list.append(the_date) %}\n        {% else %}\n            {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n        {% endif %}\n    {% endfor %}\n\n    {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7027295, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n    {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n    {% if (partition_range | length) == 1 %}\n      {% set start_date = partition_range[0] %}\n      {% set end_date = none %}\n    {% elif (partition_range | length) == 2 %}\n      {% set start_date = partition_range[0] %}\n      {% set end_date = partition_range[1] %}\n    {% else %}\n      {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n    {% endif %}\n\n    {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7036543, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n    {% set dt = modules.datetime.datetime.now() %}\n    {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7039492, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7043288, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n    select\n        {{ column_name }} as value_field,\n        count(*) as n_records\n\n    from {{ model }}\n    group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n    {% for value in values -%}\n        {% if quote -%}\n        '{{ value }}'\n        {%- else -%}\n        {{ value }}\n        {%- endif -%}\n        {%- if not loop.last -%},{%- endif %}\n    {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7049818, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n    {{ column_name }} as unique_field,\n    count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7052734, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n    select {{ column_name }} as from_field\n    from {{ model }}\n    where {{ column_name }} is not null\n),\n\nparent as (\n    select {{ field }} as to_field\n    from {{ to }}\n)\n\nselect\n    from_field\n\nfrom child\nleft join parent\n    on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7056375, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n    {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7066672, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n    {{  input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7068777, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n    {%- set ref_dict = {} -%}\n    {%- for _ref in model.refs -%}\n        {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n        {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n\n        {#\n            We want to get the string of the returned relation by calling .render() in order to skip sample/empty\n            mode rendering logic. However, people override the default ref macro, and often return a string instead\n            of a relation (like the ref macro does by default). Thus, to make sure we dont blow things up, we have\n            to ensure the resolved relation has a .render() method.\n        #}\n        {%- if resolved.render is defined and resolved.render is callable -%}\n            {%- set resolved = resolved.render() -%}\n        {%- endif -%}\n\n        {%- if _ref.get('version') -%}\n            {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n        {%- endif -%}\n       {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n    {%- endfor -%}\n\ndef ref(*args, **kwargs):\n    refs = {{ ref_dict | tojson }}\n    key = '.'.join(args)\n    version = kwargs.get(\"v\") or kwargs.get(\"version\")\n    if version:\n        key += f\".v{version}\"\n    dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n    return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7081094, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n    {%- set source_dict = {} -%}\n    {%- for _source in model.sources -%}\n        {%- set resolved = source(*_source) -%}\n        {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n    {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n    sources = {{ source_dict | tojson }}\n    key = '.'.join(args)\n    return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.708643, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n    {%- set config_dict = {} -%}\n    {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n    {%- for key, default in config_dbt_used -%}\n        {# weird type testing with enum, would be much easier to write this logic in Python! #}\n        {%- if key == \"language\" -%}\n          {%- set value = \"python\" -%}\n        {%- endif -%}\n        {%- set value = model.config.get(key, default) -%}\n        {%- do config_dict.update({key: value}) -%}\n    {%- endfor -%}\n    {# Handle dbt.config.meta_get() calls - use separate dict to avoid overwriting native configs #}\n    {%- set meta_dict = {} -%}\n    {%- if model.config.meta_keys_used -%}\n        {% set meta_dbt_used = zip(model.config.meta_keys_used, model.config.meta_keys_defaults) | list %}\n        {%- for key, default in meta_dbt_used -%}\n            {%- if model.config.meta and key in model.config.meta -%}\n                {%- set value = model.config.meta[key] -%}\n            {%- else -%}\n                {%- set value = default -%}\n            {%- endif -%}\n            {%- do meta_dict.update({key: value}) -%}\n        {%- endfor -%}\n    {%- endif -%}\nconfig_dict = {{ config_dict }}\nmeta_dict = {{ meta_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7100635, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n    def __init__(self, *args, **kwargs):\n        pass\n\n    @staticmethod\n    def get(key, default=None):\n        return config_dict.get(key, default)\n\n    @staticmethod\n    def meta_get(key, default=None):\n        return meta_dict.get(key, default)\n\nclass this:\n    \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n    database = \"{{ this.database }}\"\n    schema = \"{{ this.schema }}\"\n    identifier = \"{{ this.identifier }}\"\n    {% set this_relation_name = resolve_model_name(this) %}\n    def __repr__(self):\n        return '{{ this_relation_name  }}'\n\n\nclass dbtObj:\n    def __init__(self, load_df_function) -> None:\n        self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n        self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n        self.config = config\n        self.this = this()\n        self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7106817, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7107837, "supported_languages": null}, "macro.dbt.get_fixture_sql": {"name": "get_fixture_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_fixture_sql", "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%-   set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%-   set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%-   set column_name_to_data_types = {} -%}\n{%-   set column_name_to_quoted = {} -%}\n{%-   for column in columns_in_relation -%}\n\n{#-- This needs to be a case-insensitive comparison --#}\n{%-     do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%-     do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n{%-   endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n    {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n    {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n{{ validate_fixture_rows(rows, row_number) }}\n\n{%- for row in rows -%}\n{%-   set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%-   set default_row_copy = default_row.copy() -%}\n{%-   do default_row_copy.update(formatted_row) -%}\nselect\n{%-   for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%-   endfor %}\n{%-   if not loop.last %}\nunion all\n{%    endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n    select\n    {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%},{%- endif %}\n    {%- endfor %}\n    limit 0\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.safe_cast", "macro.dbt.validate_fixture_rows", "macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.714245, "supported_languages": null}, "macro.dbt.get_expected_sql": {"name": "get_expected_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_expected_sql", "macro_sql": "{% macro get_expected_sql(rows, column_name_to_data_types, column_name_to_quoted) %}\n\n{%- if (rows | length) == 0 -%}\n    select * from dbt_internal_unit_test_actual\n    limit 0\n{%- else -%}\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\nselect\n{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n{%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.71515, "supported_languages": null}, "macro.dbt.format_row": {"name": "format_row", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.format_row", "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n    {#-- generate case-insensitive formatted row --#}\n    {% set formatted_row = {} %}\n    {%- for column_name, column_value in row.items() -%}\n        {% set column_name = column_name|lower %}\n\n        {%- if column_name not in column_name_to_data_types %}\n            {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n            {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n            {{ exceptions.raise_compiler_error(\n                \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n                \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n            ) }}\n        {%- endif -%}\n\n        {%- set column_type = column_name_to_data_types[column_name] %}\n\n        {#-- For string fixture values, strip varchar length to prevent silent truncation (GH-11974) --#}\n        {%- if column_value is string and 'varying' in column_type -%}\n            {%- set column_type = column_type.split('(')[0] -%}\n        {%- endif -%}\n\n        {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n        {%- set column_value_clean = column_value -%}\n        {%- if column_value is string -%}\n            {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n        {%- elif column_value is none -%}\n            {%- set column_value_clean = 'null' -%}\n        {%- endif -%}\n\n        {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n        {%- do formatted_row.update(row_update) -%}\n    {%- endfor -%}\n    {{ return(formatted_row) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.string_literal", "macro.dbt.escape_single_quotes", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7167609, "supported_languages": null}, "macro.dbt.validate_fixture_rows": {"name": "validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.validate_fixture_rows", "macro_sql": "{%- macro validate_fixture_rows(rows, row_number) -%}\n  {{ return(adapter.dispatch('validate_fixture_rows', 'dbt')(rows, row_number)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__validate_fixture_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7170398, "supported_languages": null}, "macro.dbt.default__validate_fixture_rows": {"name": "default__validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.default__validate_fixture_rows", "macro_sql": "{%- macro default__validate_fixture_rows(rows, row_number) -%}\n  {# This is an abstract method for adapter overrides as needed #}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7171688, "supported_languages": null}, "macro.dbt.drop_schema_named": {"name": "drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.drop_schema_named", "macro_sql": "{% macro drop_schema_named(schema_name) %}\n    {{ return(adapter.dispatch('drop_schema_named', 'dbt') (schema_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_schema_named"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7175097, "supported_languages": null}, "macro.dbt.default__drop_schema_named": {"name": "default__drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.default__drop_schema_named", "macro_sql": "{% macro default__drop_schema_named(schema_name) %}\n  {% set schema_relation = api.Relation.create(schema=schema_name) %}\n  {{ adapter.drop_schema(schema_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.717821, "supported_languages": null}, "macro.dbt.get_create_sql": {"name": "get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.get_create_sql", "macro_sql": "{%- macro get_create_sql(relation, sql) -%}\n    {{- log('Applying CREATE to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_create_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.718302, "supported_languages": null}, "macro.dbt.default__get_create_sql": {"name": "default__get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.default__get_create_sql", "macro_sql": "{%- macro default__get_create_sql(relation, sql) -%}\n\n    {%- if relation.is_view -%}\n        {{ get_create_view_as_sql(relation, sql) }}\n\n    {%- elif relation.is_table -%}\n        {{ get_create_table_as_sql(False, relation, sql) }}\n\n    {%- elif relation.is_materialized_view -%}\n        {{ get_create_materialized_view_as_sql(relation, sql) }}\n\n    {%- else -%}\n        {{- exceptions.raise_compiler_error(\"`get_create_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n    {%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.get_create_view_as_sql", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7188668, "supported_languages": null}, "macro.dbt.get_replace_sql": {"name": "get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.get_replace_sql", "macro_sql": "{% macro get_replace_sql(existing_relation, target_relation, sql) %}\n    {{- log('Applying REPLACE to: ' ~ existing_relation) -}}\n    {{- adapter.dispatch('get_replace_sql', 'dbt')(existing_relation, target_relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7195642, "supported_languages": null}, "macro.dbt.default__get_replace_sql": {"name": "default__get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.default__get_replace_sql", "macro_sql": "{% macro default__get_replace_sql(existing_relation, target_relation, sql) %}\n\n    {# /* use a create or replace statement if possible */ #}\n\n    {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}\n\n    {% if is_replaceable and existing_relation.is_view %}\n        {{ get_replace_view_sql(target_relation, sql) }}\n\n    {% elif is_replaceable and existing_relation.is_table %}\n        {{ get_replace_table_sql(target_relation, sql) }}\n\n    {% elif is_replaceable and existing_relation.is_materialized_view %}\n        {{ get_replace_materialized_view_sql(target_relation, sql) }}\n\n    {# /* a create or replace statement is not possible, so try to stage and/or backup to be safe */ #}\n\n    {# /* create target_relation as an intermediate relation, then swap it out with the existing one using a backup */ #}\n    {%- elif target_relation.can_be_renamed and existing_relation.can_be_renamed -%}\n        {{ get_create_intermediate_sql(target_relation, sql) }};\n        {{ get_create_backup_sql(existing_relation) }};\n        {{ get_rename_intermediate_sql(target_relation) }};\n        {{ get_drop_backup_sql(existing_relation) }}\n\n    {# /* create target_relation as an intermediate relation, then swap it out with the existing one without using a backup */ #}\n    {%- elif target_relation.can_be_renamed -%}\n        {{ get_create_intermediate_sql(target_relation, sql) }};\n        {{ get_drop_sql(existing_relation) }};\n        {{ get_rename_intermediate_sql(target_relation) }}\n\n    {# /* create target_relation in place by first backing up the existing relation */ #}\n    {%- elif existing_relation.can_be_renamed -%}\n        {{ get_create_backup_sql(existing_relation) }};\n        {{ get_create_sql(target_relation, sql) }};\n        {{ get_drop_backup_sql(existing_relation) }}\n\n    {# /* no renaming is allowed, so just drop and create */ #}\n    {%- else -%}\n        {{ get_drop_sql(existing_relation) }};\n        {{ get_create_sql(target_relation, sql) }}\n\n    {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_view_sql", "macro.dbt.get_replace_table_sql", "macro.dbt.get_replace_materialized_view_sql", "macro.dbt.get_create_intermediate_sql", "macro.dbt.get_create_backup_sql", "macro.dbt.get_rename_intermediate_sql", "macro.dbt.get_drop_backup_sql", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.721029, "supported_languages": null}, "macro.dbt.get_create_backup_sql": {"name": "get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.get_create_backup_sql", "macro_sql": "{%- macro get_create_backup_sql(relation) -%}\n    {{- log('Applying CREATE BACKUP to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_create_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7214375, "supported_languages": null}, "macro.dbt.default__get_create_backup_sql": {"name": "default__get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.default__get_create_backup_sql", "macro_sql": "{%- macro default__get_create_backup_sql(relation) -%}\n\n    -- get the standard backup name\n    {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n    -- drop any pre-existing backup\n    {{ get_drop_sql(backup_relation) }};\n\n    {{ get_rename_sql(relation, backup_relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7218149, "supported_languages": null}, "macro.dbt.get_rename_intermediate_sql": {"name": "get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.get_rename_intermediate_sql", "macro_sql": "{%- macro get_rename_intermediate_sql(relation) -%}\n    {{- log('Applying RENAME INTERMEDIATE to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_rename_intermediate_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7222042, "supported_languages": null}, "macro.dbt.default__get_rename_intermediate_sql": {"name": "default__get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.default__get_rename_intermediate_sql", "macro_sql": "{%- macro default__get_rename_intermediate_sql(relation) -%}\n\n    -- get the standard intermediate name\n    {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n    {{ get_rename_sql(intermediate_relation, relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7224648, "supported_languages": null}, "macro.dbt.get_drop_sql": {"name": "get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.get_drop_sql", "macro_sql": "{%- macro get_drop_sql(relation) -%}\n    {{- log('Applying DROP to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_drop_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7230337, "supported_languages": null}, "macro.dbt.default__get_drop_sql": {"name": "default__get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__get_drop_sql", "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n    {%- if relation.is_view -%}\n        {{ drop_view(relation) }}\n\n    {%- elif relation.is_table -%}\n        {{ drop_table(relation) }}\n\n    {%- elif relation.is_materialized_view -%}\n        {{ drop_materialized_view(relation) }}\n\n    {%- else -%}\n        drop {{ relation.type }} if exists {{ relation.render() }} cascade\n\n    {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.drop_view", "macro.dbt.drop_table", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7235029, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n    {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7237535, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n    {% call statement('drop_relation', auto_begin=False) -%}\n        {{ get_drop_sql(relation) }}\n    {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7240129, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n  {% if relation is not none %}\n    {{ adapter.drop_relation(relation) }}\n  {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7242532, "supported_languages": null}, "macro.dbt.get_rename_sql": {"name": "get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.get_rename_sql", "macro_sql": "{%- macro get_rename_sql(relation, new_name) -%}\n    {{- log('Applying RENAME to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7248516, "supported_languages": null}, "macro.dbt.default__get_rename_sql": {"name": "default__get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__get_rename_sql", "macro_sql": "{%- macro default__get_rename_sql(relation, new_name) -%}\n\n    {%- if relation.is_view -%}\n        {{ get_rename_view_sql(relation, new_name) }}\n\n    {%- elif relation.is_table -%}\n        {{ get_rename_table_sql(relation, new_name) }}\n\n    {%- elif relation.is_materialized_view -%}\n        {{ get_rename_materialized_view_sql(relation, new_name) }}\n\n    {%- else -%}\n        {{- exceptions.raise_compiler_error(\"`get_rename_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n    {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.get_rename_view_sql", "macro.dbt.get_rename_table_sql", "macro.dbt.get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7253785, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n  {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7256422, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n  {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n  {% call statement('rename_relation') -%}\n    alter table {{ from_relation.render() }} rename to {{ target_name }}\n  {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.72601, "supported_languages": null}, "macro.dbt.get_drop_backup_sql": {"name": "get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.get_drop_backup_sql", "macro_sql": "{%- macro get_drop_backup_sql(relation) -%}\n    {{- log('Applying DROP BACKUP to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_drop_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7263887, "supported_languages": null}, "macro.dbt.default__get_drop_backup_sql": {"name": "default__get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.default__get_drop_backup_sql", "macro_sql": "{%- macro default__get_drop_backup_sql(relation) -%}\n\n    -- get the standard backup name\n    {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n    {{ get_drop_sql(backup_relation) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7266555, "supported_languages": null}, "macro.dbt.get_create_intermediate_sql": {"name": "get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.get_create_intermediate_sql", "macro_sql": "{%- macro get_create_intermediate_sql(relation, sql) -%}\n    {{- log('Applying CREATE INTERMEDIATE to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_create_intermediate_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7270725, "supported_languages": null}, "macro.dbt.default__get_create_intermediate_sql": {"name": "default__get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.default__get_create_intermediate_sql", "macro_sql": "{%- macro default__get_create_intermediate_sql(relation, sql) -%}\n\n    -- get the standard intermediate name\n    {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n    -- drop any pre-existing intermediate\n    {{ get_drop_sql(intermediate_relation) }};\n\n    {{ get_create_sql(intermediate_relation, sql) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7273858, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n  {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7283158, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n  {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.728472, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n  {# loop through user_provided_columns to create DDL with data types and constraints #}\n    {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n    {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n    (\n    {% for c in raw_column_constraints -%}\n      {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n    {% endfor %}\n    {% for c in raw_model_constraints -%}\n        {{ c }}{{ \",\" if not loop.last }}\n    {% endfor -%}\n    )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7297118, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n  {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7299392, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n  {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7301087, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n  {#-- First ensure the user has defined 'columns' in yaml specification --#}\n  {%- set user_defined_columns = model['columns'] -%}\n  {%- if not user_defined_columns -%}\n      {{ exceptions.raise_contract_error([], []) }}\n  {%- endif -%}\n\n  {#-- Obtain the column schema provided by sql file. #}\n  {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n  {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n  {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n  {#-- create dictionaries with name and formatted data type and strings for exception #}\n  {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n  {%- set yaml_columns = format_columns(schema_file_provided_columns)  -%}\n\n  {%- if sql_columns|length != yaml_columns|length -%}\n    {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n  {%- endif -%}\n\n  {%- for sql_col in sql_columns -%}\n    {%- set yaml_col = [] -%}\n    {%- for this_col in yaml_columns -%}\n      {%- if this_col['name'] == sql_col['name'] -%}\n        {%- do yaml_col.append(this_col) -%}\n        {%- break -%}\n      {%- endif -%}\n    {%- endfor -%}\n    {%- if not yaml_col -%}\n      {#-- Column with name not found in yaml #}\n      {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n    {%- endif -%}\n    {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n      {#-- Column data types don't match #}\n      {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n    {%- endif -%}\n  {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7316744, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n  {% set formatted_columns = [] %}\n  {% for column in columns %}\n    {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n    {%- do formatted_columns.append(formatted_column) -%}\n  {% endfor %}\n  {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7321537, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n  {% set data_type = column.dtype %}\n  {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n  {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7325687, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n  {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7330575, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n  {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7332587, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n  {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7334745, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n  {%- set sql_header = config.get('sql_header', none) -%}\n\n  {{ sql_header if sql_header is not none }}\n  create view {{ relation.render() }}\n    {% set contract_config = config.get('contract') %}\n    {% if contract_config.enforced %}\n      {{ get_assert_columns_equivalent(sql) }}\n    {%- endif %}\n  as (\n    {{ sql }}\n  );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7340183, "supported_languages": null}, "macro.dbt.get_replace_view_sql": {"name": "get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.get_replace_view_sql", "macro_sql": "{% macro get_replace_view_sql(relation, sql) %}\n    {{- adapter.dispatch('get_replace_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7346966, "supported_languages": null}, "macro.dbt.default__get_replace_view_sql": {"name": "default__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__get_replace_view_sql", "macro_sql": "{% macro default__get_replace_view_sql(relation, sql) %}\n    {{ exceptions.raise_compiler_error(\n        \"`get_replace_view_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.734885, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n  {%- set identifier = model['alias'] -%}\n\n  {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n  {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n  {%- set target_relation = api.Relation.create(\n      identifier=identifier, schema=schema, database=database,\n      type='view') -%}\n  {% set grant_config = config.get('grants') %}\n\n  {{ run_hooks(pre_hooks) }}\n\n  -- If there's a table with the same name and we weren't told to full refresh,\n  -- that's an error. If we were told to full refresh, drop it. This behavior differs\n  -- for Snowflake and BigQuery, so multiple dispatch is used.\n  {%- if old_relation is not none and old_relation.is_table -%}\n    {{ handle_existing_table(should_full_refresh(), old_relation) }}\n  {%- endif -%}\n\n  -- build model\n  {% call statement('main') -%}\n    {{ get_create_view_as_sql(target_relation, sql) }}\n  {%- endcall %}\n\n  {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n  {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n  {{ run_hooks(post_hooks) }}\n\n  {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7362423, "supported_languages": null}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n    {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7364926, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n    {{ log(\"Dropping relation \" ~ old_relation.render() ~ \" because it is of type \" ~ old_relation.type) }}\n    {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.736798, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n    {{- adapter.dispatch('drop_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7371123, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n    drop view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7372668, "supported_languages": null}, "macro.dbt.get_rename_view_sql": {"name": "get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.get_rename_view_sql", "macro_sql": "{% macro get_rename_view_sql(relation, new_name) %}\n    {{- adapter.dispatch('get_rename_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.737598, "supported_languages": null}, "macro.dbt.default__get_rename_view_sql": {"name": "default__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.default__get_rename_view_sql", "macro_sql": "{% macro default__get_rename_view_sql(relation, new_name) %}\n    {{ exceptions.raise_compiler_error(\n        \"`get_rename_view_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7377822, "supported_languages": null}, "macro.dbt.get_create_materialized_view_as_sql": {"name": "get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n    {{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7381036, "supported_languages": null}, "macro.dbt.default__get_create_materialized_view_as_sql": {"name": "default__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.default__get_create_materialized_view_as_sql", "macro_sql": "{% macro default__get_create_materialized_view_as_sql(relation, sql) -%}\n    {{ exceptions.raise_compiler_error(\n        \"`get_create_materialized_view_as_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7382832, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_sql": {"name": "get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.get_replace_materialized_view_sql", "macro_sql": "{% macro get_replace_materialized_view_sql(relation, sql) %}\n    {{- adapter.dispatch('get_replace_materialized_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.738611, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_sql": {"name": "default__get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_sql", "macro_sql": "{% macro default__get_replace_materialized_view_sql(relation, sql) %}\n    {{ exceptions.raise_compiler_error(\n        \"`get_replace_materialized_view_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7388039, "supported_languages": null}, "macro.dbt.get_alter_materialized_view_as_sql": {"name": "get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_alter_materialized_view_as_sql", "macro_sql": "{% macro get_alter_materialized_view_as_sql(\n    relation,\n    configuration_changes,\n    sql,\n    existing_relation,\n    backup_relation,\n    intermediate_relation\n) %}\n    {{- log('Applying ALTER to: ' ~ relation) -}}\n    {{- adapter.dispatch('get_alter_materialized_view_as_sql', 'dbt')(\n        relation,\n        configuration_changes,\n        sql,\n        existing_relation,\n        backup_relation,\n        intermediate_relation\n    ) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.73946, "supported_languages": null}, "macro.dbt.default__get_alter_materialized_view_as_sql": {"name": "default__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_alter_materialized_view_as_sql", "macro_sql": "{% macro default__get_alter_materialized_view_as_sql(\n    relation,\n    configuration_changes,\n    sql,\n    existing_relation,\n    backup_relation,\n    intermediate_relation\n) %}\n    {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7397194, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_materialized_view_configuration_changes", "macro_sql": "{% macro get_materialized_view_configuration_changes(existing_relation, new_config) %}\n    /* {#\n    It's recommended that configuration changes be formatted as follows:\n    {\"<change_category>\": [{\"action\": \"<name>\", \"context\": ...}]}\n\n    For example:\n    {\n        \"indexes\": [\n            {\"action\": \"drop\", \"context\": \"index_abc\"},\n            {\"action\": \"create\", \"context\": {\"columns\": [\"column_1\", \"column_2\"], \"type\": \"hash\", \"unique\": True}},\n        ],\n    }\n\n    Either way, `get_materialized_view_configuration_changes` needs to align with `get_alter_materialized_view_as_sql`.\n    #} */\n    {{- log('Determining configuration changes on: ' ~ existing_relation) -}}\n    {%- do return(adapter.dispatch('get_materialized_view_configuration_changes', 'dbt')(existing_relation, new_config)) -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7400696, "supported_languages": null}, "macro.dbt.default__get_materialized_view_configuration_changes": {"name": "default__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_materialized_view_configuration_changes", "macro_sql": "{% macro default__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n    {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7402463, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n    {{- adapter.dispatch('drop_materialized_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.74055, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n    drop materialized view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7408597, "supported_languages": null}, "macro.dbt.get_rename_materialized_view_sql": {"name": "get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.get_rename_materialized_view_sql", "macro_sql": "{% macro get_rename_materialized_view_sql(relation, new_name) %}\n    {{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7411914, "supported_languages": null}, "macro.dbt.default__get_rename_materialized_view_sql": {"name": "default__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.default__get_rename_materialized_view_sql", "macro_sql": "{% macro default__get_rename_materialized_view_sql(relation, new_name) %}\n    {{ exceptions.raise_compiler_error(\n        \"`get_rename_materialized_view_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7413716, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.refresh_materialized_view", "macro_sql": "{% macro refresh_materialized_view(relation) %}\n    {{- log('Applying REFRESH to: ' ~ relation) -}}\n    {{- adapter.dispatch('refresh_materialized_view', 'dbt')(relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7417512, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\n    {{ exceptions.raise_compiler_error(\"`refresh_materialized_view` has not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7419178, "supported_languages": null}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n  {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7427046, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n  {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.742933, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n  {# backward compatibility for create_table_as that does not support language #}\n  {% if language == \"sql\" %}\n    {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n  {% else %}\n    {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n  {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7434592, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n  {%- set sql_header = config.get('sql_header', none) -%}\n\n  {{ sql_header if sql_header is not none }}\n\n  create {% if temporary: -%}temporary{%- endif %} table\n    {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n  {% set contract_config = config.get('contract') %}\n  {% if contract_config.enforced and (not temporary) %}\n    {{ get_assert_columns_equivalent(sql) }}\n    {{ get_table_columns_and_constraints() }}\n    {%- set sql = get_select_subquery(sql) %}\n  {% endif %}\n  as (\n    {{ sql }}\n  );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7443087, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n  {#- loop through user_provided_columns to get column names -#}\n    {%- set user_provided_columns = model['columns'] -%}\n    {%- for i in user_provided_columns %}\n      {%- set col = user_provided_columns[i] -%}\n      {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n      {{ col_name }}{{ \", \" if not loop.last }}\n    {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7448971, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n  {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7451265, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n    select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n    from (\n        {{ sql }}\n    ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7453465, "supported_languages": null}, "macro.dbt.get_replace_table_sql": {"name": "get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.get_replace_table_sql", "macro_sql": "{% macro get_replace_table_sql(relation, sql) %}\n    {{- adapter.dispatch('get_replace_table_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7456977, "supported_languages": null}, "macro.dbt.default__get_replace_table_sql": {"name": "default__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.default__get_replace_table_sql", "macro_sql": "{% macro default__get_replace_table_sql(relation, sql) %}\n    {{ exceptions.raise_compiler_error(\n        \"`get_replace_table_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7458832, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n    {{- adapter.dispatch('drop_table', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.746187, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n    drop table if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7463381, "supported_languages": null}, "macro.dbt.get_rename_table_sql": {"name": "get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.get_rename_table_sql", "macro_sql": "{% macro get_rename_table_sql(relation, new_name) %}\n    {{- adapter.dispatch('get_rename_table_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.746667, "supported_languages": null}, "macro.dbt.default__get_rename_table_sql": {"name": "default__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.default__get_rename_table_sql", "macro_sql": "{% macro default__get_rename_table_sql(relation, new_name) %}\n    {{ exceptions.raise_compiler_error(\n        \"`get_rename_table_sql` has not been implemented for this adapter.\"\n    ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.746854, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n  {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction)  %}\n    {% if not inside_transaction and loop.first %}\n      {% call statement(auto_begin=inside_transaction) %}\n        commit;\n      {% endcall %}\n    {% endif %}\n    {% set rendered = render(hook.get('sql')) | trim %}\n    {% if (rendered | length) > 0 %}\n      {% call statement(auto_begin=inside_transaction) %}\n        {{ rendered }}\n      {% endcall %}\n    {% endif %}\n  {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.74793, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n    {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7481744, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n    {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7483497, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n    {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7485175, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n    {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.748702, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n  {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7490716, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n  {% set config_full_refresh = config.get('full_refresh') %}\n  {% if config_full_refresh is none %}\n    {% set config_full_refresh = flags.FULL_REFRESH %}\n  {% endif %}\n  {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7494454, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n  {% set config_store_failures = config.get('store_failures') %}\n  {% if config_store_failures is none %}\n    {% set config_store_failures = flags.STORE_FAILURES %}\n  {% endif %}\n  {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7499833, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n\n  {%- set target_table = model.get('alias', model.get('name')) -%}\n\n  {%- set strategy_name = config.get('strategy') -%}\n  {%- set unique_key = config.get('unique_key') %}\n  -- grab current tables grants config for comparision later on\n  {%- set grant_config = config.get('grants') -%}\n\n  {% set target_relation_exists, target_relation = get_or_create_relation(\n          database=model.database,\n          schema=model.schema,\n          identifier=target_table,\n          type='table') -%}\n\n  {%- if not target_relation.is_table -%}\n    {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n  {%- endif -%}\n\n\n  {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n  {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n  {% set strategy_macro = strategy_dispatch(strategy_name) %}\n  {# The model['config'] parameter below is no longer used, but passing anyway for compatibility #}\n  {# It was a dictionary of config, instead of the config object from the context #}\n  {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", model['config'], target_relation_exists) %}\n\n  {% if not target_relation_exists %}\n\n      {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n      {% set build_or_select_sql = build_sql %}\n      {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n  {% else %}\n\n      {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n      {{ adapter.assert_valid_snapshot_target_given_strategy(target_relation, columns, strategy) }}\n\n      {% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}\n      {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n      -- this may no-op if the database does not require column expansion\n      {% do adapter.expand_target_column_types(from_relation=staging_table,\n                                               to_relation=target_relation) %}\n\n      {% set remove_columns = ['dbt_change_type', 'DBT_CHANGE_TYPE', 'dbt_unique_key', 'DBT_UNIQUE_KEY'] %}\n      {% if unique_key | is_list %}\n          {% for key in strategy.unique_key %}\n              {{ remove_columns.append('dbt_unique_key_' + loop.index|string) }}\n              {{ remove_columns.append('DBT_UNIQUE_KEY_' + loop.index|string) }}\n          {% endfor %}\n      {% endif %}\n\n      {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n                                   | rejectattr('name', 'in', remove_columns)\n                                   | list %}\n\n      {% do create_columns(target_relation, missing_columns) %}\n\n      {% set source_columns = adapter.get_columns_in_relation(staging_table)\n                                   | rejectattr('name', 'in', remove_columns)\n                                   | list %}\n\n      {% set quoted_source_columns = [] %}\n      {% for column in source_columns %}\n        {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n      {% endfor %}\n\n      {% set final_sql = snapshot_merge_sql(\n            target = target_relation,\n            source = staging_table,\n            insert_cols = quoted_source_columns\n         )\n      %}\n\n  {% endif %}\n\n\n  {{ check_time_data_types(build_or_select_sql) }}\n\n  {% call statement('main') %}\n      {{ final_sql }}\n  {% endcall %}\n\n  {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n  {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n  {% do persist_docs(target_relation, model) %}\n\n  {% if not target_relation_exists %}\n    {% do create_indexes(target_relation) %}\n  {% endif %}\n\n  {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n  {{ adapter.commit() }}\n\n  {% if staging_table is defined %}\n      {% do post_snapshot(staging_table) %}\n  {% endif %}\n\n  {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n  {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_staging_table", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.check_time_data_types", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7549586, "supported_languages": ["sql"]}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n  {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7577734, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n  {% for column in columns %}\n    {% call statement() %}\n      alter table {{ relation.render() }} add column {{ adapter.quote(column.name) }} {{ column.expanded_data_type }};\n    {% endcall %}\n  {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7581997, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n  {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7584126, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n    {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.75853, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n  {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.758728, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n    {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7588727, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n  {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.759121, "supported_languages": null}, "macro.dbt.get_snapshot_table_column_names": {"name": "get_snapshot_table_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_snapshot_table_column_names", "macro_sql": "{% macro get_snapshot_table_column_names() %}\n    {{ return({'dbt_valid_to': 'dbt_valid_to', 'dbt_valid_from': 'dbt_valid_from', 'dbt_scd_id': 'dbt_scd_id', 'dbt_updated_at': 'dbt_updated_at', 'dbt_is_deleted': 'dbt_is_deleted'}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.759423, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n    {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n    {% if strategy.hard_deletes == 'new_record' %}\n        {% set new_scd_id = snapshot_hash_arguments([columns.dbt_scd_id, snapshot_get_time()]) %}\n    {% endif %}\n    with snapshot_query as (\n\n        {{ source_sql }}\n\n    ),\n\n    snapshotted_data as (\n\n        select *, {{ unique_key_fields(strategy.unique_key) }}\n        from {{ target_relation }}\n        where\n            {% if config.get('dbt_valid_to_current') %}\n\t\t{% set source_unique_key = columns.dbt_valid_to | trim %}\n\t\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\n\t\t{# The exact equals semantics between NULL values depends on the current behavior flag set. Also, update records if the source field is null #}\n                ( {{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null )\n            {% else %}\n                {{ columns.dbt_valid_to }} is null\n            {% endif %}\n\n    ),\n\n    insertions_source_data as (\n\n        select *, {{ unique_key_fields(strategy.unique_key) }},\n            {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n            {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n            {{ get_dbt_valid_to_current(strategy, columns) }},\n            {{ strategy.scd_id }} as {{ columns.dbt_scd_id }}\n\n        from snapshot_query\n    ),\n\n    updates_source_data as (\n\n        select *, {{ unique_key_fields(strategy.unique_key) }},\n            {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n            {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n            {{ strategy.updated_at }} as {{ columns.dbt_valid_to }}\n\n        from snapshot_query\n    ),\n\n    {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n\n    deletes_source_data as (\n\n        select *, {{ unique_key_fields(strategy.unique_key) }}\n        from snapshot_query\n    ),\n    {% endif %}\n\n    insertions as (\n\n        select\n            'insert' as dbt_change_type,\n            source_data.*\n          {%- if strategy.hard_deletes == 'new_record' -%}\n            ,'False' as {{ columns.dbt_is_deleted }}\n          {%- endif %}\n\n        from insertions_source_data as source_data\n        left outer join snapshotted_data\n            on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n            where {{ unique_key_is_null(strategy.unique_key, \"snapshotted_data\") }}\n            or ({{ unique_key_is_not_null(strategy.unique_key, \"snapshotted_data\") }} and (\n               {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n            )\n\n        )\n\n    ),\n\n    updates as (\n\n        select\n            'update' as dbt_change_type,\n            source_data.*,\n            snapshotted_data.{{ columns.dbt_scd_id }}\n          {%- if strategy.hard_deletes == 'new_record' -%}\n            , snapshotted_data.{{ columns.dbt_is_deleted }}\n          {%- endif %}\n\n        from updates_source_data as source_data\n        join snapshotted_data\n            on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n        where (\n            {{ strategy.row_changed }}  {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n        )\n    )\n\n    {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n    ,\n    deletes as (\n\n        select\n            'delete' as dbt_change_type,\n            source_data.*,\n            {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n            {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n            {{ snapshot_get_time() }} as {{ columns.dbt_valid_to }},\n            snapshotted_data.{{ columns.dbt_scd_id }}\n          {%- if strategy.hard_deletes == 'new_record' -%}\n            , snapshotted_data.{{ columns.dbt_is_deleted }}\n          {%- endif %}\n        from snapshotted_data\n        left join deletes_source_data as source_data\n            on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n            where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n\n            {%- if strategy.hard_deletes == 'new_record' %}\n            and not (\n                --avoid updating the record's valid_to if the latest entry is marked as deleted\n                snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n                and\n                {% if config.get('dbt_valid_to_current') -%}\n                    snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n                {%- else -%}\n                    snapshotted_data.{{ columns.dbt_valid_to }} is null\n                {%- endif %}\n            )\n            {%- endif %}\n    )\n    {%- endif %}\n\n    {%- if strategy.hard_deletes == 'new_record' %}\n        {% set snapshotted_cols = get_list_of_column_names(get_columns_in_relation(target_relation)) %}\n        {% set source_sql_cols = get_column_schema_from_query(source_sql) %}\n    ,\n    deletion_records as (\n\n        select\n            'insert' as dbt_change_type,\n            {#/*\n                If a column has been added to the source it won't yet exist in the\n                snapshotted table so we insert a null value as a placeholder for the column.\n             */#}\n            {%- for col in source_sql_cols -%}\n            {%- if col.name in snapshotted_cols -%}\n            snapshotted_data.{{ adapter.quote(col.column) }},\n            {%- else -%}\n            NULL as {{ adapter.quote(col.column) }},\n            {%- endif -%}\n            {% endfor -%}\n            {%- if strategy.unique_key | is_list -%}\n                {%- for key in strategy.unique_key -%}\n            snapshotted_data.{{ key }} as dbt_unique_key_{{ loop.index }},\n                {% endfor -%}\n            {%- else -%}\n            snapshotted_data.dbt_unique_key as dbt_unique_key,\n            {% endif -%}\n            {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n            {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n            snapshotted_data.{{ columns.dbt_valid_to }} as {{ columns.dbt_valid_to }},\n            {{ new_scd_id }} as {{ columns.dbt_scd_id }},\n            'True' as {{ columns.dbt_is_deleted }}\n        from snapshotted_data\n        left join deletes_source_data as source_data\n            on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n        where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n        and not (\n            --avoid inserting a new record if the latest one is marked as deleted\n            snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n            and\n            {% if config.get('dbt_valid_to_current') -%}\n                snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n            {%- else -%}\n                snapshotted_data.{{ columns.dbt_valid_to }} is null\n            {%- endif %}\n            )\n\n    )\n    {%- endif %}\n\n    select * from insertions\n    union all\n    select * from updates\n    {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n    union all\n    select * from deletes\n    {%- endif %}\n    {%- if strategy.hard_deletes == 'new_record' %}\n    union all\n    select * from deletion_records\n    {%- endif %}\n\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments", "macro.dbt.snapshot_get_time", "macro.dbt.unique_key_fields", "macro.dbt.equals", "macro.dbt.get_dbt_valid_to_current", "macro.dbt.unique_key_join_on", "macro.dbt.unique_key_is_null", "macro.dbt.unique_key_is_not_null", "macro.dbt.get_list_of_column_names", "macro.dbt.get_columns_in_relation", "macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.765044, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n  {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7653303, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n    {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\n    select *,\n        {{ strategy.scd_id }} as {{ columns.dbt_scd_id }},\n        {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n        {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n        {{ get_dbt_valid_to_current(strategy, columns) }}\n      {%- if strategy.hard_deletes == 'new_record' -%}\n        , 'False' as {{ columns.dbt_is_deleted }}\n      {% endif -%}\n    from (\n        {{ sql }}\n    ) sbq\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.get_dbt_valid_to_current"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7659802, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n    {% set temp_relation = make_temp_relation(target_relation) %}\n\n    {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n    {% call statement('build_snapshot_staging_relation') %}\n        {{ create_table_as(True, temp_relation, select) }}\n    {% endcall %}\n\n    {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7664974, "supported_languages": null}, "macro.dbt.get_updated_at_column_data_type": {"name": "get_updated_at_column_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_updated_at_column_data_type", "macro_sql": "{% macro get_updated_at_column_data_type(snapshot_sql) %}\n    {% set snapshot_sql_column_schema = get_column_schema_from_query(snapshot_sql) %}\n    {% set dbt_updated_at_data_type = null %}\n    {% set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n    {% set ns.dbt_updated_at_data_type = null -%}\n    {% for column in snapshot_sql_column_schema %}\n    {%   if ((column.column == 'dbt_updated_at') or (column.column == 'DBT_UPDATED_AT')) %}\n    {%     set ns.dbt_updated_at_data_type = column.dtype %}\n    {%   endif %}\n    {% endfor %}\n    {{ return(ns.dbt_updated_at_data_type or none)  }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.767238, "supported_languages": null}, "macro.dbt.check_time_data_types": {"name": "check_time_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.check_time_data_types", "macro_sql": "{% macro check_time_data_types(sql) %}\n  {% set dbt_updated_at_data_type = get_updated_at_column_data_type(sql) %}\n  {% set snapshot_get_time_data_type = get_snapshot_get_time_data_type() %}\n  {% if snapshot_get_time_data_type is not none and dbt_updated_at_data_type is not none and snapshot_get_time_data_type != dbt_updated_at_data_type %}\n  {%   if exceptions.warn_snapshot_timestamp_data_types %}\n  {{     exceptions.warn_snapshot_timestamp_data_types(snapshot_get_time_data_type, dbt_updated_at_data_type) }}\n  {%   endif %}\n  {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_updated_at_column_data_type", "macro.dbt.get_snapshot_get_time_data_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7677755, "supported_languages": null}, "macro.dbt.get_dbt_valid_to_current": {"name": "get_dbt_valid_to_current", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_dbt_valid_to_current", "macro_sql": "{% macro get_dbt_valid_to_current(strategy, columns) %}\n  {% set dbt_valid_to_current = config.get('dbt_valid_to_current') or \"null\" %}\n  coalesce(nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}), {{dbt_valid_to_current}})\n  as {{ columns.dbt_valid_to }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7681189, "supported_languages": null}, "macro.dbt.unique_key_fields": {"name": "unique_key_fields", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_fields", "macro_sql": "{% macro unique_key_fields(unique_key) %}\n    {% if unique_key | is_list %}\n        {% for key in unique_key %}\n            {{ key }} as dbt_unique_key_{{ loop.index }}\n            {%- if not loop.last %} , {%- endif %}\n        {% endfor %}\n    {% else %}\n        {{ unique_key }} as dbt_unique_key\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7685404, "supported_languages": null}, "macro.dbt.unique_key_join_on": {"name": "unique_key_join_on", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_join_on", "macro_sql": "{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}\n    {% if unique_key | is_list %}\n        {% for key in unique_key %}\n\t    {% set source_unique_key = (identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t    {% set target_unique_key = (from_identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t    {{ equals(source_unique_key, target_unique_key) }}\n            {%- if not loop.last %} and {%- endif %}\n        {% endfor %}\n    {% else %}\n        {{ identifier }}.dbt_unique_key = {{ from_identifier }}.dbt_unique_key\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.769262, "supported_languages": null}, "macro.dbt.unique_key_is_null": {"name": "unique_key_is_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_null", "macro_sql": "{% macro unique_key_is_null(unique_key, identifier) %}\n    {% if unique_key | is_list %}\n        {{ identifier }}.dbt_unique_key_1 is null\n    {% else %}\n        {{ identifier }}.dbt_unique_key is null\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7695265, "supported_languages": null}, "macro.dbt.unique_key_is_not_null": {"name": "unique_key_is_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_not_null", "macro_sql": "{% macro unique_key_is_not_null(unique_key, identifier) %}\n    {% if unique_key | is_list %}\n        {{ identifier }}.dbt_unique_key_1 is not null\n    {% else %}\n        {{ identifier }}.dbt_unique_key is not null\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.769798, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n  {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7703426, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n    {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n    {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n    merge into {{ target.render() }} as DBT_INTERNAL_DEST\n    using {{ source }} as DBT_INTERNAL_SOURCE\n    on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}\n\n    when matched\n     {% if config.get(\"dbt_valid_to_current\") %}\n\t{% set source_unique_key = (\"DBT_INTERNAL_DEST.\" ~ columns.dbt_valid_to) | trim %}\n\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\tand ({{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null)\n\n     {% else %}\n       and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null\n     {% endif %}\n     and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n        then update\n        set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n\n    when not matched\n     and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n        then insert ({{ insert_cols_csv }})\n        values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7713702, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n  {% if '.' in name %}\n    {% set package_name, name = name.split(\".\", 1) %}\n  {% else %}\n    {% set package_name = none %}\n  {% endif %}\n\n  {% if package_name is none %}\n    {% set package_context = context %}\n  {% elif package_name in context %}\n    {% set package_context = context[package_name] %}\n  {% else %}\n    {% set error_msg %}\n        Could not find package '{{package_name}}', called with '{{original_name}}'\n    {% endset %}\n    {{ exceptions.raise_compiler_error(error_msg | trim) }}\n  {% endif %}\n\n  {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n  {% if search_name not in package_context %}\n    {% set error_msg %}\n        The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n    {% endset %}\n    {{ exceptions.raise_compiler_error(error_msg | trim) }}\n  {% endif %}\n  {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.773977, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n  {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7741954, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n    md5({%- for arg in args -%}\n        coalesce(cast({{ arg }} as varchar ), '')\n        {% if not loop.last %} || '|' || {% endif %}\n    {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.774479, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n    {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n    {% set primary_key = config.get('unique_key') %}\n    {% set updated_at = config.get('updated_at') %}\n    {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n    {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n    {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n    {#/*\n        The snapshot relation might not have an {{ updated_at }} value if the\n        snapshot strategy is changed from `check` to `timestamp`. We\n        should use a dbt-created column for the comparison in the snapshot\n        table instead of assuming that the user-supplied {{ updated_at }}\n        will be present in the historical data.\n\n        See https://github.com/dbt-labs/dbt-core/issues/2350\n    */ #}\n    {% set row_changed_expr -%}\n        ({{ snapshotted_rel }}.{{ columns.dbt_valid_from }} < {{ current_rel }}.{{ updated_at }})\n    {%- endset %}\n\n    {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n    {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n    {% do return({\n        \"unique_key\": primary_key,\n        \"updated_at\": updated_at,\n        \"row_changed\": row_changed_expr,\n        \"scd_id\": scd_id_expr,\n        \"invalidate_hard_deletes\": invalidate_hard_deletes,\n        \"hard_deletes\": hard_deletes\n    }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7756844, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n    {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7759058, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n    {% do exceptions.raise_not_implemented(\n        'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n    ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7761204, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n    {%- if not target_exists -%}\n        {#-- no table yet -> return whatever the query does --#}\n        {{ return((false, query_columns)) }}\n    {%- endif -%}\n\n    {#-- handle any schema changes --#}\n    {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n    {% if check_cols_config == 'all' %}\n        {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n    {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n        {#-- query for proper casing/quoting, to support comparison below --#}\n        {%- set select_check_cols_from_target -%}\n            {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n            {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n            select {{ check_cols_config | join(', ') }} from (\n                {{ node['compiled_code'] }}\n            ) subq\n        {%- endset -%}\n        {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n    {% else %}\n        {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n    {% endif %}\n\n    {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n    {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n    {%- set ns.column_added = false -%}\n\n    {%- set intersection = [] -%}\n    {%- for col in query_columns -%}\n        {%- if col in existing_cols -%}\n            {%- do intersection.append(adapter.quote(col)) -%}\n        {%- else -%}\n            {% set ns.column_added = true %}\n        {%- endif -%}\n    {%- endfor -%}\n    {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7778635, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n    {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n    {% set check_cols_config = config.get('check_cols') %}\n    {% set primary_key = config.get('unique_key') %}\n    {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n    {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n    {% set updated_at = config.get('updated_at') or snapshot_get_time() %}\n\n    {% set column_added = false %}\n\n    {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n    {%- set row_changed_expr -%}\n    (\n    {%- if column_added -%}\n        {{ get_true_sql() }}\n    {%- else -%}\n    {%- for col in check_cols -%}\n        {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n        or\n        (\n            (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n            or\n            ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n        )\n        {%- if not loop.last %} or {% endif -%}\n    {%- endfor -%}\n    {%- endif -%}\n    )\n    {%- endset %}\n\n    {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n    {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n    {% do return({\n        \"unique_key\": primary_key,\n        \"updated_at\": updated_at,\n        \"row_changed\": row_changed_expr,\n        \"scd_id\": scd_id_expr,\n        \"invalidate_hard_deletes\": invalidate_hard_deletes,\n        \"hard_deletes\": hard_deletes\n    }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.779842, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n  {%- set existing_relation = load_cached_relation(this) -%}\n  {%- set target_relation = this.incorporate(type='view') -%}\n  {%- set intermediate_relation =  make_intermediate_relation(target_relation) -%}\n\n  -- the intermediate_relation should not already exist in the database; get_relation\n  -- will return None in that case. Otherwise, we get a relation that we can drop\n  -- later, before we try to use this name for the current operation\n  {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n  /*\n     This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n     a previous run, and we're going to try to drop it immediately. At the end of this\n     materialization, we're going to rename the \"existing_relation\" to this identifier,\n     and then we're going to drop it. In order to make sure we run the correct one of:\n       - drop view ...\n       - drop table ...\n\n     We need to set the type of this relation to be the type of the existing_relation, if it exists,\n     or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n     exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n     this relation will be effectively unused.\n  */\n  {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n  {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n  -- as above, the backup_relation should not already exist\n  {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n  -- grab current tables grants config for comparision later on\n  {% set grant_config = config.get('grants') %}\n\n  {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n  -- drop the temp relations if they exist already in the database\n  {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n  {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n  -- `BEGIN` happens here:\n  {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n  -- build model\n  {% call statement('main') -%}\n    {{ get_create_view_as_sql(intermediate_relation, sql) }}\n  {%- endcall %}\n\n  -- cleanup\n  -- move the existing view out of the way\n  {% if existing_relation is not none %}\n     /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n        since the variable was first set. */\n    {% set existing_relation = load_cached_relation(existing_relation) %}\n    {% if existing_relation is not none %}\n        {{ adapter.rename_relation(existing_relation, backup_relation) }}\n    {% endif %}\n  {% endif %}\n  {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n  {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n  {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n  {% do persist_docs(target_relation, model) %}\n\n  {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n  {{ adapter.commit() }}\n\n  {{ drop_relation_if_exists(backup_relation) }}\n\n  {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n  {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7824538, "supported_languages": ["sql"]}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialization_materialized_view_default", "macro_sql": "{% materialization materialized_view, default %}\n    {% set existing_relation = load_cached_relation(this) %}\n    {% set target_relation = this.incorporate(type=this.MaterializedView) %}\n    {% set intermediate_relation = make_intermediate_relation(target_relation) %}\n    {% set backup_relation_type = target_relation.MaterializedView if existing_relation is none else existing_relation.type %}\n    {% set backup_relation = make_backup_relation(target_relation, backup_relation_type) %}\n\n    {{ materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) }}\n\n        {% set build_sql = materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n        {% if build_sql == '' %}\n            {{ materialized_view_execute_no_op(target_relation) }}\n        {% else %}\n            {{ materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) }}\n        {% endif %}\n\n    {{ materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) }}\n\n    {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.materialized_view_setup", "macro.dbt.materialized_view_get_build_sql", "macro.dbt.materialized_view_execute_no_op", "macro.dbt.materialized_view_execute_build_sql", "macro.dbt.materialized_view_teardown"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7844367, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_setup", "macro_sql": "{% macro materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) %}\n\n    -- backup_relation and intermediate_relation should not already exist in the database\n    -- it's possible these exist because of a previous run that exited unexpectedly\n    {% set preexisting_backup_relation = load_cached_relation(backup_relation) %}\n    {% set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) %}\n\n    -- drop the temp relations if they exist already in the database\n    {{ drop_relation_if_exists(preexisting_backup_relation) }}\n    {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n\n    {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.784926, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_teardown", "macro_sql": "{% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %}\n\n    -- drop the temp relations if they exist to leave the database clean for the next run\n    {{ drop_relation_if_exists(backup_relation) }}\n    {{ drop_relation_if_exists(intermediate_relation) }}\n\n    {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7852283, "supported_languages": null}, "macro.dbt.materialized_view_get_build_sql": {"name": "materialized_view_get_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_get_build_sql", "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n    {% set full_refresh_mode = should_full_refresh() %}\n\n    -- determine the scenario we're in: create, full_refresh, alter, refresh data\n    {% if existing_relation is none %}\n        {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n    {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n        {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n    {% else %}\n\n        -- get config options\n        {% set on_configuration_change = config.get('on_configuration_change') %}\n        {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n        {% if configuration_changes is none %}\n            {% set build_sql = refresh_materialized_view(target_relation) %}\n\n        {% elif on_configuration_change == 'apply' %}\n            {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n        {% elif on_configuration_change == 'continue' %}\n            {% set build_sql = '' %}\n            {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation.render() ~ \"`\") }}\n        {% elif on_configuration_change == 'fail' %}\n            {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation.render() ~ \"`\") }}\n\n        {% else %}\n            -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n            {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n        {% endif %}\n\n    {% endif %}\n\n    {% do return(build_sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.get_create_materialized_view_as_sql", "macro.dbt.get_replace_sql", "macro.dbt.get_materialized_view_configuration_changes", "macro.dbt.refresh_materialized_view", "macro.dbt.get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.786794, "supported_languages": null}, "macro.dbt.materialized_view_execute_no_op": {"name": "materialized_view_execute_no_op", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_no_op", "macro_sql": "{% macro materialized_view_execute_no_op(target_relation) %}\n    {% do store_raw_result(\n        name=\"main\",\n        message=\"skip \" ~ target_relation,\n        code=\"skip\",\n        rows_affected=\"-1\"\n    ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7870786, "supported_languages": null}, "macro.dbt.materialized_view_execute_build_sql": {"name": "materialized_view_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_build_sql", "macro_sql": "{% macro materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) %}\n\n    -- `BEGIN` happens here:\n    {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n    {% set grant_config = config.get('grants') %}\n\n    {% call statement(name=\"main\") %}\n        {{ build_sql }}\n    {% endcall %}\n\n    {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n    {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n    {% do persist_docs(target_relation, model) %}\n\n    {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n    {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7878656, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table.sql", "original_file_path": "macros/materializations/models/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n  {%- set existing_relation = load_cached_relation(this) -%}\n  {%- set target_relation = this.incorporate(type='table') %}\n  {%- set intermediate_relation =  make_intermediate_relation(target_relation) -%}\n  -- the intermediate_relation should not already exist in the database; get_relation\n  -- will return None in that case. Otherwise, we get a relation that we can drop\n  -- later, before we try to use this name for the current operation\n  {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n  /*\n      See ../view/view.sql for more information about this relation.\n  */\n  {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n  {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n  -- as above, the backup_relation should not already exist\n  {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n  -- grab current tables grants config for comparision later on\n  {% set grant_config = config.get('grants') %}\n\n  -- drop the temp relations if they exist already in the database\n  {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n  {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n  {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n  -- `BEGIN` happens here:\n  {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n  -- build model\n  {% call statement('main') -%}\n    {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n  {%- endcall %}\n\n  {% do create_indexes(intermediate_relation) %}\n\n  -- cleanup\n  {% if existing_relation is not none %}\n     /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n        since the variable was first set. */\n    {% set existing_relation = load_cached_relation(existing_relation) %}\n    {% if existing_relation is not none %}\n        {{ adapter.rename_relation(existing_relation, backup_relation) }}\n    {% endif %}\n  {% endif %}\n\n  {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n  {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n  {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n  {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n  {% do persist_docs(target_relation, model) %}\n\n  -- `COMMIT` happens here\n  {{ adapter.commit() }}\n\n  -- finally, drop the existing/backup relation after the commit\n  {{ drop_relation_if_exists(backup_relation) }}\n\n  {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n  {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7904491, "supported_languages": ["sql"]}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n  -- relations\n  {%- set existing_relation = load_cached_relation(this) -%}\n  {%- set target_relation = this.incorporate(type='table') -%}\n  {%- set temp_relation = make_temp_relation(target_relation)-%}\n  {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n  {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n  {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n  -- configs\n  {%- set unique_key = config.get('unique_key') -%}\n  {%- set full_refresh_mode = (should_full_refresh()  or existing_relation.is_view) -%}\n  {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n  -- the temp_ and backup_ relations should not already exist in the database; get_relation\n  -- will return None in that case. Otherwise, we get a relation that we can drop\n  -- later, before we try to use this name for the current operation. This has to happen before\n  -- BEGIN, in a separate transaction\n  {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n  {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n   -- grab current tables grants config for comparision later on\n  {% set grant_config = config.get('grants') %}\n  {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n  {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n  {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n  -- `BEGIN` happens here:\n  {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n  {% set to_drop = [] %}\n\n  {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n  {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n\n  {% if existing_relation is none %}\n      {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n      {% set relation_for_indexes = target_relation %}\n  {% elif full_refresh_mode %}\n      {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n      {% set relation_for_indexes = intermediate_relation %}\n      {% set need_swap = true %}\n  {% else %}\n    {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n    {% set relation_for_indexes = temp_relation %}\n    {% set contract_config = config.get('contract') %}\n    {% if not contract_config or not contract_config.enforced %}\n      {% do adapter.expand_target_column_types(\n               from_relation=temp_relation,\n               to_relation=target_relation) %}\n    {% endif %}\n    {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n    {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n    {% if not dest_columns %}\n      {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n    {% endif %}\n\n    {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n    {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n    {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n    {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n  {% endif %}\n\n  {% call statement(\"main\") %}\n      {{ build_sql }}\n  {% endcall %}\n\n  {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n    {% do create_indexes(relation_for_indexes) %}\n  {% endif %}\n\n  {% if need_swap %}\n      {% do adapter.rename_relation(target_relation, backup_relation) %}\n      {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n      {% do to_drop.append(backup_relation) %}\n  {% endif %}\n\n  {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n  {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n  {% do persist_docs(target_relation, model) %}\n\n  {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n  -- `COMMIT` happens here\n  {% do adapter.commit() %}\n\n  {% for rel in to_drop %}\n      {% do adapter.drop_relation(rel) %}\n  {% endfor %}\n\n  {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n  {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7957911, "supported_languages": ["sql"]}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n   -- back compat for old kwarg name\n  {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n  {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7972016, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n    {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n    {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n    {%- set merge_update_columns = config.get('merge_update_columns') -%}\n    {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n    {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n    {%- set sql_header = config.get('sql_header', none) -%}\n\n    {% if unique_key %}\n        {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n            {% for key in unique_key %}\n                {% set this_key_match %}\n                    DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n                {% endset %}\n                {% do predicates.append(this_key_match) %}\n            {% endfor %}\n        {% else %}\n            {% set source_unique_key = (\"DBT_INTERNAL_SOURCE.\" ~ unique_key) | trim %}\n\t    {% set target_unique_key = (\"DBT_INTERNAL_DEST.\" ~ unique_key) | trim %}\n\t    {% set unique_key_match = equals(source_unique_key, target_unique_key) | trim %}\n            {% do predicates.append(unique_key_match) %}\n        {% endif %}\n    {% else %}\n        {% do predicates.append('FALSE') %}\n    {% endif %}\n\n    {{ sql_header if sql_header is not none }}\n\n    merge into {{ target }} as DBT_INTERNAL_DEST\n        using {{ source }} as DBT_INTERNAL_SOURCE\n        on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n    {% if unique_key %}\n    when matched then update set\n        {% for column_name in update_columns -%}\n            {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n            {%- if not loop.last %}, {%- endif %}\n        {%- endfor %}\n    {% endif %}\n\n    when not matched then insert\n        ({{ dest_cols_csv }})\n    values\n        ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns", "macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7993617, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n  {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.7997098, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n    {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n    {% if unique_key %}\n        {% if unique_key is string %}\n        {% set unique_key = [unique_key] %}\n        {% endif %}\n\n        {%- set unique_key_str = unique_key|join(', ') -%}\n\n        delete from {{ target }} as DBT_INTERNAL_DEST\n        where ({{ unique_key_str }}) in (\n            select distinct {{ unique_key_str }}\n            from {{ source }} as DBT_INTERNAL_SOURCE\n        )\n        {%- if incremental_predicates %}\n            {% for predicate in incremental_predicates %}\n                and {{ predicate }}\n            {% endfor %}\n        {%- endif -%};\n\n    {% endif %}\n\n    insert into {{ target }} ({{ dest_cols_csv }})\n    (\n        select {{ dest_cols_csv }}\n        from {{ source }}\n    )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8006191, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n  {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8009572, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n    {#-- The only time include_sql_header is True: --#}\n    {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n    {#-- We should consider including the sql header at the materialization level instead --#}\n\n    {%- set predicates = [] if predicates is none else [] + predicates -%}\n    {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n    {%- set sql_header = config.get('sql_header', none) -%}\n\n    {{ sql_header if sql_header is not none and include_sql_header }}\n\n    merge into {{ target }} as DBT_INTERNAL_DEST\n        using {{ source }} as DBT_INTERNAL_SOURCE\n        on FALSE\n\n    when not matched by source\n        {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n        then delete\n\n    when not matched then insert\n        ({{ dest_cols_csv }})\n    values\n        ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8017948, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n    {% set quoted = [] %}\n    {% for col in column_names -%}\n        {%- do quoted.append(adapter.quote(col)) -%}\n    {%- endfor %}\n\n    {%- set dest_cols_csv = quoted | join(', ') -%}\n    {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.802891, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n  {% set result = [] %}\n  {% set source_names = source_columns | map(attribute = 'column') | list %}\n  {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n   {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n   {% for sc in source_columns %}\n     {% if sc.name not in target_names %}\n        {{ result.append(sc) }}\n     {% endif %}\n   {% endfor %}\n\n  {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.803596, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n  {{ return(adapter.dispatch('diff_column_data_types', 'dbt')(source_columns, target_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8038685, "supported_languages": null}, "macro.dbt.default__diff_column_data_types": {"name": "default__diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__diff_column_data_types", "macro_sql": "{% macro default__diff_column_data_types(source_columns, target_columns) %}\n  {% set result = [] %}\n  {% for sc in source_columns %}\n    {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n    {% if tc %}\n      {% if sc.expanded_data_type != tc.expanded_data_type and not sc.can_expand_to(other_column=tc) %}\n        {{ result.append( { 'column_name': tc.name, 'new_type': sc.expanded_data_type } ) }}\n      {% endif %}\n    {% endif %}\n  {% endfor %}\n\n  {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8046882, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n  {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8049796, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n  {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n  {%- if merge_update_columns and merge_exclude_columns -%}\n    {{ exceptions.raise_compiler_error(\n        'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n    )}}\n  {%- elif merge_update_columns -%}\n    {%- set update_columns = merge_update_columns -%}\n  {%- elif merge_exclude_columns -%}\n    {%- set update_columns = [] -%}\n    {%- for column in dest_columns -%}\n      {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n        {%- do update_columns.append(column.quoted) -%}\n      {% endif %}\n    {%- endfor -%}\n  {%- else -%}\n    {%- set update_columns = default_cols -%}\n  {%- endif -%}\n\n  {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8058772, "supported_languages": null}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n   {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n     {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n     {% do log(log_message) %}\n\n     {{ return(default) }}\n\n   {% else %}\n\n     {{ return(on_schema_change) }}\n\n   {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.807534, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n  {{ return(adapter.dispatch('check_for_schema_changes', 'dbt')(source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__check_for_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8078203, "supported_languages": null}, "macro.dbt.default__check_for_schema_changes": {"name": "default__check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__check_for_schema_changes", "macro_sql": "{% macro default__check_for_schema_changes(source_relation, target_relation) %}\n\n  {% set schema_changed = False %}\n\n  {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n  {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n  {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n  {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n  {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n  {% if source_not_in_target != [] %}\n    {% set schema_changed = True %}\n  {% elif target_not_in_source != [] or new_target_types != [] %}\n    {% set schema_changed = True %}\n  {% elif new_target_types != [] %}\n    {% set schema_changed = True %}\n  {% endif %}\n\n  {% set changes_dict = {\n    'schema_changed': schema_changed,\n    'source_not_in_target': source_not_in_target,\n    'target_not_in_source': target_not_in_source,\n    'source_columns': source_columns,\n    'target_columns': target_columns,\n    'new_target_types': new_target_types\n  } %}\n\n  {% set msg %}\n    In {{ target_relation }}:\n        Schema changed: {{ schema_changed }}\n        Source columns not in target: {{ source_not_in_target }}\n        Target columns not in source: {{ target_not_in_source }}\n        New column types: {{ new_target_types }}\n  {% endset %}\n\n  {% do log(msg) %}\n\n  {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8093302, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n  {{ return(adapter.dispatch('sync_column_schemas', 'dbt')(on_schema_change, target_relation, schema_changes_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8096461, "supported_languages": null}, "macro.dbt.default__sync_column_schemas": {"name": "default__sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__sync_column_schemas", "macro_sql": "{% macro default__sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n  {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n  {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n  {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n  {%- if on_schema_change == 'append_new_columns'-%}\n     {%- if add_to_target_arr | length > 0 -%}\n       {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n     {%- endif -%}\n\n  {% elif on_schema_change == 'sync_all_columns' %}\n\n     {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n       {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n     {% endif %}\n\n     {% if new_target_types != [] %}\n       {% for ntt in new_target_types %}\n         {% set column_name = ntt['column_name'] %}\n         {% set new_type = ntt['new_type'] %}\n         {% do alter_column_type(target_relation, column_name, new_type) %}\n       {% endfor %}\n     {% endif %}\n\n  {% endif %}\n\n  {% set schema_change_message %}\n    In {{ target_relation }}:\n        Schema change approach: {{ on_schema_change }}\n        Columns added: {{ add_to_target_arr }}\n        Columns removed: {{ remove_from_target_arr }}\n        Data types changed: {{ new_target_types }}\n  {% endset %}\n\n  {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.811107, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n  {{ return(adapter.dispatch('process_schema_changes', 'dbt')(on_schema_change, source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__process_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8114061, "supported_languages": null}, "macro.dbt.default__process_schema_changes": {"name": "default__process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__process_schema_changes", "macro_sql": "{% macro default__process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n    {% if on_schema_change == 'ignore' %}\n\n     {{ return({}) }}\n\n    {% else %}\n\n      {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n      {% if schema_changes_dict['schema_changed'] %}\n\n        {% if on_schema_change == 'fail' %}\n\n          {% set fail_msg %}\n              The source and target schemas on this incremental model are out of sync!\n              They can be reconciled in several ways:\n                - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n                - Re-run the incremental model with `full_refresh: True` to update the target schema.\n                - update the schema manually and re-run the process.\n\n              Additional troubleshooting context:\n                 Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n                 Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n                 New column types: {{ schema_changes_dict['new_target_types'] }}\n          {% endset %}\n\n          {% do exceptions.raise_compiler_error(fail_msg) %}\n\n        {# -- unless we ignore, run the sync operation per the config #}\n        {% else %}\n\n          {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n        {% endif %}\n\n      {% endif %}\n\n      {{ return(schema_changes_dict['source_columns']) }}\n\n    {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8124518, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n  {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.813317, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n  {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8136158, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n  {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8138542, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n  {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.814207, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n  {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8145983, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n  {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8149607, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n  {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8151853, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n  {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8154943, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n  {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8157258, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n  {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.815908, "supported_languages": null}, "macro.dbt.get_incremental_microbatch_sql": {"name": "get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_microbatch_sql", "macro_sql": "{% macro get_incremental_microbatch_sql(arg_dict) %}\n\n  {{ return(adapter.dispatch('get_incremental_microbatch_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_microbatch_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8161204, "supported_languages": null}, "macro.dbt.default__get_incremental_microbatch_sql": {"name": "default__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_microbatch_sql", "macro_sql": "{% macro default__get_incremental_microbatch_sql(arg_dict) %}\n\n  {{ exceptions.raise_not_implemented('microbatch materialization strategy not implemented for adapter ' + adapter.type()) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8163183, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n    {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n    insert into {{ target_relation }} ({{ dest_cols_csv }})\n    (\n        select {{ dest_cols_csv }}\n        from {{ temp_relation }}\n    )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8166714, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n    {#-- do not run introspective queries in parsing #}\n    {% if not execute %}\n        {{ return(False) }}\n    {% else %}\n        {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n        {{ return(relation is not none\n                  and relation.type == 'table'\n                  and model.config.materialized == 'incremental'\n                  and not should_full_refresh()) }}\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8174114, "supported_languages": null}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n    {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.817785, "supported_languages": null}, "macro.dbt.default__create_or_replace_clone": {"name": "default__create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.default__create_or_replace_clone", "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n    create or replace table {{ this_relation.render() }} clone {{ defer_relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8179946, "supported_languages": null}, "macro.dbt.can_clone_table": {"name": "can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.can_clone_table", "macro_sql": "{% macro can_clone_table() %}\n    {{ return(adapter.dispatch('can_clone_table', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__can_clone_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8182802, "supported_languages": null}, "macro.dbt.default__can_clone_table": {"name": "default__can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.default__can_clone_table", "macro_sql": "{% macro default__can_clone_table() %}\n    {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.81842, "supported_languages": null}, "macro.dbt.materialization_clone_default": {"name": "materialization_clone_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/clone.sql", "original_file_path": "macros/materializations/models/clone/clone.sql", "unique_id": "macro.dbt.materialization_clone_default", "macro_sql": "{%- materialization clone, default -%}\n\n  {%- set relations = {'relations': []} -%}\n\n  {%- if not defer_relation -%}\n      -- nothing to do\n      {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n      {{ return(relations) }}\n  {%- endif -%}\n\n  {%- set existing_relation = load_cached_relation(this) -%}\n\n  {%- if existing_relation and not flags.FULL_REFRESH -%}\n      -- noop!\n      {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n      {{ return(relations) }}\n  {%- endif -%}\n\n  {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n  -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n  -- Otherwise, this will be a view\n\n  {% set can_clone_table = can_clone_table() %}\n  {%- set grant_config = config.get('grants') -%}\n\n  {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n      {%- set target_relation = this.incorporate(type='table') -%}\n      {% if existing_relation is not none and not existing_relation.is_table %}\n        {{ log(\"Dropping relation \" ~ existing_relation.render() ~ \" because it is of type \" ~ existing_relation.type) }}\n        {{ drop_relation_if_exists(existing_relation) }}\n      {% endif %}\n\n      -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n      {% if target_relation.database == defer_relation.database and\n            target_relation.schema == defer_relation.schema and\n            target_relation.identifier == defer_relation.identifier %}\n        {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation.render()) }}\n      {% else %}\n        {% call statement('main') %}\n            {{ create_or_replace_clone(target_relation, defer_relation) }}\n        {% endcall %}\n      {% endif %}\n      {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n      {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n      {% do persist_docs(target_relation, model) %}\n\n      {{ return({'relations': [target_relation]}) }}\n\n  {%- else -%}\n\n      {%- set target_relation = this.incorporate(type='view') -%}\n\n      -- reuse the view materialization\n      -- TODO: support actual dispatch for materialization macros\n      -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n      {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n      {% if not search_name in context %}\n          {% set search_name = \"materialization_view_default\" %}\n      {% endif %}\n      {% set materialization_macro = context[search_name] %}\n      {% set relations = materialization_macro() %}\n      {{ return(relations) }}\n\n  {%- endif -%}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.can_clone_table", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_or_replace_clone", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8217535, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n  {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8230069, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n  {%- set column_override = model['config'].get('column_types', {}) -%}\n  {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n  {% set sql %}\n    create table {{ this.render() }} (\n        {%- for col_name in agate_table.column_names -%}\n            {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n            {%- set type = column_override.get(col_name, inferred_type) -%}\n            {%- set column_name = (col_name | string) -%}\n            {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n        {%- endfor -%}\n    )\n  {% endset %}\n\n  {% call statement('_') -%}\n    {{ sql }}\n  {%- endcall %}\n\n  {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8241131, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n  {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8244085, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n    {% set sql = \"\" %}\n    {% if full_refresh %}\n        {{ adapter.drop_relation(old_relation) }}\n        {% set sql = create_csv_table(model, agate_table) %}\n    {% else %}\n        {{ adapter.truncate_relation(old_relation) }}\n        {% set sql = \"truncate table \" ~ old_relation.render() %}\n    {% endif %}\n\n    {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.825029, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n    {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8252664, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n    {{ create_or_truncate_sql }};\n    -- dbt seed --\n    {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8254344, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n  {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8256233, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n  {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8257732, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n  {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8259673, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n  {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.82612, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n  {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n    {% set quoted = [] %}\n    {% for col in column_names -%}\n        {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n    {%- endfor %}\n\n    {%- set dest_cols_csv = quoted | join(', ') -%}\n    {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8267303, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n  {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.827097, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n  {% set batch_size = get_batch_size() %}\n\n  {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n  {% set bindings = [] %}\n\n  {% set statements = [] %}\n\n  {% for chunk in agate_table.rows | batch(batch_size) %}\n      {% set bindings = [] %}\n\n      {% for row in chunk %}\n          {% do bindings.extend(row) %}\n      {% endfor %}\n\n      {% set sql %}\n          insert into {{ this.render() }} ({{ cols_sql }}) values\n          {% for row in chunk -%}\n              ({%- for column in agate_table.column_names -%}\n                  {{ get_binding_char() }}\n                  {%- if not loop.last%},{%- endif %}\n              {%- endfor -%})\n              {%- if not loop.last%},{%- endif %}\n          {%- endfor %}\n      {% endset %}\n\n      {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n      {% if loop.index0 == 0 %}\n          {% do statements.append(sql) %}\n      {% endif %}\n  {% endfor %}\n\n  {# Return SQL so we can render it out into the compiled files #}\n  {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8285916, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n  {%- set identifier = model['alias'] -%}\n  {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n  {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n  {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n  {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n  {%- set grant_config = config.get('grants') -%}\n  {%- set agate_table = load_agate_table() -%}\n  -- grab current tables grants config for comparison later on\n\n  {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n  {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n  -- `BEGIN` happens here:\n  {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n  -- build model\n  {% set create_table_sql = \"\" %}\n  {% if exists_as_view %}\n    {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation.render())) }}\n  {% elif exists_as_table %}\n    {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n  {% else %}\n    {% set create_table_sql = create_csv_table(model, agate_table) %}\n  {% endif %}\n\n  {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n  {% set rows_affected = (agate_table.rows | length) %}\n  {% set sql = load_csv_rows(model, agate_table) %}\n\n  {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n    {{ get_csv_sql(create_table_sql, sql) }};\n  {% endcall %}\n\n  {% set target_relation = this.incorporate(type='table') %}\n\n  {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n  {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n  {% do persist_docs(target_relation, model) %}\n\n  {% if full_refresh_mode or not exists_as_table %}\n    {% do create_indexes(target_relation) %}\n  {% endif %}\n\n  {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n  -- `COMMIT` happens here\n  {{ adapter.commit() }}\n\n  {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n  {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8316967, "supported_languages": ["sql"]}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n    {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8321352, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n    {% set where = config.get('where', '') %}\n    {% if where %}\n        {%- set filtered -%}\n            (select * from {{ relation }} where {{ where }}) dbt_subquery\n        {%- endset -%}\n        {% do return(filtered) %}\n    {%- else -%}\n        {% do return(relation) %}\n    {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8326333, "supported_languages": null}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n  {% set relations = [] %}\n  {% set limit = config.get('limit') %}\n  {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n  {% set sql_with_limit %}\n    {{ get_limit_subquery_sql(sql, limit) }}\n  {% endset %}\n\n  {% if should_store_failures() %}\n\n    {% set identifier = model['alias'] %}\n    {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n    {% set store_failures_as = config.get('store_failures_as') %}\n    -- if `--store-failures` is invoked via command line and `store_failures_as` is not set,\n    -- config.get('store_failures_as', 'table') returns None, not 'table'\n    {% if store_failures_as == none %}{% set store_failures_as = 'table' %}{% endif %}\n    {% if store_failures_as not in ['table', 'view'] %}\n        {{ exceptions.raise_compiler_error(\n            \"'\" ~ store_failures_as ~ \"' is not a valid value for `store_failures_as`. \"\n            \"Accepted values are: ['ephemeral', 'table', 'view']\"\n        ) }}\n    {% endif %}\n\n    {% set target_relation = api.Relation.create(\n        identifier=identifier, schema=schema, database=database, type=store_failures_as) -%} %}\n\n    {% if old_relation %}\n        {% do adapter.drop_relation(old_relation) %}\n    {% endif %}\n\n    {% call statement(auto_begin=True) %}\n        {% if sql_header %}{{ sql_header }}{% endif %}\n        {{ get_create_sql(target_relation, sql_with_limit) }}\n    {% endcall %}\n\n    {% do relations.append(target_relation) %}\n\n    {# Since the test failures have already been saved to the database, reuse that result rather than querying again #}\n    {% set main_sql %}\n        select *\n        from {{ target_relation }}\n    {% endset %}\n\n    {{ adapter.commit() }}\n\n  {% else %}\n\n      {% set main_sql = sql_with_limit %}\n\n  {% endif %}\n\n  {% set fail_calc = config.get('fail_calc') %}\n  {% set warn_if = config.get('warn_if') %}\n  {% set error_if = config.get('error_if') %}\n\n  {% call statement('main', fetch_result=True) -%}\n\n    {% if sql_header %}{{ sql_header }}{% endif %}\n    {# The limit has already been included above, and we do not want to duplicate it again. We also want to be safe for macro overrides treating `limit` as a required parameter. #}\n    {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit=none)}}\n\n  {%- endcall %}\n\n  {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql", "macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.get_create_sql", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.835783, "supported_languages": ["sql"]}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n  {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8364956, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n    select\n      {{ fail_calc }} as failures,\n      {{ fail_calc }} {{ warn_if }} as should_warn,\n      {{ fail_calc }} {{ error_if }} as should_error\n    from (\n      {{ main_sql }}\n      {{ \"limit \" ~ limit if limit != none }}\n    ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8368976, "supported_languages": null}, "macro.dbt.get_unit_test_sql": {"name": "get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_unit_test_sql", "macro_sql": "{% macro get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n  {{ adapter.dispatch('get_unit_test_sql', 'dbt')(main_sql, expected_fixture_sql, expected_column_names) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_unit_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8371546, "supported_languages": null}, "macro.dbt.default__get_unit_test_sql": {"name": "default__get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_unit_test_sql", "macro_sql": "{% macro default__get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n-- Build actual result given inputs\nwith dbt_internal_unit_test_actual as (\n  select\n    {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%},{% endif %}{%- endfor -%}, {{ dbt.string_literal(\"actual\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n  from (\n    {{ main_sql }}\n  ) _dbt_internal_unit_test_actual\n),\n-- Build expected result\ndbt_internal_unit_test_expected as (\n  select\n    {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%}, {% endif %}{%- endfor -%}, {{ dbt.string_literal(\"expected\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n  from (\n    {{ expected_fixture_sql }}\n  ) _dbt_internal_unit_test_expected\n)\n-- Union actual and expected results\nselect * from dbt_internal_unit_test_actual\nunion all\nselect * from dbt_internal_unit_test_expected\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8379197, "supported_languages": null}, "macro.dbt.materialization_unit_default": {"name": "materialization_unit_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/unit.sql", "original_file_path": "macros/materializations/tests/unit.sql", "unique_id": "macro.dbt.materialization_unit_default", "macro_sql": "{%- materialization unit, default -%}\n\n  {% set relations = [] %}\n  {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n  {% set expected_rows = config.get('expected_rows') %}\n  {% set expected_sql = config.get('expected_sql') %}\n  {% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}\n\n  {%- set target_relation = this.incorporate(type='table') -%}\n  {%- set temp_relation = make_temp_relation(target_relation)-%}\n  {% do run_query(get_create_table_as_sql(True, temp_relation, get_empty_subquery_sql(sql))) %}\n  {%- set columns_in_relation = adapter.get_columns_in_relation(temp_relation) -%}\n  {%- set column_name_to_data_types = {} -%}\n  {%- set column_name_to_quoted = {} -%}\n  {%- for column in columns_in_relation -%}\n  {%-   do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n  {%-   do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n  {%- endfor -%}\n\n  {%- set expected_column_names_quoted = [] -%}\n  {%- for column_name in tested_expected_column_names -%}\n  {%-   do expected_column_names_quoted.append(column_name_to_quoted[column_name|lower]) -%}\n  {%- endfor -%}\n\n  {% if not expected_sql %}\n  {%   set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types, column_name_to_quoted) %}\n  {% endif %}\n  {% set unit_test_sql = get_unit_test_sql(sql, expected_sql, expected_column_names_quoted) %}\n\n  {% call statement('main', fetch_result=True) -%}\n\n    {% if sql_header %}{{ sql_header }}{% endif %}\n    {{ unit_test_sql }}\n\n  {%- endcall %}\n\n  {% do adapter.drop_relation(temp_relation) %}\n\n  {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt.make_temp_relation", "macro.dbt.run_query", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_empty_subquery_sql", "macro.dbt.get_expected_sql", "macro.dbt.get_unit_test_sql", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8404856, "supported_languages": ["sql"]}, "macro.dbt.scalar_function_sql": {"name": "scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_sql", "macro_sql": "{% macro scalar_function_sql(target_relation) %}\n    {{ return(adapter.dispatch('scalar_function_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8413603, "supported_languages": null}, "macro.dbt.default__scalar_function_sql": {"name": "default__scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_sql", "macro_sql": "{% macro default__scalar_function_sql(target_relation) %}\n    {{ scalar_function_create_replace_signature_sql(target_relation) }}\n    {{ scalar_function_body_sql() }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_create_replace_signature_sql", "macro.dbt.scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.841558, "supported_languages": null}, "macro.dbt.scalar_function_create_replace_signature_sql": {"name": "scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_create_replace_signature_sql", "macro_sql": "{% macro scalar_function_create_replace_signature_sql(target_relation) %}\n    {{ return(adapter.dispatch('scalar_function_create_replace_signature_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_create_replace_signature_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8418152, "supported_languages": null}, "macro.dbt.default__scalar_function_create_replace_signature_sql": {"name": "default__scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_create_replace_signature_sql", "macro_sql": "{% macro default__scalar_function_create_replace_signature_sql(target_relation) %}\n    CREATE OR REPLACE FUNCTION {{ target_relation.render() }} ({{ formatted_scalar_function_args_sql()}})\n    RETURNS {{ model.returns.data_type }}\n    {{ scalar_function_volatility_sql() }}\n    AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql", "macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8420784, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_sql": {"name": "formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_sql", "macro_sql": "{% macro formatted_scalar_function_args_sql() %}\n    {{ return(adapter.dispatch('formatted_scalar_function_args_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8422818, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_sql": {"name": "default__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_sql", "macro_sql": "{% macro default__formatted_scalar_function_args_sql() %}\n    {% set args = [] %}\n    {% for arg in model.arguments -%}\n        {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n    {%- endfor %}\n    {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8426986, "supported_languages": null}, "macro.dbt.scalar_function_body_sql": {"name": "scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_body_sql", "macro_sql": "{% macro scalar_function_body_sql() %}\n    {{ return(adapter.dispatch('scalar_function_body_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8429024, "supported_languages": null}, "macro.dbt.default__scalar_function_body_sql": {"name": "default__scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_body_sql", "macro_sql": "{% macro default__scalar_function_body_sql() %}\n    $$\n       {{ model.compiled_code }}\n    $$ LANGUAGE SQL\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8430426, "supported_languages": null}, "macro.dbt.scalar_function_volatility_sql": {"name": "scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_sql", "macro_sql": "{% macro scalar_function_volatility_sql() %}\n    {{ return(adapter.dispatch('scalar_function_volatility_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8432386, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_sql": {"name": "default__scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_sql", "macro_sql": "{% macro default__scalar_function_volatility_sql() %}\n    {% set volatility = model.config.get('volatility') %}\n    {% if volatility == 'deterministic' %}\n        IMMUTABLE\n    {% elif volatility == 'stable' %}\n        STABLE\n    {% elif volatility == 'non-deterministic' %}\n        VOLATILE\n    {% elif volatility != none %}\n        {# This shouldn't happen unless a new volatility is invented #}\n        {% do unsupported_volatility_warning(volatility) %}\n    {% endif %}\n    {# If no volatility is set, don't add anything and let the data warehouse default it #}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8437676, "supported_languages": null}, "macro.dbt.unsupported_volatility_warning": {"name": "unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.unsupported_volatility_warning", "macro_sql": "{% macro unsupported_volatility_warning(volatility) %}\n    {{ return(adapter.dispatch('unsupported_volatility_warning', 'dbt')(volatility)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.844002, "supported_languages": null}, "macro.dbt.default__unsupported_volatility_warning": {"name": "default__unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__unsupported_volatility_warning", "macro_sql": "{% macro default__unsupported_volatility_warning(volatility) %}\n    {% set msg = \"Found `\" ~ volatility ~ \"` volatility specified on function `\" ~ model.name ~ \"`. This volatility is not supported by \" ~ adapter.type() ~ \", and will be ignored\" %}\n    {% do exceptions.warn(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8443332, "supported_languages": null}, "macro.dbt.materialization_function_default": {"name": "materialization_function_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/function.sql", "original_file_path": "macros/materializations/functions/function.sql", "unique_id": "macro.dbt.materialization_function_default", "macro_sql": "{% materialization function, default, supported_languages=['sql', 'python'] %}\n    {% set existing_relation = load_cached_relation(this) %}\n    {% set target_relation = this.incorporate(type=this.Function) %}\n\n    {{ run_hooks(pre_hooks) }}\n\n    {% set function_config = this.get_function_config(model) %}\n    {% set macro_name = this.get_function_macro_name(function_config) %}\n\n    {# Doing this aliasing of adapter.dispatch is a hacky way to disable the static analysis of actually calling adapter.dispatch #}\n    {# This is necessary because the static analysis breaks being able to dynamically pass a macro_name #}\n    {% set _dispatch = adapter.dispatch %}\n\n    {% set build_sql = _dispatch(macro_name, 'dbt')(target_relation) %}\n    {{ function_execute_build_sql(build_sql, existing_relation, target_relation) }}\n    {{ run_hooks(post_hooks) }}\n\n    {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.run_hooks", "macro.dbt.function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8454864, "supported_languages": ["sql", "python"]}, "macro.dbt.function_execute_build_sql": {"name": "function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.function_execute_build_sql", "macro_sql": "{% macro function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n    {{ return(adapter.dispatch('function_execute_build_sql', 'dbt')(build_sql, existing_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.845975, "supported_languages": null}, "macro.dbt.default__function_execute_build_sql": {"name": "default__function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.default__function_execute_build_sql", "macro_sql": "{% macro default__function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n\n    {% set grant_config = config.get('grants') %}\n\n    {% call statement(name=\"main\") %}\n        {{ build_sql }}\n    {% endcall %}\n\n    {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n    {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n    {% do persist_docs(target_relation, model) %}\n\n    {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8468456, "supported_languages": null}, "macro.dbt.get_aggregate_function_create_replace_signature": {"name": "get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_create_replace_signature", "macro_sql": "{% macro get_aggregate_function_create_replace_signature(target_relation) %}\n    {{ return(adapter.dispatch('get_aggregate_function_create_replace_signature', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_create_replace_signature"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.847703, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_create_replace_signature": {"name": "default__get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_create_replace_signature", "macro_sql": "{% macro default__get_aggregate_function_create_replace_signature(target_relation) %}\n    CREATE OR REPLACE AGGREGATE FUNCTION {{ target_relation.render() }} ({{ get_formatted_aggregate_function_args()}})\n    RETURNS {{ model.returns.data_type }}\n    {{ get_function_language_specifier() }}\n    {{ get_aggregate_function_volatility_specifier() }}\n    {% if model.get('language') == 'python' %}\n        {{ get_function_python_options() }}\n    {% endif %}\n    AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_formatted_aggregate_function_args", "macro.dbt.get_function_language_specifier", "macro.dbt.get_aggregate_function_volatility_specifier", "macro.dbt.get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8481638, "supported_languages": null}, "macro.dbt.get_formatted_aggregate_function_args": {"name": "get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_formatted_aggregate_function_args", "macro_sql": "{% macro get_formatted_aggregate_function_args() %}\n    {{ return(adapter.dispatch('get_formatted_aggregate_function_args', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_formatted_aggregate_function_args"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8483799, "supported_languages": null}, "macro.dbt.default__get_formatted_aggregate_function_args": {"name": "default__get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_formatted_aggregate_function_args", "macro_sql": "{% macro default__get_formatted_aggregate_function_args() %}\n    {# conveniently we can reuse the sql scalar function args #}\n    {{ formatted_scalar_function_args_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8485286, "supported_languages": null}, "macro.dbt.get_function_language_specifier": {"name": "get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_language_specifier", "macro_sql": "{% macro get_function_language_specifier() %}\n    {{ return(adapter.dispatch('get_function_language_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_language_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8487408, "supported_languages": null}, "macro.dbt.default__get_function_language_specifier": {"name": "default__get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_language_specifier", "macro_sql": "{% macro default__get_function_language_specifier() %}\n    {% set language = model.get('language') %}\n    {% if language == 'sql' %}\n        {# generally you dont need to specify the language for sql functions #}\n    {% elif language == 'python' %}\n        LANGUAGE PYTHON\n    {% else %}\n        {{ 'LANGUAGE ' ~ language.upper() }}\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8491502, "supported_languages": null}, "macro.dbt.get_aggregate_function_volatility_specifier": {"name": "get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_volatility_specifier", "macro_sql": "{% macro get_aggregate_function_volatility_specifier() %}\n    {{ return(adapter.dispatch('get_aggregate_function_volatility_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_volatility_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8493557, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_volatility_specifier": {"name": "default__get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_volatility_specifier", "macro_sql": "{% macro default__get_aggregate_function_volatility_specifier() %}\n    {{ scalar_function_volatility_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8494864, "supported_languages": null}, "macro.dbt.get_function_python_options": {"name": "get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_python_options", "macro_sql": "{% macro get_function_python_options() %}\n    {{ return(adapter.dispatch('get_function_python_options', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8496933, "supported_languages": null}, "macro.dbt.default__get_function_python_options": {"name": "default__get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_python_options", "macro_sql": "{% macro default__get_function_python_options() %}\n    RUNTIME_VERSION = '{{ model.config.get('runtime_version') }}'\n    HANDLER = '{{ model.config.get('entry_point') }}'\n    {% set packages = model.config.get('packages', []) %}\n    {% if packages %}\n    PACKAGES = ('{{ packages | join(\"','\") }}')\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8501449, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n      {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8504953, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.850688, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n  {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8510785, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n    dateadd(\n        {{ datepart }},\n        {{ interval }},\n        {{ from_date_or_timestamp }}\n        )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8512876, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n    {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8516417, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n    right(\n        {{ string_text }},\n        {{ length_expression }}\n    )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.85182, "supported_languages": null}, "macro.dbt.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n    {{ return(adapter.dispatch('get_intervals_between', 'dbt')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8524384, "supported_languages": null}, "macro.dbt.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n    {%- call statement('get_intervals_between', fetch_result=True) %}\n\n        select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n    {%- endcall -%}\n\n    {%- set value_list = load_result('get_intervals_between') -%}\n\n    {%- if value_list and value_list['data'] -%}\n        {%- set values = value_list['data'] | map(attribute=0) | list %}\n        {{ return(values[0]) }}\n    {%- else -%}\n        {{ return(1) }}\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.853197, "supported_languages": null}, "macro.dbt.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n    {{ return(adapter.dispatch('date_spine', 'dbt')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8534877, "supported_languages": null}, "macro.dbt.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n    {# call as follows:\n\n    date_spine(\n        \"day\",\n        \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n        \"dbt.dateadd(week, 1, current_date)\"\n    ) #}\n\n\n    with rawdata as (\n\n        {{dbt.generate_series(\n            dbt.get_intervals_between(start_date, end_date, datepart)\n        )}}\n\n    ),\n\n    all_periods as (\n\n        select (\n            {{\n                dbt.dateadd(\n                    datepart,\n                    \"row_number() over (order by 1) - 1\",\n                    start_date\n                )\n            }}\n        ) as date_{{datepart}}\n        from rawdata\n\n    ),\n\n    filtered as (\n\n        select *\n        from all_periods\n        where date_{{datepart}} <= {{ end_date }}\n\n    )\n\n    select * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.generate_series", "macro.dbt.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8539515, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n    {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.854334, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n    replace(\n        {{ field }},\n        {{ old_chars }},\n        {{ new_chars }}\n    )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.854537, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n    {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8548524, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n    any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8549824, "supported_languages": null}, "macro.dbt.equals": {"name": "equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.equals", "macro_sql": "{% macro equals(expr1, expr2) %}\n    {{ return(adapter.dispatch('equals', 'dbt') (expr1, expr2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8553777, "supported_languages": null}, "macro.dbt.default__equals": {"name": "default__equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.default__equals", "macro_sql": "{% macro default__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n    case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))\n        then 0\n        else 1\n    end = 0\n{%- else -%}\n    ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8559062, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n  {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8563664, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n    split_part(\n        {{ string_text }},\n        {{ delimiter_text }},\n        {{ part_number }}\n        )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.856588, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n    split_part(\n        {{ string_text }},\n        {{ delimiter_text }},\n          length({{ string_text }})\n          - length(\n              replace({{ string_text }},  {{ delimiter_text }}, '')\n          ) + 2 + {{ part_number }}\n        )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8568742, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n  {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.857257, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n    cast(\n        {{dbt.dateadd('day', '-1',\n        dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n        )}}\n        as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8575895, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n    {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.857777, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n    {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8583272, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n    {% if limit_num -%}\n    array_to_string(\n        array_slice(\n            array_agg(\n                {{ measure }}\n            ){% if order_by_clause -%}\n            within group ({{ order_by_clause }})\n            {%- endif %}\n            ,0\n            ,{{ limit_num }}\n        ),\n        {{ delimiter_text }}\n        )\n    {%- else %}\n    listagg(\n        {{ measure }},\n        {{ delimiter_text }}\n        )\n        {% if order_by_clause -%}\n        within group ({{ order_by_clause }})\n        {%- endif %}\n    {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8588567, "supported_languages": null}, "macro.dbt.date": {"name": "date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.date", "macro_sql": "{% macro date(year, month, day) %}\n  {{ return(adapter.dispatch('date', 'dbt') (year, month, day)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8592558, "supported_languages": null}, "macro.dbt.default__date": {"name": "default__date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.default__date", "macro_sql": "{% macro default__date(year, month, day) -%}\n    {%- set dt = modules.datetime.date(year, month, day) -%}\n    {%- set iso_8601_formatted_date = dt.strftime('%Y-%m-%d') -%}\n    to_date('{{ iso_8601_formatted_date }}', 'YYYY-MM-DD')\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8596165, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n  {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.860558, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n    {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8607745, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n  {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8609734, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n    {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.861156, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n  {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8613462, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n    {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8615284, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n  {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.861735, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n    {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8619447, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n  {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8621366, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n    {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8623204, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n  {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.862514, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n  {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8627105, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n  {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.862903, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n  {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8630714, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n  {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.863389, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n    cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8636074, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n    {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8640573, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n    bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8641932, "supported_languages": null}, "macro.dbt.cast": {"name": "cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.cast", "macro_sql": "{% macro cast(field, type) %}\n  {{ return(adapter.dispatch('cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.864521, "supported_languages": null}, "macro.dbt.default__cast": {"name": "default__cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.default__cast", "macro_sql": "{% macro default__cast(field, type) %}\n    cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8646934, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n  {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.864994, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n    md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8651855, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n    {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8655176, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n    position(\n        {{ substring_text }} in {{ string_text }}\n    )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.865698, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n  {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8660252, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n    date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8661861, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n  {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8666503, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n    {% if inputs|length > 0 %}\n    array[ {{ inputs|join(' , ') }} ]\n    {% else %}\n    array[]::{{data_type}}[]\n    {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8669553, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n  {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8673005, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n    array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8674748, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n  {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8678951, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n    datediff(\n        {{ datepart }},\n        {{ first_date }},\n        {{ second_date }}\n        )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8681035, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n    {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8684037, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n    length(\n        {{ expression }}\n    )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8685362, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n  {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8688185, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n    intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8689196, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n  {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.869187, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n    except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8692853, "supported_languages": null}, "macro.dbt.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n    {{ return(adapter.dispatch('get_powers_of_two', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8698294, "supported_languages": null}, "macro.dbt.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n    {% if upper_bound <= 0 %}\n    {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n    {% endif %}\n\n    {% for _ in range(1, 100) %}\n       {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n    {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8703601, "supported_languages": null}, "macro.dbt.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n    {{ return(adapter.dispatch('generate_series', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.87075, "supported_languages": null}, "macro.dbt.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n    {% set n = dbt.get_powers_of_two(upper_bound) %}\n\n    with p as (\n        select 0 as generated_number union all select 1\n    ), unioned as (\n\n    select\n\n    {% for i in range(n) %}\n    p{{i}}.generated_number * power(2, {{i}})\n    {% if not loop.last %} + {% endif %}\n    {% endfor %}\n    + 1\n    as generated_number\n\n    from\n\n    {% for i in range(n) %}\n    p as p{{i}}\n    {% if not loop.last %} cross join {% endif %}\n    {% endfor %}\n\n    )\n\n    select *\n    from unioned\n    where generated_number <= {{upper_bound}}\n    order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8714097, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n  {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8717847, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n    array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.871956, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n  {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8722517, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n    {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8724053, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n  {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8727672, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n    {# most databases don't support this function yet\n    so we just need to use cast #}\n    cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8729444, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n  {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8732417, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n    '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8733723, "supported_languages": null}, "macro.dbt.validate_sql": {"name": "validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.validate_sql", "macro_sql": "{% macro validate_sql(sql) -%}\n  {{ return(adapter.dispatch('validate_sql', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__validate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8737125, "supported_languages": null}, "macro.dbt.default__validate_sql": {"name": "default__validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.default__validate_sql", "macro_sql": "{% macro default__validate_sql(sql) -%}\n  {% call statement('validate_sql') -%}\n    explain {{ sql }}\n  {% endcall %}\n  {{ return(load_result('validate_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8739886, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n  {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8743765, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n  {%- call statement('create_schema') -%}\n    create schema if not exists {{ relation.without_identifier() }}\n  {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8746152, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n  {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8748105, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n  {%- call statement('drop_schema') -%}\n    drop schema if exists {{ relation.without_identifier() }} cascade\n  {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8750384, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n  {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8755994, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n  {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n    select\n      max({{ loaded_at_field }}) as max_loaded_at,\n      {{ current_timestamp() }} as snapshotted_at\n    from {{ source }}\n    {% if filter %}\n    where {{ filter }}\n    {% endif %}\n  {% endcall %}\n  {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8761137, "supported_languages": null}, "macro.dbt.collect_freshness_custom_sql": {"name": "collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness_custom_sql", "macro_sql": "{% macro collect_freshness_custom_sql(source, loaded_at_query) %}\n  {{ return(adapter.dispatch('collect_freshness_custom_sql', 'dbt')(source, loaded_at_query))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness_custom_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8763669, "supported_languages": null}, "macro.dbt.default__collect_freshness_custom_sql": {"name": "default__collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness_custom_sql", "macro_sql": "{% macro default__collect_freshness_custom_sql(source, loaded_at_query) %}\n  {% call statement('collect_freshness_custom_sql', fetch_result=True, auto_begin=False) -%}\n  with source_query as (\n    {{ loaded_at_query }}\n  )\n  select\n    (select * from source_query) as max_loaded_at,\n    {{ current_timestamp() }} as snapshotted_at\n  {% endcall %}\n  {{ return(load_result('collect_freshness_custom_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8767555, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n  {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8773487, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n  {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8775258, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n  {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8777418, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n  {%- set _indexes = config.get('indexes', default=[]) -%}\n\n  {% for _index_dict in _indexes %}\n    {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n    {% if create_index_sql %}\n      {% do run_query(create_index_sql) %}\n    {% endif %}\n  {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8782566, "supported_languages": null}, "macro.dbt.get_drop_index_sql": {"name": "get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_drop_index_sql", "macro_sql": "{% macro get_drop_index_sql(relation, index_name) -%}\n    {{ adapter.dispatch('get_drop_index_sql', 'dbt')(relation, index_name) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8784842, "supported_languages": null}, "macro.dbt.default__get_drop_index_sql": {"name": "default__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_drop_index_sql", "macro_sql": "{% macro default__get_drop_index_sql(relation, index_name) -%}\n    {{ exceptions.raise_compiler_error(\"`get_drop_index_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8786664, "supported_languages": null}, "macro.dbt.get_show_indexes_sql": {"name": "get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_show_indexes_sql", "macro_sql": "{% macro get_show_indexes_sql(relation) -%}\n    {{ adapter.dispatch('get_show_indexes_sql', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8788576, "supported_languages": null}, "macro.dbt.default__get_show_indexes_sql": {"name": "default__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_show_indexes_sql", "macro_sql": "{% macro default__get_show_indexes_sql(relation) -%}\n    {{ exceptions.raise_compiler_error(\"`get_show_indexes_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8794644, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n  {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8809192, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n  {{ exceptions.raise_not_implemented(\n    'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8811243, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n  {% set columns = [] %}\n  {% for row in table %}\n    {% do columns.append(api.Column(*row)) %}\n  {% endfor %}\n  {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8815036, "supported_languages": null}, "macro.dbt.get_list_of_column_names": {"name": "get_list_of_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_list_of_column_names", "macro_sql": "\n\n{%- macro get_list_of_column_names(columns) -%}\n  {% set col_names = [] %}\n  {% for col in columns %}\n    {% do col_names.append(col.name) %}\n  {% endfor %}\n  {{ return(col_names) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8818789, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n  {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.882141, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n    {%- if select_sql_header is not none -%}\n    {{ select_sql_header }}\n    {%- endif -%}\n    select * from (\n        {{ select_sql }}\n    ) as __dbt_sbq\n    where false\n    limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8823986, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n  {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8826249, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n    {%- set col_err = [] -%}\n    {%- set col_naked_numeric = [] -%}\n    select\n    {% for i in columns %}\n      {%- set col = columns[i] -%}\n      {%- if col['data_type'] is not defined -%}\n        {%- do col_err.append(col['name']) -%}\n      {#-- If this column's type is just 'numeric' then it is missing precision/scale, raise a warning --#}\n      {%- elif col['data_type'].strip().lower() in ('numeric', 'decimal', 'number') -%}\n        {%- do col_naked_numeric.append(col['name']) -%}\n      {%- endif -%}\n      {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n      {{ cast('null', col['data_type']) }} as {{ col_name }}{{ \", \" if not loop.last }}\n    {%- endfor -%}\n    {%- if (col_err | length) > 0 -%}\n      {{ exceptions.column_type_missing(column_names=col_err) }}\n    {%- elif (col_naked_numeric | length) > 0 -%}\n      {{ exceptions.warn(\"Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: \" ~ col_naked_numeric ~ \"`\") }}\n    {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.88405, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n    {% set columns = [] %}\n    {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n    {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n    {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n    {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.884478, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n  {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8847141, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n    {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n        {{ get_empty_subquery_sql(select_sql) }}\n    {% endcall %}\n    {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8851428, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n  {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8854165, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n  {#\n    1. Create a new column (w/ temp name and correct type)\n    2. Copy data over to it\n    3. Drop the existing column (cascade!)\n    4. Rename the new column to existing column\n  #}\n  {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n  {% call statement('alter_column_type') %}\n    alter table {{ relation.render() }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n    update {{ relation.render() }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n    alter table {{ relation.render() }} drop column {{ adapter.quote(column_name) }} cascade;\n    alter table {{ relation.render() }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n  {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8862152, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n  {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8865223, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n  {% if add_columns is none %}\n    {% set add_columns = [] %}\n  {% endif %}\n  {% if remove_columns is none %}\n    {% set remove_columns = [] %}\n  {% endif %}\n\n  {% set sql -%}\n\n     alter {{ relation.type }} {{ relation.render() }}\n\n            {% for column in add_columns %}\n               add column {{ column.quoted }} {{ column.expanded_data_type }}{{ ',' if not loop.last }}\n            {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n            {% for column in remove_columns %}\n                drop column {{ column.quoted }}{{ ',' if not loop.last }}\n            {% endfor %}\n\n  {%- endset -%}\n\n  {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8875074, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n  {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8884227, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n    {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.888646, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n  {#-- This ensures microbatch batches get unique temp relations to avoid clobbering --#}\n  {% if suffix == '__dbt_tmp' and model.batch %}\n    {% set suffix = suffix ~ '_' ~ model.batch.id %}\n  {% endif %}\n\n  {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.889122, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n    {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n    {%- set temp_relation = base_relation.incorporate(\n                                path={\"identifier\": temp_identifier}) -%}\n\n    {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.889481, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n    {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8897936, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n    {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n    {%- set backup_relation = base_relation.incorporate(\n                                  path={\"identifier\": backup_identifier},\n                                  type=backup_relation_type\n    ) -%}\n    {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8901842, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n  {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8904033, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n  {% call statement('truncate_relation') -%}\n    truncate table {{ relation.render() }}\n  {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8906395, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n  {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8910859, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n  {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n  {% if target_relation %}\n    {% do return([true, target_relation]) %}\n  {% endif %}\n\n  {%- set new_relation = api.Relation.create(\n      database=database,\n      schema=schema,\n      identifier=identifier,\n      type=type\n  ) -%}\n  {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8917797, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n  {% do return(adapter.get_relation(\n    database=relation.database,\n    schema=relation.schema,\n    identifier=relation.identifier\n  )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.892068, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n    {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8922417, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n  {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8930333, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n  {{ exceptions.raise_not_implemented(\n    'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8932562, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n  {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8935027, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n  {{ exceptions.raise_not_implemented(\n    'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8937223, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n  {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.894049, "supported_languages": null}, "macro.dbt.validate_doc_columns": {"name": "validate_doc_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.validate_doc_columns", "macro_sql": "{% macro validate_doc_columns(relation, column_dict, existing_column_names) %}\n  {% set existing_lower = existing_column_names | map(\"lower\") | list %}\n  {% set missing = [] %}\n  {% for col_name in column_dict %}\n    {% if col_name | lower not in existing_lower %}\n      {% do missing.append(col_name) %}\n    {% endif %}\n  {% endfor %}\n  {% if missing | length > 0 %}\n    {{ exceptions.warn(\"In relation \" ~ relation.render() ~ \": The following columns are specified in the schema but are not present in the database: \" ~ missing | join(\", \")) }}\n  {% endif %}\n  {% set filtered = {} %}\n  {% for col_name in column_dict if col_name | lower in existing_lower %}\n    {% do filtered.update({col_name: column_dict[col_name]}) %}\n  {% endfor %}\n  {{ return(filtered) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8951485, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n  {% if for_relation and config.persist_relation_docs() and model.description %}\n    {% do run_query(alter_relation_comment(relation, model.description)) %}\n  {% endif %}\n\n  {% if for_columns and config.persist_column_docs() and model.columns %}\n    {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n    {% set filtered_columns = validate_doc_columns(relation, model.columns, existing_columns) %}\n    {% set alter_comment_sql = alter_column_comment(relation, filtered_columns) %}\n    {% if alter_comment_sql and alter_comment_sql | trim | length > 0 %}\n      {% do run_query(alter_comment_sql) %}\n    {% endif %}\n  {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.validate_doc_columns", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.896161, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n    {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8976016, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n    {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8977594, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n    {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8979647, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n    {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8981044, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n    {% if not existing_relation %}\n        {#-- The table doesn't already exist, so no grants to copy over --#}\n        {{ return(False) }}\n    {% elif full_refresh_mode %}\n        {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n        {{ return(copy_grants()) }}\n    {% else %}\n        {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n        {{ return(True) }}\n    {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8985267, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n    {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8987663, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n    show grants on {{ relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8989189, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n    {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8991868, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n    grant {{ privilege }} on {{ relation.render() }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.899439, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n    {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8997204, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n    revoke {{ privilege }} on {{ relation.render() }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.8999698, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n    {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.900239, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n    {#\n      -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n      -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n      -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n      -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n    #}\n    {%- set dcl_statements = [] -%}\n    {%- for privilege, grantees in grant_config.items() %}\n        {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n          {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n          {%- do dcl_statements.append(dcl) -%}\n        {%- else -%}\n          {%- for grantee in grantees -%}\n              {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n              {%- do dcl_statements.append(dcl) -%}\n          {% endfor -%}\n        {%- endif -%}\n    {%- endfor -%}\n    {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.901088, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n    {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.901326, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n    {#\n      -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n      -- so that they're all processed together.\n\n      -- Some databases do not support this. Those adapters will need to override this macro\n      -- to run each statement individually.\n    #}\n    {% call statement('grants') %}\n        {% for dcl_statement in dcl_statement_list %}\n            {{ dcl_statement }};\n        {% endfor %}\n    {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9016423, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n    {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.902077, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n    {#-- If grant_config is {} or None, this is a no-op --#}\n    {% if grant_config %}\n        {% if should_revoke %}\n            {#-- We think previous grants may have carried over --#}\n            {#-- Show current grants and calculate diffs --#}\n            {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n            {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n            {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n            {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n            {% if not (needs_granting or needs_revoking) %}\n                {{ log('On ' ~ relation.render() ~': All grants are in place, no revocation or granting needed.')}}\n            {% endif %}\n        {% else %}\n            {#-- We don't think there's any chance of previous grants having carried over. --#}\n            {#-- Jump straight to granting what the user has configured. --#}\n            {% set needs_revoking = {} %}\n            {% set needs_granting = grant_config %}\n        {% endif %}\n        {% if needs_granting or needs_revoking %}\n            {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n            {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n            {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n            {% if dcl_statement_list %}\n                {{ call_dcl_statements(dcl_statement_list) }}\n            {% endif %}\n        {% endif %}\n    {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9035308, "supported_languages": null}, "macro.dbt.get_show_sql": {"name": "get_show_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_show_sql", "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n  {%- if sql_header is not none -%}\n  {{ sql_header }}\n  {%- endif %}\n  {{ get_limit_subquery_sql(compiled_code, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9040625, "supported_languages": null}, "macro.dbt.get_limit_subquery_sql": {"name": "get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_limit_subquery_sql", "macro_sql": "\n{%- macro get_limit_subquery_sql(sql, limit) -%}\n  {{ adapter.dispatch('get_limit_sql', 'dbt')(sql, limit) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_limit_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9042962, "supported_languages": null}, "macro.dbt.default__get_limit_sql": {"name": "default__get_limit_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.default__get_limit_sql", "macro_sql": "{% macro default__get_limit_sql(sql, limit) %}\n  {{ sql }}\n  {% if limit is not none %}\n  limit {{ limit }}\n  {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9045298, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n    {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.905121, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n  {{ exceptions.raise_not_implemented(\n    'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9053097, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n    {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.905484, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n    {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9056258, "supported_languages": null}, "macro.dbt.get_snapshot_get_time_data_type": {"name": "get_snapshot_get_time_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.get_snapshot_get_time_data_type", "macro_sql": "{% macro get_snapshot_get_time_data_type() %}\n    {% set snapshot_time = adapter.dispatch('snapshot_get_time', 'dbt')() %}\n    {% set time_data_type_sql = 'select ' ~ snapshot_time ~ ' as dbt_snapshot_time' %}\n    {% set snapshot_time_column_schema = get_column_schema_from_query(time_data_type_sql) %}\n    {% set time_data_type = snapshot_time_column_schema[0].dtype %}\n    {{ return(time_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt_postgres.postgres__snapshot_get_time", "macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.906128, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n    {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.906335, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n    current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9064322, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n    {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9066422, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n    {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.906845, "supported_languages": null}, "macro.dbt.get_catalog_relations": {"name": "get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_relations", "macro_sql": "{% macro get_catalog_relations(information_schema, relations) -%}\n  {{ return(adapter.dispatch('get_catalog_relations', 'dbt')(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9078794, "supported_languages": null}, "macro.dbt.default__get_catalog_relations": {"name": "default__get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_relations", "macro_sql": "{% macro default__get_catalog_relations(information_schema, relations) -%}\n  {% set typename = adapter.type() %}\n  {% set msg -%}\n    get_catalog_relations not implemented for {{ typename }}\n  {%- endset %}\n\n  {{ exceptions.raise_compiler_error(msg) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.908202, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n  {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.908441, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n  {% set typename = adapter.type() %}\n  {% set msg -%}\n    get_catalog not implemented for {{ typename }}\n  {%- endset %}\n\n  {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9087634, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n  {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9089818, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n  {%- if database -%}\n    {{ database }}.INFORMATION_SCHEMA\n  {%- else -%}\n    INFORMATION_SCHEMA\n  {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9091752, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n  {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9093895, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n  {% set sql %}\n    select distinct schema_name\n    from {{ information_schema_name(database) }}.SCHEMATA\n    where catalog_name ilike '{{ database }}'\n  {% endset %}\n  {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.909693, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n  {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9099395, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n  {% set sql -%}\n        select count(*)\n        from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n        where catalog_name='{{ information_schema.database }}'\n          and schema_name='{{ schema }}'\n  {%- endset %}\n  {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9102952, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n  {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9105167, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n  {{ exceptions.raise_not_implemented(\n    'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9107318, "supported_languages": null}, "macro.dbt.get_catalog_for_single_relation": {"name": "get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_for_single_relation", "macro_sql": "{% macro get_catalog_for_single_relation(relation) %}\n  {{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_catalog_for_single_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9109538, "supported_languages": null}, "macro.dbt.default__get_catalog_for_single_relation": {"name": "default__get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_for_single_relation", "macro_sql": "{% macro default__get_catalog_for_single_relation(relation) %}\n  {{ exceptions.raise_not_implemented(\n    'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.911286, "supported_languages": null}, "macro.dbt.get_relations": {"name": "get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relations", "macro_sql": "{% macro get_relations() %}\n  {{ return(adapter.dispatch('get_relations', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9114876, "supported_languages": null}, "macro.dbt.default__get_relations": {"name": "default__get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relations", "macro_sql": "{% macro default__get_relations() %}\n  {{ exceptions.raise_not_implemented(\n    'get_relations macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.911688, "supported_languages": null}, "macro.dbt.get_relation_last_modified": {"name": "get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relation_last_modified", "macro_sql": "{% macro get_relation_last_modified(information_schema, relations) %}\n  {{ return(adapter.dispatch('get_relation_last_modified', 'dbt')(information_schema, relations)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_relation_last_modified"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9119332, "supported_languages": null}, "macro.dbt.default__get_relation_last_modified": {"name": "default__get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relation_last_modified", "macro_sql": "{% macro default__get_relation_last_modified(information_schema, relations) %}\n  {{ exceptions.raise_not_implemented(\n    'get_relation_last_modified macro not implemented for adapter ' + adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9121387, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n    {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n    {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9127152, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n    {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n    {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.913031, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n    {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n    {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.913407, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n    {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n    {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9137828, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n  {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9142506, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n    {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9147177, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n  {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9153862, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')'  %}\n\n{% if group_by_columns|length() > 0 %}\n  {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n  {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n    select \n\n      {{ select_gb_cols }}\n      {% if ignore_time_component %}\n        cast(max({{ field }}) as date) as most_recent\n      {%- else %}\n        max({{ field }}) as most_recent\n      {%- endif %}\n\n    from {{ model }}\n\n    {{ groupby_gb_cols }}\n\n)\n\nselect\n\n    {{ select_gb_cols }}\n    most_recent,\n    {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.916424, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n  {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9171777, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n  {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n  {% set join_gb_cols %}\n    {% for c in group_by_columns %}\n      and a.{{c}} = b.{{c}}\n    {% endfor %}\n  {% endset %}\n  {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n    select \n      {{select_gb_cols}}\n      1 as id_dbtutils_test_fewer_rows_than,\n      count(*) as count_our_model \n    from {{ model }}\n    {{ groupby_gb_cols }}\n\n),\nb as (\n\n    select \n      {{select_gb_cols}}\n      1 as id_dbtutils_test_fewer_rows_than,\n      count(*) as count_comparison_model \n    from {{ compare_model }}\n    {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n    select\n\n        {% for c in group_by_columns -%}\n          a.{{c}} as {{c}}_a,\n          b.{{c}} as {{c}}_b,\n        {% endfor %}\n\n        count_our_model,\n        count_comparison_model\n    from a\n    full join b on \n    a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n    {{ join_gb_cols }}\n\n),\nfinal as (\n\n    select *,\n        case\n            -- fail the test if we have more rows than the reference model and return the row count delta\n            when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n            -- fail the test if they are the same number\n            when count_our_model = count_comparison_model then 1\n            -- pass the test if the delta is positive (i.e. return the number 0)\n            else 0\n    end as row_count_delta\n    from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9184692, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n    {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9190087, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n  {{ column_name }},\n  count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n  {{ field }},\n  count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n  select *\n  from table_a\n  {{ dbt.except() }}\n  select *\n  from table_b\n),\n\nexcept_b as (\n  select *\n  from table_b\n  {{ dbt.except() }}\n  select *\n  from table_a\n),\n\nunioned as (\n  select *\n  from except_a\n  union all\n  select *\n  from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9194446, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n  {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9200501, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n  select\n    {{column_name}} as id\n\n  from {{model}}\n\n  where {{column_name}} is not null\n    and {{from_condition}}\n\n),\n\nright_table as (\n\n  select\n    {{field}} as id\n\n  from {{to}}\n\n  where {{field}} is not null\n    and {{to_condition}}\n\n),\n\nexceptions as (\n\n  select\n    left_table.id,\n    right_table.id as right_id\n\n  from left_table\n\n  left join right_table\n         on left_table.id = right_table.id\n\n  where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9204817, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n  {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9211793, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n  {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n  {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n    select\n        {{ select_gb_cols }}\n        {{ column_name }},\n        lag({{ column_name }}) over (\n            {{partition_gb_cols}}\n            order by {{ column_name }}\n        ) as {{ previous_column_name }}\n    from {{ model }}\n),\n\nvalidation_errors as (\n    select\n        *\n    from windowed\n    {% if datepart %}\n    where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n    {% else %}\n    where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n    {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.922335, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n  {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9229178, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n  {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n  {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n  select\n    {{select_gb_cols}}\n    sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as {{ dbt.type_numeric() }}) as not_null_proportion\n  from {{ model }}\n  {{groupby_gb_cols}}\n),\nvalidation_errors as (\n  select\n    {{select_gb_cols}}\n    not_null_proportion\n  from validation\n  where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n  *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9239645, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n  {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns, exclude_columns, precision)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9254425, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n\n{%- if compare_columns and exclude_columns -%}\n    {{ exceptions.raise_compiler_error(\"Both a compare and an ignore list were provided to the `equality` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set set_diff %}\n    count(*) + coalesce(abs(\n        sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n        sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n    ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n    {{ return('') }}\n{% endif %}\n\n\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{# Ensure there are no extra columns in the compare_model vs model #}\n{%- if not compare_columns -%}\n    {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n    {%- do dbt_utils._is_ephemeral(compare_model, 'test_equality') -%}\n\n    {%- set model_columns = adapter.get_columns_in_relation(model) -%}\n    {%- set compare_model_columns = adapter.get_columns_in_relation(compare_model) -%}\n\n\n    {%- if exclude_columns -%}\n        {#-- Lower case ignore columns for easier comparison --#}\n        {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n        {# Filter out the excluded columns #}\n        {%- set include_columns = [] %}\n        {%- set include_model_columns = [] %}\n        {%- for column in model_columns -%}\n            {%- if column.name | lower not in exclude_columns -%}\n                {% do include_columns.append(column) %}\n            {%- endif %}\n        {%- endfor %}\n        {%- for column in compare_model_columns -%}\n            {%- if column.name | lower not in exclude_columns -%}\n                {% do include_model_columns.append(column) %}\n            {%- endif %}\n        {%- endfor %}\n\n        {%- set compare_columns_set = set(include_columns | map(attribute='quoted') | map(\"lower\")) %}\n        {%- set compare_model_columns_set = set(include_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n    {%- else -%}\n        {%- set compare_columns_set = set(model_columns | map(attribute='quoted') | map(\"lower\")) %}\n        {%- set compare_model_columns_set = set(compare_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n    {%- endif -%}\n\n    {% if compare_columns_set != compare_model_columns_set %}\n        {{ exceptions.raise_compiler_error(compare_model ~\" has less columns than \" ~ model ~ \", please ensure they have the same columns or use the `compare_columns` or `exclude_columns` arguments to subset them.\") }}\n    {% endif %}\n\n\n{% endif %}\n\n{%- if not precision -%}\n    {%- if not compare_columns -%}\n        {# \n            You cannot get the columns in an ephemeral model (due to not existing in the information schema),\n            so if the user does not provide an explicit list of columns we must error in the case it is ephemeral\n        #}\n        {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n        {%- set compare_columns = adapter.get_columns_in_relation(model)-%}\n\n        {%- if exclude_columns -%}\n            {#-- Lower case ignore columns for easier comparison --#}\n            {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n            {# Filter out the excluded columns #}\n            {%- set include_columns = [] %}\n            {%- for column in compare_columns -%}\n                {%- if column.name | lower not in exclude_columns -%}\n                    {% do include_columns.append(column) %}\n                {%- endif %}\n            {%- endfor %}\n\n            {%- set compare_columns = include_columns | map(attribute='quoted') %}\n        {%- else -%} {# Compare columns provided #}\n            {%- set compare_columns = compare_columns | map(attribute='quoted') %}\n        {%- endif -%}\n    {%- endif -%}\n\n    {% set compare_cols_csv = compare_columns | join(', ') %}\n\n{% else %} {# Precision required #}\n    {#-\n        If rounding is required, we need to get the types, so it cannot be ephemeral even if they provide column names\n    -#}\n    {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n    {%- set columns = adapter.get_columns_in_relation(model) -%}\n\n    {% set columns_list = [] %}\n    {%- for col in columns -%}\n        {%- if (\n                (col.name|lower in compare_columns|map('lower') or not compare_columns) and\n                (col.name|lower not in exclude_columns|map('lower') or not exclude_columns)\n                ) -%}\n            {# Databricks double type is not picked up by any number type checks in dbt #}\n            {%- if col.is_float() or col.is_numeric() or col.data_type == 'double' -%}\n                {# Cast is required due to postgres not having round for a double precision number #}\n                {%- do columns_list.append('round(cast(' ~ col.quoted ~ ' as ' ~ dbt.type_numeric() ~ '),' ~ precision ~ ') as ' ~ col.quoted) -%}\n            {%- else -%} {# Non-numeric type #}\n                {%- do columns_list.append(col.quoted) -%}\n            {%- endif -%}\n        {% endif %}\n    {%- endfor -%}\n\n    {% set compare_cols_csv = columns_list | join(', ') %}\n\n{% endif %}\n\nwith a as (\n\n    select * from {{ model }}\n\n),\n\nb as (\n\n    select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n    select {{compare_cols_csv}} from a\n    {{ dbt.except() }}\n    select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n    select {{compare_cols_csv}} from b\n    {{ dbt.except() }}\n    select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n    select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n    union all\n    select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_numeric", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9306505, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n  {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.931486, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n    {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n  {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n  {% set join_gb_cols %}\n    {% for c in group_by_columns %}\n      and a.{{c}} = b.{{c}}\n    {% endfor %}\n  {% endset %}\n  {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n    select \n      {{select_gb_cols}}\n      1 as id_dbtutils_test_equal_rowcount,\n      count(*) as count_a \n    from {{ model }}\n    {{groupby_gb_cols}}\n\n\n),\nb as (\n\n    select \n      {{select_gb_cols}}\n      1 as id_dbtutils_test_equal_rowcount,\n      count(*) as count_b \n    from {{ compare_model }}\n    {{groupby_gb_cols}}\n\n),\nfinal as (\n\n    select\n    \n        {% for c in group_by_columns -%}\n          a.{{c}} as {{c}}_a,\n          b.{{c}} as {{c}}_b,\n        {% endfor %}\n\n        count_a,\n        count_b,\n        abs(count_a - count_b) as diff_count\n\n    from a\n    full join b\n    on\n    a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n    {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.932884, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n  {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.933454, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n    {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n    {%- set column_list=[] %}\n        {% for column in combination_of_columns -%}\n            {% set column_list = column_list.append( adapter.quote(column) ) %}\n        {%- endfor %}\n{% else %}\n    {{ exceptions.raise_compiler_error(\n        \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n    ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n    select\n        {{ columns_csv }}\n    from {{ model }}\n    group by {{ columns_csv }}\n    having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9342794, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n  {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9349267, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n  select *\n  from {{ model }}\n),\n\nvalidation_errors as (\n  select *\n  from meet_condition\n  where\n    -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n    1 = 2\n\n  {%- if min_value is not none %}\n    -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n    or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n  {%- endif %}\n\n  {%- if max_value is not none %}\n    -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n    or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n  {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9355426, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n  {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.936091, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n    select distinct\n        {{ column_name }} as value_field\n\n    from {{ model }}\n\n),\n\nvalidation_errors as (\n\n    select\n        value_field\n\n    from all_values\n    where value_field in (\n        {% for value in values -%}\n            {% if quote -%}\n            '{{ value }}'\n            {%- else -%}\n            {{ value }}\n            {%- endif -%}\n            {%- if not loop.last -%},{%- endif %}\n        {%- endfor %}\n        )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9365985, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n  {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9371104, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n  {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n  {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n    {# In TSQL, subquery aggregate columns need aliases #}\n    {# thus: a filler col name, 'filler_column' #}\n    {{select_gb_cols}}\n    count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n  {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.937704, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n  {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9381738, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n    with\n    \n    all_values as (\n\n        select \n\n\n            {% if trim_whitespace == true -%}\n\n                trim({{ column_name }}) as {{ column_name }}\n\n            {%- else -%}\n\n                {{ column_name }}\n\n            {%- endif %}\n            \n        from {{ model }}\n\n    ),\n\n    errors as (\n\n        select * from all_values\n        where {{ column_name }} = ''\n\n    )\n\n    select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.938552, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n  {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.939169, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n  {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n  {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n  {% set pruned_cols = group_by_columns %}\n\n  {% if column_name not in pruned_cols %}\n    {% do pruned_cols.append(column_name) %}\n  {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n    with pruned_rows as (\n      select\n        {{ select_pruned_cols }}\n      from {{ model }}\n      {% if group_by_columns|length() == 0 %}\n        where {{ column_name }} is not null\n        limit 1\n      {% endif %}\n    )\n    select\n        {# In TSQL, subquery aggregate columns need aliases #}\n        {# thus: a filler col name, 'filler_column' #}\n      {{select_gb_cols}}\n      count({{ column_name }}) as filler_column\n\n    from pruned_rows\n\n    {{groupby_gb_cols}}\n\n    having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9403825, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n  {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9415188, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n    {% set allow_gaps_operator='=' %}\n    {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n    {% set allow_gaps_operator='<=' %}\n    {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n    {% set allow_gaps_operator='<' %}\n    {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n    {{ exceptions.raise_compiler_error(\n        \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n    ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n    {% set allow_zero_length_operator='<' %}\n    {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n    {% set allow_zero_length_operator='<=' %}\n    {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n    {{ exceptions.raise_compiler_error(\n        \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n    ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n    select\n        {% if partition_by %}\n        {{ partition_by }} as partition_by_col,\n        {% endif %}\n        {{ lower_bound_column }} as lower_bound,\n        {{ upper_bound_column }} as upper_bound,\n\n        lead({{ lower_bound_column }}) over (\n            {{ partition_clause }}\n            order by {{ lower_bound_column }}, {{ upper_bound_column }}\n        ) as next_lower_bound,\n\n        row_number() over (\n            {{ partition_clause }}\n            order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n        ) = 1 as is_last_record\n\n    from {{ model }}\n\n),\n\ncalc as (\n    -- We want to return records where one of our assumptions fails, so we'll use\n    -- the `not` function with `and` statements so we can write our assumptions more cleanly\n    select\n        *,\n\n        -- For each record: lower_bound should be < upper_bound.\n        -- Coalesce it to return an error on the null case (implicit assumption\n        -- these columns are not_null)\n        coalesce(\n            lower_bound {{ allow_zero_length_operator }} upper_bound,\n            false\n        ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n        -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n        -- Coalesce it to handle null cases for the last record.\n        coalesce(\n            upper_bound {{ allow_gaps_operator }} next_lower_bound,\n            is_last_record,\n            false\n        ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n    from window_functions\n\n),\n\nvalidation_errors as (\n\n    select\n        *\n    from calc\n\n    where not(\n        -- THE FOLLOWING SHOULD BE TRUE --\n        lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n        and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n    )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9434423, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n    {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9439454, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n    {%- set default_null_value = \"\" -%}\n{%- else -%}\n    {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n    {%- do fields.append(\n        \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value  ~\"')\"\n    ) -%}\n\n    {%- if not loop.last %}\n        {%- do fields.append(\"'-'\") -%}\n    {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9447486, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n    {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9456737, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n    {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n    {%- if not execute -%}\n        {% set default = [] if not default %}\n        {{ return(default) }}\n    {% endif %}\n\n    {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n    {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n    {# TODO: Change the method signature in a future 0.x.0 release #}\n    {%- set target_relation = table -%}\n\n    {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n    {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n    {%- call statement('get_column_values', fetch_result=true) %}\n\n        {%- if not relation_exists and default is none -%}\n\n          {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n        {%- elif not relation_exists and default is not none -%}\n\n          {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n          {{ return(default) }}\n\n        {%- else -%}\n\n\n            select\n                {{ column }} as value\n\n            from {{ target_relation }}\n\n            {% if where is not none %}\n            where {{ where }}\n            {% endif %}\n\n            group by {{ column }}\n            order by {{ order_by }}\n\n            {% if max_records is not none %}\n            limit {{ max_records }}\n            {% endif %}\n\n        {% endif %}\n\n    {%- endcall -%}\n\n    {%- set value_list = load_result('get_column_values') -%}\n\n    {%- if value_list and value_list['data'] -%}\n        {%- set values = value_list['data'] | map(attribute=0) | list %}\n        {{ return(values) }}\n    {%- else -%}\n        {{ return(default) }}\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9476905, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n  {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9482722, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n    {% set bin_size -%}\n    (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n    {%- endset %}\n    (\n        -- to break ties when the amount is eaxtly at the bucket egde\n        case\n            when\n                mod(\n                    {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n                    {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n                ) = 0\n            then 1\n            else 0\n        end\n    ) +\n      -- Anything over max_value goes the N+1 bucket\n    least(\n        ceil(\n            ({{ expr }} - {{ min_value }})/{{ bin_size }}\n        ),\n        {{ num_buckets }} + 1\n    )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9488657, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n    width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9491062, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n    {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.949732, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n    {%- call statement('get_intervals_between', fetch_result=True) %}\n\n        select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n    {%- endcall -%}\n\n    {%- set value_list = load_result('get_intervals_between') -%}\n\n    {%- if value_list and value_list['data'] -%}\n        {%- set values = value_list['data'] | map(attribute=0) | list %}\n        {{ return(values[0]) }}\n    {%- else -%}\n        {{ return(1) }}\n    {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9504647, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n    {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9507697, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n    \"day\",\n    \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n    \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n    {{dbt_utils.generate_series(\n        dbt_utils.get_intervals_between(start_date, end_date, datepart)\n    )}}\n\n),\n\nall_periods as (\n\n    select (\n        {{\n            dbt.dateadd(\n                datepart,\n                \"row_number() over (order by 1) - 1\",\n                start_date\n            )\n        }}\n    ) as date_{{datepart}}\n    from rawdata\n\n),\n\nfiltered as (\n\n    select *\n    from all_periods\n    where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.951215, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n    {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9516265, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n    {% if col.is_string() -%}\n\n    nullif({{col.name}},'') as {{col.name}}\n\n    {%- else -%}\n\n    {{col.name}}\n\n    {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9520588, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n    {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.952419, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n  {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n  {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n  {% set cols = adapter.get_columns_in_relation(relation) %}\n\n  select {{ dbt_utils.nullcheck(cols) }}\n  from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9528563, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n    {% set frustrating_jinja_feature = varargs %}\n    {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9532762, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9535854, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n    {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9549007, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n    {%- if exclude and include -%}\n        {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n    {%- endif -%}\n\n    {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n    {%- if not execute %}\n        {{ return('') }}\n    {% endif -%}\n\n    {%- set column_override = column_override if column_override is not none else {} -%}\n\n    {%- set relation_columns = {} -%}\n    {%- set column_superset = {} -%}\n    {%- set all_excludes = [] -%}\n    {%- set all_includes = [] -%}\n\n    {%- if exclude -%}\n        {%- for exc in exclude -%}\n            {%- do all_excludes.append(exc | lower) -%}\n        {%- endfor -%}\n    {%- endif -%}\n\n    {%- if include -%}\n        {%- for inc in include -%}\n            {%- do all_includes.append(inc | lower) -%}\n        {%- endfor -%}\n    {%- endif -%}\n\n    {%- for relation in relations -%}\n\n        {%- do relation_columns.update({relation: []}) -%}\n\n        {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n        {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n        {%- set cols = adapter.get_columns_in_relation(relation) -%}\n        {%- for col in cols -%}\n\n        {#- If an exclude list was provided and the column is in the list, do nothing -#}\n        {%- if exclude and col.column | lower in all_excludes -%}\n\n        {#- If an include list was provided and the column is not in the list, do nothing -#}\n        {%- elif include and col.column | lower not in all_includes -%}\n\n        {#- Otherwise add the column to the column superset -#}\n        {%- else -%}\n\n            {#- update the list of columns in this relation -#}\n            {%- do relation_columns[relation].append(col.column) -%}\n\n            {%- if col.column in column_superset -%}\n\n                {%- set stored = column_superset[col.column] -%}\n                {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n                    {%- do column_superset.update({col.column: col}) -%}\n\n                {%- endif %}\n\n            {%- else -%}\n\n                {%- do column_superset.update({col.column: col}) -%}\n\n            {%- endif -%}\n\n        {%- endif -%}\n\n        {%- endfor -%}\n    {%- endfor -%}\n\n    {%- set ordered_column_names = column_superset.keys() -%}\n    {%- set dbt_command = flags.WHICH -%}\n\n\n    {% if dbt_command in ['run', 'build'] %}\n    {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n        {%- set relations_string -%}\n            {%- for relation in relations -%}\n                {{ relation.name }}\n            {%- if not loop.last %}, {% endif -%}\n            {%- endfor -%}\n        {%- endset -%}\n\n        {%- set error_message -%}\n            There were no columns found to union for relations {{ relations_string }}\n        {%- endset -%}\n\n        {{ exceptions.raise_compiler_error(error_message) }}\n    {%- endif -%}\n    {%- endif -%}\n\n    {%- for relation in relations %}\n\n        (\n            select\n\n                {%- if source_column_name is not none %}\n                cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n                {%- endif %}\n\n                {% for col_name in ordered_column_names -%}\n\n                    {%- set col = column_superset[col_name] %}\n                    {%- set col_type = column_override.get(col.column, col.data_type) %}\n                    {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n                    cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n                {%- endfor %}\n\n            from {{ relation }}\n\n            {% if where -%}\n            where {{ where }}\n            {%- endif %}\n        )\n\n        {% if not loop.last -%}\n            union all\n        {% endif -%}\n\n    {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9593084, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n    {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.960282, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n    {%- do dbt_utils._is_relation(from, 'star') -%}\r\n    {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n    {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n    {%- if not execute -%}\r\n        {% do return('*') %}\r\n    {%- endif -%}\r\n\r\n    {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n    {%- if cols|length <= 0 -%}\r\n        {% if flags.WHICH == 'compile' %}\r\n            {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet \r\nor all columns were excluded. This star is only output during  \r\ndbt compile, and exists to keep SQLFluff happy. */\r\n            {% endset %}\r\n            {% do return(response) %}\r\n        {% else %}\r\n            {% do return(\"/* no columns returned from star() macro */\") %}\r\n        {% endif %}\r\n    {%- else -%}\r\n        {%- for col in cols %}\r\n            {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n                {%- if quote_identifiers -%}\r\n                    {{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n                {%- else -%}\r\n                    {{ col|trim }} {%- if prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n                {% endif %}\r\n            {%- if not loop.last %},{{ '\\n  ' }}{%- endif -%}\r\n        {%- endfor -%}\r\n    {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.962038, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n    {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9625444, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n    {{ dbt_utils.get_tables_by_pattern_sql(\n        schema_pattern = schema,\n        table_pattern = prefix ~ '%',\n        exclude = exclude,\n        database = database\n    ) }}\n    \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9629223, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n    {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9635122, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n    {%- call statement('get_tables', fetch_result=True) %}\n\n      {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n    {%- endcall -%}\n\n    {%- set table_list = load_result('get_tables') -%}\n\n    {%- if table_list and table_list['table'] -%}\n        {%- set tbl_relations = [] -%}\n        {%- for row in table_list['table'] -%}\n            {%- set tbl_relation = api.Relation.create(\n                database=database,\n                schema=row.table_schema,\n                identifier=row.table_name,\n                type=row.table_type\n            ) -%}\n            {%- do tbl_relations.append(tbl_relation) -%}\n        {%- endfor -%}\n\n        {{ return(tbl_relations) }}\n    {%- else -%}\n        {{ return([]) }}\n    {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9645636, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n  {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.964931, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n    ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9651008, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n    {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9656072, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n    {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n        {{ query }}\n\n    {%- endcall -%}\n\n    {%- if execute -%}\n\n        {% set r = load_result('get_query_result').table.columns[0].values() %}\n        {% if r | length == 0 %}\n            {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n            {% set sql_result = default %}\n        {% else %}\n            {% set sql_result = r[0] %}\n        {% endif %}\n        \n    {%- else -%}\n    \n        {% set sql_result = default %}\n    \n    {%- endif -%}\n\n    {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9665248, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n    {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9669185, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n  group by {% for i in range(1, n + 1) -%}\n      {{ i }}{{ ',' if not loop.last }}   \n   {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9672391, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n    {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9676793, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n    {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n        {{ query }}\n\n    {%- endcall -%}\n\n    {% set sql_results={} %}\n\n    {%- if execute -%}\n        {% set sql_results_table = load_result('get_query_results').table.columns %}\n        {% for column_name, column in sql_results_table.items() %}\n            {% do sql_results.update({column_name: column.values()}) %}\n        {% endfor %}\n    {%- endif -%}\n\n    {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9684215, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n    {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, quote_identifiers)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9694417, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n\n    {% if not relation %}\n        {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n    {% endif %}\n\n  {%- set exclude = exclude if exclude is not none else [] %}\n  {%- set remove = remove if remove is not none else [] %}\n\n  {%- set include_cols = [] %}\n\n  {%- set table_columns = {} %}\n\n  {%- do table_columns.update({relation: []}) %}\n\n  {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n  {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n  {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n  {%- for col in cols -%}\n    {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n      {% do include_cols.append(col) %}\n    {%- endif %}\n  {%- endfor %}\n\n\n  {%- for col in include_cols -%}\n    {%- set current_col_name = adapter.quote(col.column) if quote_identifiers else col.column -%}\n    select\n      {%- for exclude_col in exclude %}\n        {{ adapter.quote(exclude_col) if quote_identifiers else exclude_col }},\n      {%- endfor %}\n\n      cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ adapter.quote(field_name) if quote_identifiers else field_name  }},\n      cast(  {% if col.data_type == 'boolean' %}\n           {{ dbt.cast_bool_to_text(current_col_name) }}\n             {% else %}\n           {{ current_col_name }}\n             {% endif %}\n           as {{ cast_to }}) as {{ adapter.quote(value_name) if quote_identifiers else value_name }}\n\n    from {{ relation }}\n\n    {% if not loop.last -%}\n      union all\n    {% endif -%}\n  {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9717598, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n    {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9722092, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n    {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n  ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9729, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n    {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9734113, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n    {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n    {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n    {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n    {%- if not execute -%}\n        {{ return('') }}\n    {% endif %}\n\n    {%- set include_cols = [] %}\n    {%- set cols = adapter.get_columns_in_relation(from) -%}\n    {%- set except = except | map(\"lower\") | list %}\n    {%- for col in cols -%}\n        {%- if col.column|lower not in except -%}\n            {% do include_cols.append(col.column) %}\n        {%- endif %}\n    {%- endfor %}\n\n    {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9743073, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n    acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9748955, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n    {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9752393, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n    {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n    {% set conversion_rate = 1.60934 %}\n{% else %}\n    {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n    2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n    cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n    power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.975964, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n    {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n    {% set conversion_rate = 1.60934 %}\n{% else %}\n    {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n    2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n    cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n    power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.977157, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n               values,\n               alias=True,\n               agg='sum',\n               cmp='=',\n               prefix='',\n               suffix='',\n               then_value=1,\n               else_value=0,\n               quote_identifiers=True,\n               distinct=False) %}\n    {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.978213, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n               values,\n               alias=True,\n               agg='sum',\n               cmp='=',\n               prefix='',\n               suffix='',\n               then_value=1,\n               else_value=0,\n               quote_identifiers=True,\n               distinct=False) %}\n  {% for value in values %}\n    {{ agg }}(\n      {% if distinct %} distinct {% endif %}\n      case\n      when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n        then {{ then_value }}\n      else {{ else_value }}\n      end\n    )\n    {% if alias %}\n      {% if quote_identifiers %}\n            as {{ adapter.quote(prefix ~ value ~ suffix) }}\n      {% else %}\n        as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n      {% endif %}\n    {% endif %}\n    {% if not loop.last %},{% endif %}\n  {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.979263, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n    {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9798844, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n    {%- call statement('get_tables', fetch_result=True) %}\n\n      {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n    {%- endcall -%}\n\n    {%- set table_list = load_result('get_tables') -%}\n\n    {%- if table_list and table_list['table'] -%}\n        {%- set tbl_relations = [] -%}\n        {%- for row in table_list['table'] -%}\n            {%- set tbl_relation = api.Relation.create(\n                database=database,\n                schema=row.table_schema,\n                identifier=row.table_name,\n                type=row.table_type\n            ) -%}\n            {%- do tbl_relations.append(tbl_relation) -%}\n        {%- endfor -%}\n\n        {{ return(tbl_relations) }}\n    {%- else -%}\n        {{ return([]) }}\n    {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9809415, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n    {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9815178, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n    {% if upper_bound <= 0 %}\n    {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n    {% endif %}\n\n    {% for _ in range(1, 100) %}\n       {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n    {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9820645, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n    {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9823, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n    {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n    with p as (\n        select 0 as generated_number union all select 1\n    ), unioned as (\n\n    select\n\n    {% for i in range(n) %}\n    p{{i}}.generated_number * power(2, {{i}})\n    {% if not loop.last %} + {% endif %}\n    {% endfor %}\n    + 1\n    as generated_number\n\n    from\n\n    {% for i in range(n) %}\n    p as p{{i}}\n    {% if not loop.last %} cross join {% endif %}\n    {% endfor %}\n\n    )\n\n    select *\n    from unioned\n    where generated_number <= {{upper_bound}}\n    order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9829562, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n  {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9833696, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n            case table_type\n                when 'BASE TABLE' then 'table'\n                when 'EXTERNAL TABLE' then 'external'\n                when 'MATERIALIZED VIEW' then 'materializedview'\n                else lower(table_type)\n            end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9835489, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n            case table_type\n                when 'BASE TABLE' then 'table'\n                when 'FOREIGN' then 'external'\n                when 'MATERIALIZED VIEW' then 'materializedview'\n                else lower(table_type)\n            end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9837346, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n            case table_type\n                when 'MANAGED' then 'table'\n                when 'BASE TABLE' then 'table'\n                when 'MATERIALIZED VIEW' then 'materializedview'\n                else lower(table_type)\n            end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.983905, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n    {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9846666, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n    with row_numbered as (\n        select\n            _inner.*,\n            row_number() over (\n                partition by {{ partition_by }}\n                order by {{ order_by }}\n            ) as rn\n        from {{ relation }} as _inner\n    )\n\n    select\n        distinct data.*\n    from {{ relation }} as data\n    {#\n    -- Not all DBs will support natural joins but the ones that do include:\n    -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n    -- Apache Spark, SingleStore, Vertica\n    -- Those that do not appear to support natural joins include:\n    -- SQLServer, Trino, Presto, Rockset, Athena\n    #}\n    natural join row_numbered\n    where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9849555, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n    select *\n    from {{ relation }} as tt\n    qualify\n        row_number() over (\n            partition by {{ partition_by }}\n            order by {{ order_by }}\n        ) = 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9851696, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n    select\n        distinct on ({{ partition_by }}) *\n    from {{ relation }}\n    order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9854062, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n    select *\n    from {{ relation }}\n    qualify\n        row_number() over (\n            partition by {{ partition_by }}\n            order by {{ order_by }}\n        ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9856284, "supported_languages": null}, "macro.dbt_utils.databricks__deduplicate": {"name": "databricks__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.databricks__deduplicate", "macro_sql": "\n{%- macro databricks__deduplicate(relation, partition_by, order_by) -%}\n\n    select *\n    from {{ relation }}\n    qualify\n        row_number() over (\n            partition by {{ partition_by }}\n            order by {{ order_by }}\n        ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9858384, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n    select unique.*\n    from (\n        select\n            array_agg (\n                original\n                order by {{ order_by }}\n                limit 1\n            )[offset(0)] unique\n        from {{ relation }} original\n        group by {{ partition_by }}\n    )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9860518, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n    {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9864645, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n    {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n  ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.987153, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n    {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n        (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.988284, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n        select distinct\n            table_schema as {{ adapter.quote('table_schema') }},\n            table_name as {{ adapter.quote('table_name') }},\n            {{ dbt_utils.get_table_types_sql() }}\n        from {{ database }}.information_schema.tables\n        where table_schema ilike '{{ schema_pattern }}'\n        and table_name ilike '{{ table_pattern }}'\n        and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9887726, "supported_languages": null}, "macro.dbt_utils.redshift__get_tables_by_pattern_sql": {"name": "redshift__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.redshift__get_tables_by_pattern_sql", "macro_sql": "{% macro redshift__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n    {% set sql %}\n        select distinct\n            table_schema as {{ adapter.quote('table_schema') }},\n            table_name as {{ adapter.quote('table_name') }},\n            {{ dbt_utils.get_table_types_sql() }}\n        from \"{{ database }}\".\"information_schema\".\"tables\"\n        where table_schema ilike '{{ schema_pattern }}'\n        and table_name ilike '{{ table_pattern }}'\n        and table_name not ilike '{{ exclude }}'\n        union all\n        select distinct\n            schemaname as {{ adapter.quote('table_schema') }},\n            tablename as {{ adapter.quote('table_name') }},\n            'external' as {{ adapter.quote('table_type') }}\n        from svv_external_tables\n        where redshift_database_name = '{{ database }}'\n        and schemaname ilike '{{ schema_pattern }}'\n        and table_name ilike '{{ table_pattern }}'\n        and table_name not ilike '{{ exclude }}'\n    {% endset %}\n\n    {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9897761, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n    {% if '%' in schema_pattern %}\n        {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n    {% else %}\n        {% set schemata=[schema_pattern] %}\n    {% endif %}\n\n    {% set sql %}\n        {% for schema in schemata %}\n            select distinct\n                table_schema,\n                table_name,\n                {{ dbt_utils.get_table_types_sql() }}\n\n            from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n            where lower(table_name) like lower ('{{ table_pattern }}')\n                and lower(table_name) not like lower ('{{ exclude }}')\n\n            {% if not loop.last %} union all {% endif %}\n\n        {% endfor %}\n    {% endset %}\n\n    {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9906921, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n    {% if execute %}\n\n        {% set sql %}\n        select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n        where lower(schema_name) like lower('{{ schema_pattern }}')\n        {% endset %}\n\n        {% set results=run_query(sql) %}\n\n        {% set schemata=results.columns['schema_name'].values() %}\n\n        {{ return(schemata) }}\n\n    {% else %}\n\n        {{ return([]) }}\n\n    {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9913118, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n    {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9917183, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n    dbt.split_part(\n        dbt.split_part(\n            dbt.replace(\n                dbt.replace(\n                    dbt.replace(field, \"'android-app://'\", \"''\"\n                    ), \"'http://'\", \"''\"\n                ), \"'https://'\", \"''\"\n            ), \"'/'\", 1\n        ), \"'?'\", 1\n    )\n\n-%}\n\n\n    {{ dbt.safe_cast(\n        parsed,\n        dbt.type_string()\n        )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9923952, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n    {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9928906, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n    {%- set stripped_url =\n        dbt.replace(\n            dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n    -%}\n\n    {%- set first_slash_pos -%}\n        coalesce(\n            nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n            {{ dbt.position(\"'?'\", stripped_url) }} - 1\n            )\n    {%- endset -%}\n\n    {%- set parsed_path =\n        dbt.split_part(\n            dbt.right(\n                stripped_url,\n                dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n                ),\n            \"'?'\", 1\n            )\n    -%}\n\n    {{ dbt.safe_cast(\n        parsed_path,\n        dbt.type_string()\n    )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9937108, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n    {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.994099, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9945, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n    {%- if obj.is_cte -%}\n        {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n        {% if obj.name.startswith(ephemeral_prefix) %}\n            {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n        {% else %}\n            {% set model_name = obj.name %}\n        {%- endif -%}\n        {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n        {% endset %}\n        {%- do exceptions.raise_compiler_error(error_message) -%}\n    {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.995422, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n    {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n        {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n    {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9959917, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{% if not string %}\n{{ return('') }}\n{% endif %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9969609, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n    {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9972992, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n    {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9975076, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n    {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9978342, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n    {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9980426, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n    {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.998373, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n    {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1775621418.9986248, "supported_languages": null}}, "docs": {"doc.tamanu.fhir__table__practitioners": {"name": "fhir__table__practitioners", "resource_type": "doc", "package_name": "tamanu", "path": "practitioners.md", "original_file_path": "../../database/model/fhir/practitioners.md", "unique_id": "doc.tamanu.fhir__table__practitioners", "block_contents": "FHIR data about practitioners.\n\nThese are materialised from `public.users`.\n\nThis is mostly a stub resource that other, more clinically relevant, resources reference.\n\n<https://www.hl7.org/fhir/practitioner.html>"}, "doc.tamanu.fhir__practitioners__identifier": {"name": "fhir__practitioners__identifier", "resource_type": "doc", "package_name": "tamanu", "path": "practitioners.md", "original_file_path": "../../database/model/fhir/practitioners.md", "unique_id": "doc.tamanu.fhir__practitioners__identifier", "block_contents": "One or more identifiers:\n\n- The Tamanu internal UUID for the user\n- The Tamanu Display ID for the user, if present"}, "doc.tamanu.fhir__practitioners__name": {"name": "fhir__practitioners__name", "resource_type": "doc", "package_name": "tamanu", "path": "practitioners.md", "original_file_path": "../../database/model/fhir/practitioners.md", "unique_id": "doc.tamanu.fhir__practitioners__name", "block_contents": "The display name of the practitioner."}, "doc.tamanu.fhir__practitioners__telecom": {"name": "fhir__practitioners__telecom", "resource_type": "doc", "package_name": "tamanu", "path": "practitioners.md", "original_file_path": "../../database/model/fhir/practitioners.md", "unique_id": "doc.tamanu.fhir__practitioners__telecom", "block_contents": "The practitioner's email."}, "doc.tamanu.fhir__table__patients": {"name": "fhir__table__patients", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__table__patients", "block_contents": "FHIR data about patients.\n\n<https://www.hl7.org/fhir/patient.html>"}, "doc.tamanu.fhir__patients__identifier": {"name": "fhir__patients__identifier", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__identifier", "block_contents": "One or more identifiers for a patient:\n\n- Tamanu Display ID or NHN (always)\n- Passport number (if present)\n- Driving licence number (if present)"}, "doc.tamanu.fhir__patients__active": {"name": "fhir__patients__active", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__active", "block_contents": "Whether this patient record is in active use.\n\nThis is computed from the `visibility_status` and `deleted_at` columns on `public.patients`."}, "doc.tamanu.fhir__patients__name": {"name": "fhir__patients__name", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__name", "block_contents": "One or more names:\n\n- the patient's official name (always)\n- the patient's cultural name or nickname (if present)"}, "doc.tamanu.fhir__patients__telecom": {"name": "fhir__patients__telecom", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__telecom", "block_contents": "Phone numbers for the patient, if available."}, "doc.tamanu.fhir__patients__gender": {"name": "fhir__patients__gender", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__gender", "block_contents": "Gender marker.\n\nThis is usually `male` or `female`, but may be something else if other values are allowed in Tamanu."}, "doc.tamanu.fhir__patients__birth_date": {"name": "fhir__patients__birth_date", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__birth_date", "block_contents": "Date of birth for the patient.\n\nGenerally present but not guaranteed."}, "doc.tamanu.fhir__patients__deceased_date_time": {"name": "fhir__patients__deceased_date_time", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__deceased_date_time", "block_contents": "Date of death, if deceased."}, "doc.tamanu.fhir__patients__address": {"name": "fhir__patients__address", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__address", "block_contents": "Home address for the patient, if available."}, "doc.tamanu.fhir__patients__link": {"name": "fhir__patients__link", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__link", "block_contents": "If the resource is for a merged or mergee patient record, this will link other instances of the patient.\n\nA record that:\n\n- was merged into another record, will have a `type=replaced-by` link;\n- has records that were merged into it, will have one or more `type=replaces` links;\n- has records that were merged into _ancestors_, will have one or more `type=seealso` links."}, "doc.tamanu.fhir__patients__extension": {"name": "fhir__patients__extension", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/fhir/patients.md", "unique_id": "doc.tamanu.fhir__patients__extension", "block_contents": "If enabled, the ethnicity of the patient, as per the New Zealand FHIR ethnicity extension or\nderivations thereof: <https://build.fhir.org/ig/HL7NZ/nzbase/branches/master/StructureDefinition-nz-ethnicity.html>."}, "doc.tamanu.fhir__table__encounters": {"name": "fhir__table__encounters", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__table__encounters", "block_contents": "FHIR data about encounters.\n\n\"Encounter\" means an interaction between a patient and a healthcare provider, for health services or\nwhen assessing the health status of the patient. Encounters are in the present and the past; future\ninteractions are typically called \"Appointments.\"\n\nThese are materialised from `public.encounters`.\n\n<https://www.hl7.org/fhir/encounter.html>"}, "doc.tamanu.fhir__encounters__status": {"name": "fhir__encounters__status", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__encounters__status", "block_contents": "The status of the encounter.\n\nIn Tamanu this can be one of two values:\n\n- in-progress (for current or open encounters)\n- discharged"}, "doc.tamanu.fhir__encounters__class": {"name": "fhir__encounters__class", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__encounters__class", "block_contents": "The general classification of the encounter.\n\nThis is a complex type but in Tamanu represents only one of these three classes (or absent):\n\n- IMP (inpatient)\n- EMER (emergency)\n- OBSENC (observation)"}, "doc.tamanu.fhir__encounters__actual_period": {"name": "fhir__encounters__actual_period", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__encounters__actual_period", "block_contents": "The start and end (if present) dates of the encounter."}, "doc.tamanu.fhir__encounters__subject": {"name": "fhir__encounters__subject", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__encounters__subject", "block_contents": "Reference to the [patient](#!/source/source.tamanu.fhir__tamanu.patients) involved in the encounter."}, "doc.tamanu.fhir__encounters__location": {"name": "fhir__encounters__location", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__encounters__location", "block_contents": "The location of the encounter.\n\nThis is a complex type which encodes many bits of information about the location, such as its name\nand internal ID, physical type, and status. Additionally there are two locations per encounter, one\ndescribing the ward or general hospital area, and one describing the bed or specific place within\nthat area."}, "doc.tamanu.fhir__encounters__service_provider": {"name": "fhir__encounters__service_provider", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/fhir/encounters.md", "unique_id": "doc.tamanu.fhir__encounters__service_provider", "block_contents": "Reference to the [facility](#!/source/source.tamanu.fhir__tamanu.facilities) where the encounter is\ntaking place."}, "doc.tamanu.fhir__table__organizations": {"name": "fhir__table__organizations", "resource_type": "doc", "package_name": "tamanu", "path": "organizations.md", "original_file_path": "../../database/model/fhir/organizations.md", "unique_id": "doc.tamanu.fhir__table__organizations", "block_contents": "FHIR data about organizations.\n\nThese are materialised from `public.facilities`.\n\nThis is mostly a stub resource that other, more clinically relevant, resources reference.\n\n<https://www.hl7.org/fhir/organization.html>"}, "doc.tamanu.fhir__organizations__identifier": {"name": "fhir__organizations__identifier", "resource_type": "doc", "package_name": "tamanu", "path": "organizations.md", "original_file_path": "../../database/model/fhir/organizations.md", "unique_id": "doc.tamanu.fhir__organizations__identifier", "block_contents": "The facility's code."}, "doc.tamanu.fhir__organizations__name": {"name": "fhir__organizations__name", "resource_type": "doc", "package_name": "tamanu", "path": "organizations.md", "original_file_path": "../../database/model/fhir/organizations.md", "unique_id": "doc.tamanu.fhir__organizations__name", "block_contents": "The facility's name."}, "doc.tamanu.fhir__organizations__active": {"name": "fhir__organizations__active", "resource_type": "doc", "package_name": "tamanu", "path": "organizations.md", "original_file_path": "../../database/model/fhir/organizations.md", "unique_id": "doc.tamanu.fhir__organizations__active", "block_contents": "Whether the facility is active.\n\nThis is materialised from `visibility_status`."}, "doc.tamanu.fhir__table__service_requests": {"name": "fhir__table__service_requests", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__table__service_requests", "block_contents": "FHIR data about service requests, which cover both laboratories and imaging.\n\n<https://www.hl7.org/fhir/servicerequest.html>"}, "doc.tamanu.fhir__service_requests__identifier": {"name": "fhir__service_requests__identifier", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__identifier", "block_contents": "Two identifiers:\n\n- The Tamanu internal UUID of the lab or imaging request.\n- The Tamanu Display ID of the lab or imaging request."}, "doc.tamanu.fhir__service_requests__status": {"name": "fhir__service_requests__status", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__status", "block_contents": "The processing status of the request as a normalized string.\n\nPossible values: `draft`, `active`, `on-hold`, `revoked`, `completed`, `entered-in-error`, `unknown`."}, "doc.tamanu.fhir__service_requests__intent": {"name": "fhir__service_requests__intent", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__intent", "block_contents": "The intent of the request.\n\nThis is meant to encode planned/proposed requests, but Tamanu doesn't yet have this concept, so it\nis always the single value `order`."}, "doc.tamanu.fhir__service_requests__category": {"name": "fhir__service_requests__category", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__category", "block_contents": "The SNOMED category of the request.\n\n- Always 363679005 for imaging\n- Always 108252007 for laboratory"}, "doc.tamanu.fhir__service_requests__priority": {"name": "fhir__service_requests__priority", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__priority", "block_contents": "The priority of the request, normalized.\n\nTamanu priorities are fully customisable, to accommodate a wide range of clinical practices.\nHowever this means there is no obvious way to map priorities to the FHIR set. It is an\nadministrator's responsibility to ensure the set of priorities in a Tamanu deployment matches usage.\nAs a stopgap, Tamanu priorities which do not match one of the FHIR priorities (`routine`, `urgent`,\n`asap`, `stat`) are encoded as `null`."}, "doc.tamanu.fhir__service_requests__order_detail": {"name": "fhir__service_requests__order_detail", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__order_detail", "block_contents": "Coded description of the order.\n\nFor imaging this is the areas to the imaged, for labs these are the tests to be run."}, "doc.tamanu.fhir__service_requests__location_code": {"name": "fhir__service_requests__location_code", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__location_code", "block_contents": "Name of the facility for the request.\n\nThis is the most precise location available taken from a number of sources relating to the request."}, "doc.tamanu.fhir__service_requests__code": {"name": "fhir__service_requests__code", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__code", "block_contents": "Coded description of the service requested.\n\nFor labs this is the code of a test panel, if available."}, "doc.tamanu.fhir__service_requests__subject": {"name": "fhir__service_requests__subject", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__subject", "block_contents": "Reference to the [patient](#!/source/source.tamanu.fhir__tamanu.patients) this service request\nconcerns."}, "doc.tamanu.fhir__service_requests__requester": {"name": "fhir__service_requests__requester", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__requester", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.fhir__tamanu.practitioners) who requested\nthis."}, "doc.tamanu.fhir__service_requests__occurrence_date_time": {"name": "fhir__service_requests__occurrence_date_time", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__occurrence_date_time", "block_contents": "When this request should be actioned, if available."}, "doc.tamanu.fhir__service_requests__encounter": {"name": "fhir__service_requests__encounter", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__encounter", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.fhir__tamanu.encounters) this service request\nconcerns."}, "doc.tamanu.fhir__service_requests__note": {"name": "fhir__service_requests__note", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__note", "block_contents": "Any comments made about the request.\n\nFor imaging, this may be orientation notes or other clinically-relevant annotations."}, "doc.tamanu.fhir__service_requests__specimen": {"name": "fhir__service_requests__specimen", "resource_type": "doc", "package_name": "tamanu", "path": "service_requests.md", "original_file_path": "../../database/model/fhir/service_requests.md", "unique_id": "doc.tamanu.fhir__service_requests__specimen", "block_contents": "Reference to an optional specimen attachment."}, "doc.tamanu.fhir__table__non_fhir_medici_report": {"name": "fhir__table__non_fhir_medici_report", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__table__non_fhir_medici_report", "block_contents": "This is a hack specifically to provide an integration (Medici) with a custom endpoint.\n\nIt has nothing to do with FHIR but reuses the FHIR API infrastructure for convenience.\n\nDo not use outside of this integration's context."}, "doc.tamanu.fhir__non_fhir_medici_report__patient_id": {"name": "fhir__non_fhir_medici_report__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__patient_id", "block_contents": "UUID of the patient."}, "doc.tamanu.fhir__non_fhir_medici_report__first_name": {"name": "fhir__non_fhir_medici_report__first_name", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__first_name", "block_contents": "First name of the patient."}, "doc.tamanu.fhir__non_fhir_medici_report__last_name": {"name": "fhir__non_fhir_medici_report__last_name", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__last_name", "block_contents": "Last name of the patient."}, "doc.tamanu.fhir__non_fhir_medici_report__date_of_birth": {"name": "fhir__non_fhir_medici_report__date_of_birth", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__date_of_birth", "block_contents": "Patient date of birth."}, "doc.tamanu.fhir__non_fhir_medici_report__age": {"name": "fhir__non_fhir_medici_report__age", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__age", "block_contents": "Patient age."}, "doc.tamanu.fhir__non_fhir_medici_report__sex": {"name": "fhir__non_fhir_medici_report__sex", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__sex", "block_contents": "Patient sex."}, "doc.tamanu.fhir__non_fhir_medici_report__patient_billing_id": {"name": "fhir__non_fhir_medici_report__patient_billing_id", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__patient_billing_id", "block_contents": "Billing ID for Medici purposes."}, "doc.tamanu.fhir__non_fhir_medici_report__patient_billing_type": {"name": "fhir__non_fhir_medici_report__patient_billing_type", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__patient_billing_type", "block_contents": "Medici billing type."}, "doc.tamanu.fhir__non_fhir_medici_report__encounter_id": {"name": "fhir__non_fhir_medici_report__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__encounter_id", "block_contents": "UUID of the encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__encounter_start_date": {"name": "fhir__non_fhir_medici_report__encounter_start_date", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__encounter_start_date", "block_contents": "Start date of the encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__encounter_end_date": {"name": "fhir__non_fhir_medici_report__encounter_end_date", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__encounter_end_date", "block_contents": "End date of the encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__discharge_date": {"name": "fhir__non_fhir_medici_report__discharge_date", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__discharge_date", "block_contents": "Discharge date of the encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__encounter_type": {"name": "fhir__non_fhir_medici_report__encounter_type", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__encounter_type", "block_contents": "Type of the encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__weight": {"name": "fhir__non_fhir_medici_report__weight", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__weight", "block_contents": "Patient weight."}, "doc.tamanu.fhir__non_fhir_medici_report__visit_type": {"name": "fhir__non_fhir_medici_report__visit_type", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__visit_type", "block_contents": "Encounter visit type."}, "doc.tamanu.fhir__non_fhir_medici_report__episode_end_status": {"name": "fhir__non_fhir_medici_report__episode_end_status", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__episode_end_status", "block_contents": "Status at end of encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__encounter_discharge_disposition": {"name": "fhir__non_fhir_medici_report__encounter_discharge_disposition", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__encounter_discharge_disposition", "block_contents": "Discharge disposition."}, "doc.tamanu.fhir__non_fhir_medici_report__triage_category": {"name": "fhir__non_fhir_medici_report__triage_category", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__triage_category", "block_contents": "Triage category."}, "doc.tamanu.fhir__non_fhir_medici_report__wait_time": {"name": "fhir__non_fhir_medici_report__wait_time", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__wait_time", "block_contents": "Wait time."}, "doc.tamanu.fhir__non_fhir_medici_report__departments": {"name": "fhir__non_fhir_medici_report__departments", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__departments", "block_contents": "Departments involved."}, "doc.tamanu.fhir__non_fhir_medici_report__locations": {"name": "fhir__non_fhir_medici_report__locations", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__locations", "block_contents": "Locations involved."}, "doc.tamanu.fhir__non_fhir_medici_report__reason_for_encounter": {"name": "fhir__non_fhir_medici_report__reason_for_encounter", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__reason_for_encounter", "block_contents": "Reason for encounter."}, "doc.tamanu.fhir__non_fhir_medici_report__diagnoses": {"name": "fhir__non_fhir_medici_report__diagnoses", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__diagnoses", "block_contents": "Diagnoses made."}, "doc.tamanu.fhir__non_fhir_medici_report__medications": {"name": "fhir__non_fhir_medici_report__medications", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__medications", "block_contents": "Medications prescribed."}, "doc.tamanu.fhir__non_fhir_medici_report__vaccinations": {"name": "fhir__non_fhir_medici_report__vaccinations", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__vaccinations", "block_contents": "Vaccinations done."}, "doc.tamanu.fhir__non_fhir_medici_report__procedures": {"name": "fhir__non_fhir_medici_report__procedures", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__procedures", "block_contents": "Procedures done."}, "doc.tamanu.fhir__non_fhir_medici_report__lab_requests": {"name": "fhir__non_fhir_medici_report__lab_requests", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__lab_requests", "block_contents": "Labs requested."}, "doc.tamanu.fhir__non_fhir_medici_report__imaging_requests": {"name": "fhir__non_fhir_medici_report__imaging_requests", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__imaging_requests", "block_contents": "Imagings requested."}, "doc.tamanu.fhir__non_fhir_medici_report__notes": {"name": "fhir__non_fhir_medici_report__notes", "resource_type": "doc", "package_name": "tamanu", "path": "non_fhir_medici_report.md", "original_file_path": "../../database/model/fhir/non_fhir_medici_report.md", "unique_id": "doc.tamanu.fhir__non_fhir_medici_report__notes", "block_contents": "Any associated notes and comments."}, "doc.tamanu.fhir__generic__schema": {"name": "fhir__generic__schema", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__schema", "block_contents": "Contains materialised FHIR resources.\n\nFHIR resources in Tamanu are generated (\"materialised\") from the source tables in the public schema.\nThis materialisation process collapses the relational database model into a flatter hierarchical\nresource model, according to the FHIR specification. Tamanu's FHIR API is then implemented as a thin\nquery and presentation layer on top of this materialised data. Every top-level field in a FHIR\nresource that we support is expressed as a column in the corresponding FHIR resource table. Scalar\ndata is expressed directly, and complex data is encoded as JSONB."}, "doc.tamanu.fhir__generic__id": {"name": "fhir__generic__id", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__id", "block_contents": "FHIR resource identifier"}, "doc.tamanu.fhir__generic__version_id": {"name": "fhir__generic__version_id", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__version_id", "block_contents": "FHIR resource version identifier\n\nThis is not currently used in any way."}, "doc.tamanu.fhir__generic__upstream_id": {"name": "fhir__generic__upstream_id", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__upstream_id", "block_contents": "Identifier of the row in the public schema that is the upstream source of this FHIR resource"}, "doc.tamanu.fhir__generic__last_updated": {"name": "fhir__generic__last_updated", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__last_updated", "block_contents": "Timestamp of when this FHIR resource was last materialised."}, "doc.tamanu.fhir__generic__is_live": {"name": "fhir__generic__is_live", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__is_live", "block_contents": "Whether or not a FHIR resource is live. If a resource is not live, it won't be rematerialised if upstream changes are made."}, "doc.tamanu.fhir__generic__resolved": {"name": "fhir__generic__resolved", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/fhir/generic.md", "unique_id": "doc.tamanu.fhir__generic__resolved", "block_contents": "If this FHIR resource has resolved all of its references to other resources."}, "doc.tamanu.fhir__table__job_workers": {"name": "fhir__table__job_workers", "resource_type": "doc", "package_name": "tamanu", "path": "job_workers.md", "original_file_path": "../../database/model/fhir/job_workers.md", "unique_id": "doc.tamanu.fhir__table__job_workers", "block_contents": "Worker registry for the FHIR job queue.\n\nSee the `fhir.jobs` table for more.\n\nFor workers to grab jobs from the queue, they first must register. Once a worker has registered, it\nmust \"heartbeat\" regularly by calling `job_worker_heartbeat()`. The recommended heartbeat time is\n1/10th of the timeout, which is defined in the `public.settings` table at\n`key=fhir.worker.assumeDroppedAfter`. A worker may also voluntarily deregister (e.g. during a\ngraceful shutdown).\n\nWhen a worker fails to heartbeat for longer than the timeout, or when it deregisters, it is\nconsidered \"not alive\". Jobs which were grabbed by a dead or no-longer-registered worker are\nconsidered \"dropped\" i.e. back in the pool for other workers to grab.\n\nThis provides a system which is robust against restarts and failures without requiring a central\ndaemon to track and manage worker state, nor persistent connections from the workers (which is how\nGearman works).\n\nThe function `job_worker_garbage_collect()` should be called occasionally (e.g. once a day) to clean\nout the table of dead workers.\n\nWorker management is done via SQL functions: `job_worker_register()`, `job_worker_heartbeat()`,\n`job_worker_deregister()`, `job_worker_garbage_collect()`. Additionally there's the querying\nfunction `job_worker_is_alive()`.\n\nThis provides the possibility of decoupling part or whole of the job system from the Tamanu JS/TS\ncodebase, while retaining identical handling."}, "doc.tamanu.fhir__job_workers__created_at": {"name": "fhir__job_workers__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "job_workers.md", "original_file_path": "../../database/model/fhir/job_workers.md", "unique_id": "doc.tamanu.fhir__job_workers__created_at", "block_contents": "When the worker registered itself."}, "doc.tamanu.fhir__job_workers__updated_at": {"name": "fhir__job_workers__updated_at", "resource_type": "doc", "package_name": "tamanu", "path": "job_workers.md", "original_file_path": "../../database/model/fhir/job_workers.md", "unique_id": "doc.tamanu.fhir__job_workers__updated_at", "block_contents": "Always set to `created_at`."}, "doc.tamanu.fhir__job_workers__deleted_at": {"name": "fhir__job_workers__deleted_at", "resource_type": "doc", "package_name": "tamanu", "path": "job_workers.md", "original_file_path": "../../database/model/fhir/job_workers.md", "unique_id": "doc.tamanu.fhir__job_workers__deleted_at", "block_contents": "Unused: deregistered and dead workers are hard-deleted instead."}, "doc.tamanu.fhir__job_workers__metadata": {"name": "fhir__job_workers__metadata", "resource_type": "doc", "package_name": "tamanu", "path": "job_workers.md", "original_file_path": "../../database/model/fhir/job_workers.md", "unique_id": "doc.tamanu.fhir__job_workers__metadata", "block_contents": "Arbitrary debugging information about the worker."}, "doc.tamanu.fhir__table__immunizations": {"name": "fhir__table__immunizations", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__table__immunizations", "block_contents": "FHIR data about immunization (vaccines).\n\nCurrently this resource is focused around COVID-19 use.\n\nThese are materialised from `public.administered_vaccines`.\n\n<https://www.hl7.org/fhir/immunization.html>"}, "doc.tamanu.fhir__immunizations__status": {"name": "fhir__immunizations__status", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__status", "block_contents": "Normalized status code for the vaccination.\n\nTamanu has a larger set of values for vaccine status than FHIR, so a reduced mapping is done. One of:\n\n- completed\n- entered-in-error\n- not-done"}, "doc.tamanu.fhir__immunizations__vaccine_code": {"name": "fhir__immunizations__vaccine_code", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__vaccine_code", "block_contents": "The name of the vaccine drug given, optionally accompanied by a coding for select medicines.\n\nA subset of [the AIRV register](https://www.healthterminologies.gov.au/integration/R4/fhir/ValueSet/australian-immunisation-register-vaccine-1) is supported."}, "doc.tamanu.fhir__immunizations__patient": {"name": "fhir__immunizations__patient", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__patient", "block_contents": "Reference to the [patient](#!/source/source.tamanu.fhir__tamanu.patients) to whom this vaccination\nconcerns."}, "doc.tamanu.fhir__immunizations__encounter": {"name": "fhir__immunizations__encounter", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__encounter", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.fhir__tamanu.encounters) encompassing this\nvaccination event.\n\nIn Tamanu, vaccinations can be given outside of an open encounter; this is encoded as an encounter\nbeing recorded solely for the one vaccination, and immediately closed."}, "doc.tamanu.fhir__immunizations__occurrence_date_time": {"name": "fhir__immunizations__occurrence_date_time", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__occurrence_date_time", "block_contents": "Timestamp recording when the vaccine was given."}, "doc.tamanu.fhir__immunizations__lot_number": {"name": "fhir__immunizations__lot_number", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__lot_number", "block_contents": "Lot number of the vaccine vial."}, "doc.tamanu.fhir__immunizations__site": {"name": "fhir__immunizations__site", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__site", "block_contents": "Body area where the vaccine was given."}, "doc.tamanu.fhir__immunizations__performer": {"name": "fhir__immunizations__performer", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__performer", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.fhir__tamanu.users) who administered the\nvaccination."}, "doc.tamanu.fhir__immunizations__protocol_applied": {"name": "fhir__immunizations__protocol_applied", "resource_type": "doc", "package_name": "tamanu", "path": "immunizations.md", "original_file_path": "../../database/model/fhir/immunizations.md", "unique_id": "doc.tamanu.fhir__immunizations__protocol_applied", "block_contents": "Label of the vaccine dose given."}, "doc.tamanu.fhir__table__specimens": {"name": "fhir__table__specimens", "resource_type": "doc", "package_name": "tamanu", "path": "specimens.md", "original_file_path": "../../database/model/fhir/specimens.md", "unique_id": "doc.tamanu.fhir__table__specimens", "block_contents": "FHIR data about specimen, for laboratory testing.\n\n<https://www.hl7.org/fhir/specimen.html>"}, "doc.tamanu.fhir__specimens__collection": {"name": "fhir__specimens__collection", "resource_type": "doc", "package_name": "tamanu", "path": "specimens.md", "original_file_path": "../../database/model/fhir/specimens.md", "unique_id": "doc.tamanu.fhir__specimens__collection", "block_contents": "Who collected the specimen, from where, and at what time."}, "doc.tamanu.fhir__specimens__request": {"name": "fhir__specimens__request", "resource_type": "doc", "package_name": "tamanu", "path": "specimens.md", "original_file_path": "../../database/model/fhir/specimens.md", "unique_id": "doc.tamanu.fhir__specimens__request", "block_contents": "Reference to the [service request](#!/source/source.tamanu.fhir__tamanu.service_requests) this\nspecimen is for."}, "doc.tamanu.fhir__specimens__type": {"name": "fhir__specimens__type", "resource_type": "doc", "package_name": "tamanu", "path": "specimens.md", "original_file_path": "../../database/model/fhir/specimens.md", "unique_id": "doc.tamanu.fhir__specimens__type", "block_contents": "Coded type of the specimen.\n\nThese codes are from Reference Data `type=specimenType`."}, "doc.tamanu.fhir__table__medication_requests": {"name": "fhir__table__medication_requests", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__table__medication_requests", "block_contents": "FHIR data about medication requests, used for pharmacy orders integration.\n\n<https://www.hl7.org/fhir/medicationrequest.html>"}, "doc.tamanu.fhir__medication_requests__identifier": {"name": "fhir__medication_requests__identifier", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__identifier", "block_contents": "Single identifier which maps to the id of the pharmacy_order_prescription which is the upstream of this medication request."}, "doc.tamanu.fhir__medication_requests__status": {"name": "fhir__medication_requests__status", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__status", "block_contents": "Status of the request. Always `active` for now."}, "doc.tamanu.fhir__medication_requests__intent": {"name": "fhir__medication_requests__intent", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__intent", "block_contents": "Intent of the request. Always `order` for now."}, "doc.tamanu.fhir__medication_requests__group_identifier": {"name": "fhir__medication_requests__group_identifier", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__group_identifier", "block_contents": "Identifier that links multiple medication_requests that came from the same pharmacy_order. Maps to the pharmacy_order id."}, "doc.tamanu.fhir__medication_requests__subject": {"name": "fhir__medication_requests__subject", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__subject", "block_contents": "FHIR reference to the Patient that this medication_request is for."}, "doc.tamanu.fhir__medication_requests__encounter": {"name": "fhir__medication_requests__encounter", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__encounter", "block_contents": "FHIR reference to the Encounter that this medication_request was created in."}, "doc.tamanu.fhir__medication_requests__medication": {"name": "fhir__medication_requests__medication", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__medication", "block_contents": "Drug that is being requested. Uses mSupply universal code mapping."}, "doc.tamanu.fhir__medication_requests__authored_on": {"name": "fhir__medication_requests__authored_on", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__authored_on", "block_contents": "Date the request was ordered."}, "doc.tamanu.fhir__medication_requests__requester": {"name": "fhir__medication_requests__requester", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__requester", "block_contents": "FHIR reference to the Organization that this medication_request is requested by."}, "doc.tamanu.fhir__medication_requests__recorder": {"name": "fhir__medication_requests__recorder", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__recorder", "block_contents": "FHIR reference to the Practitioner that ordered this medication_request."}, "doc.tamanu.fhir__medication_requests__note": {"name": "fhir__medication_requests__note", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__note", "block_contents": "Comments attached to the request."}, "doc.tamanu.fhir__medication_requests__dosage_instruction": {"name": "fhir__medication_requests__dosage_instruction", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__dosage_instruction", "block_contents": "Information about the dosage and instructions for taking the medication."}, "doc.tamanu.fhir__medication_requests__dispense_request": {"name": "fhir__medication_requests__dispense_request", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__dispense_request", "block_contents": "Information about the quantity of the medication to be dispensed and the number of repeats."}, "doc.tamanu.fhir__medication_requests__category": {"name": "fhir__medication_requests__category", "resource_type": "doc", "package_name": "tamanu", "path": "medication_requests.md", "original_file_path": "../../database/model/fhir/medication_requests.md", "unique_id": "doc.tamanu.fhir__medication_requests__category", "block_contents": "The type of medication usage. Currently will only be present as 'discharge' if its a discharge prescription."}, "doc.tamanu.fhir__table__jobs": {"name": "fhir__table__jobs", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__table__jobs", "block_contents": "Job queue for FHIR materialization.\n\nMaterialization for FHIR is handled by jobs issued on a queue (this table) and processed by workers.\nError state is preserved, but successful jobs are discarded.\n\nThe job system was loosely based on <https://gearman.org/>: it supports multiple workers, timeouts,\nconcurrency and uniqueness control, arbitrary payloads, and flexible prioritisation. Differences\ninclude an integer priority instead of (high, normal, low) and the lack of return values.\n\nJob management is done via SQL functions: `job_submit()`, `job_start()`, `job_complete()`,\n`job_fail()`, `job_grab()`. Some additional functions are used for debugging: `job_backlog()`.\n\nThis provides the possibility of decoupling part or whole of the job system from the Tamanu JS/TS\ncodebase, while retaining identical handling."}, "doc.tamanu.fhir__jobs__created_at": {"name": "fhir__jobs__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__created_at", "block_contents": "When the job was inserted into the queue."}, "doc.tamanu.fhir__jobs__updated_at": {"name": "fhir__jobs__updated_at", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__updated_at", "block_contents": "When the job was updated (mostly due to status changes)."}, "doc.tamanu.fhir__jobs__deleted_at": {"name": "fhir__jobs__deleted_at", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__deleted_at", "block_contents": "Unused: successful jobs are hard-deleted instead."}, "doc.tamanu.fhir__jobs__priority": {"name": "fhir__jobs__priority", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__priority", "block_contents": "Integer priority of the job. Higher numbers win.\n\nThe default is 1000.\n\nConvention is to use hundreds in code (e.g. 1500 for \"higher priority\") and then increase/decrease\nby tens or lower for manual priority management (e.g. 1010 to manually bump some jobs up)."}, "doc.tamanu.fhir__jobs__status": {"name": "fhir__jobs__status", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__status", "block_contents": "Lifecycle status of the job.\n\n1. Starts at `Queued`\n2. A worker grabs the job from the backlog, which transitions it to `Grabbed`\n3. The worker starts working the job, transitioning it to `Started`\n4. The worker completes the job, which deletes it from the queue\n5. Or the worker fails the job, which sets its status to `Errored`\n6. Or the worker drops the job, which puts it back into the backlog.\n\nThe backlog is defined as jobs that are `Queued` and/or that are `Grabbed`/`Started` but where the\nrecorded grabbing worker is \"no longer alive\" -- which occurs after a heartbeat timeout. See the\n`fhir.job_workers` table."}, "doc.tamanu.fhir__jobs__worker_id": {"name": "fhir__jobs__worker_id", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__worker_id", "block_contents": "ID of the worker which has grabbed this job for processing."}, "doc.tamanu.fhir__jobs__started_at": {"name": "fhir__jobs__started_at", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__started_at", "block_contents": "Timestamp when the worker started processing the job.\n\nThis may be a while after the job is grabbed, though in general it's pretty immediate."}, "doc.tamanu.fhir__jobs__completed_at": {"name": "fhir__jobs__completed_at", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__completed_at", "block_contents": "When the job was completed.\n\nRarely used as completed jobs are hard-deleted."}, "doc.tamanu.fhir__jobs__errored_at": {"name": "fhir__jobs__errored_at", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__errored_at", "block_contents": "When the job failed.\n\nThis implies that `status=Errored` and the `error` field is not null."}, "doc.tamanu.fhir__jobs__error": {"name": "fhir__jobs__error", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__error", "block_contents": "Description or stack trace of the error which caused the job to fail."}, "doc.tamanu.fhir__jobs__topic": {"name": "fhir__jobs__topic", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__topic", "block_contents": "Jobs are organised along topics.\n\nThis is used to route jobs to job handlers.\n\nA worker can choose which topics it will handle, and have different concurrency settings per topic.\n\nIn general it's expected that jobs with the same topic will use similar amounts of resources, and\npresent a fairly uniform workload."}, "doc.tamanu.fhir__jobs__discriminant": {"name": "fhir__jobs__discriminant", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__discriminant", "block_contents": "Value used to deduplicate jobs.\n\nBy default this is set to a random value.\n\nIf a job is submitted with the same `discriminant` as a job that's already `Queued`, `Grabbed`,\nor `Started`, the new job will be discarded. This can be used to enforce uniqueness or to prevent\nredundant work.\n\nWhen a job is failed, its discriminant is reset to a random value to avoid forbidding new jobs from\nbeing submitted while keeping the error records around.\n\nTo make code easier discriminants are also enforced to be globally unique within the table, so it's\na good idea to prefix a fixed discriminant with the topic it's for."}, "doc.tamanu.fhir__jobs__payload": {"name": "fhir__jobs__payload", "resource_type": "doc", "package_name": "tamanu", "path": "jobs.md", "original_file_path": "../../database/model/fhir/jobs.md", "unique_id": "doc.tamanu.fhir__jobs__payload", "block_contents": "Arbitrary JSONB payload.\n\nThe handlers for a particular topic interpret and enforce the schema of payloads, but the job system\nitself doesn't care."}, "doc.tamanu.logs__table__changes": {"name": "logs__table__changes", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__table__changes", "block_contents": "Contains a full log of all changes made to the core database records.\n\nThe changes are logged via triggers on source tables. The full row data is\nlogged in this table on every change to every row for every table that's covered.\nThese triggers are applied by Tamanu rather than being hardcoded in migrations.\n\nSome tables are excluded from logging. These are listed in the `NON_LOGGED_TABLES`\nconstant in the database package, and include the sync subsystem and other\ninternal system tables.\n\nNote that changes before this table was put in service will of course not have\nbeen logged."}, "doc.tamanu.logs__changes__id": {"name": "logs__changes__id", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__id", "block_contents": "The ID of the change log row. UUID"}, "doc.tamanu.logs__changes__table_oid": {"name": "logs__changes__table_oid", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__table_oid", "block_contents": "The Postgres OID of the table this change is from.\n\nPostgres OIDs are much more precise than `schema.name`, and are not susceptible\nto search path conflicts, so should be preferred for querying within the same\ndatabase. However, they are not easily relatable from outside the database, so\nthe schema and name fields are also recorded for those uses, plus human readers."}, "doc.tamanu.logs__changes__table_schema": {"name": "logs__changes__table_schema", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__table_schema", "block_contents": "The schema (~database namespace) of the table this change is from.\n\nThis will typically be `public`; as of writing tables from other schemas are not\nautomatically logged."}, "doc.tamanu.logs__changes__table_name": {"name": "logs__changes__table_name", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__table_name", "block_contents": "The name of the table this change is from."}, "doc.tamanu.logs__changes__logged_at": {"name": "logs__changes__logged_at", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__logged_at", "block_contents": "The timestamp this change was logged."}, "doc.tamanu.logs__changes__created_at": {"name": "logs__changes__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__created_at", "block_contents": "Then sequelize metadata for the records created time"}, "doc.tamanu.logs__changes__updated_by_user_id": {"name": "logs__changes__updated_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__updated_by_user_id", "block_contents": "The value of the `updated_by_user_id` field of the change data.\n\nThis is extracted from the data to make it easier to query on."}, "doc.tamanu.logs__changes__device_id": {"name": "logs__changes__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__device_id", "block_contents": "The `device_id` of the user behind the change"}, "doc.tamanu.logs__changes__version": {"name": "logs__changes__version", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__version", "block_contents": "The Tamanu version at time of change"}, "doc.tamanu.logs__changes__record_id": {"name": "logs__changes__record_id", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__record_id", "block_contents": "The value of the `id` field of the change data.\n\nThis is extracted from the data to make it easier to query on."}, "doc.tamanu.logs__changes__record_created_at": {"name": "logs__changes__record_created_at", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__record_created_at", "block_contents": "The `created_at` metadata from record the changelog was recorded against"}, "doc.tamanu.logs__changes__record_updated_at": {"name": "logs__changes__record_updated_at", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__record_updated_at", "block_contents": "The `updated_at` metadata from record the changelog was recorded against"}, "doc.tamanu.logs__changes__record_deleted_at": {"name": "logs__changes__record_deleted_at", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__record_deleted_at", "block_contents": "The `deleted_at` metadata from record the changelog was recorded against"}, "doc.tamanu.logs__changes__record_data": {"name": "logs__changes__record_data", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__record_data", "block_contents": "The full row data of the change.\n\nNote that as this is `JSONB`, some type information may be lost. However, row\ndata in a Tamanu system is transported using JSON via the sync system anyway, so\nit is expected that all data trivially round-trips via JSON."}, "doc.tamanu.logs__changes__reason": {"name": "logs__changes__reason", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__reason", "block_contents": "A string representing the reason for the change."}, "doc.tamanu.logs__changes__migration_context": {"name": "logs__changes__migration_context", "resource_type": "doc", "package_name": "tamanu", "path": "changes.md", "original_file_path": "../../database/model/logs/changes.md", "unique_id": "doc.tamanu.logs__changes__migration_context", "block_contents": "Stores a JSON string (as type TEXT) with migration context information\nif the changelog was created from a migration."}, "doc.tamanu.logs__generic__schema": {"name": "logs__generic__schema", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/logs/generic.md", "unique_id": "doc.tamanu.logs__generic__schema", "block_contents": "Contains logging tables across different domains."}, "doc.tamanu.logs__generic__updated_at_sync_tick": {"name": "logs__generic__updated_at_sync_tick", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/logs/generic.md", "unique_id": "doc.tamanu.logs__generic__updated_at_sync_tick", "block_contents": "Last tick that the record was updated. Used to figure out old vs new data when syncing"}, "doc.tamanu.logs__table__debug_logs": {"name": "logs__table__debug_logs", "resource_type": "doc", "package_name": "tamanu", "path": "debug_logs.md", "original_file_path": "../../database/model/logs/debug_logs.md", "unique_id": "doc.tamanu.logs__table__debug_logs", "block_contents": "Debugging logs stored in the database for easy reporting.\n\nTamanu has an associated tool called [Tamanu Alerts] which runs queries on the Tamanu database to\ndetermine alert conditions, especially for the Sync mechanisms. However, sometimes the information\nnecessary to determine an alert condition lives in logs, not in database tables. In those cases,\nthis table is used.\n\n[Tamanu Alerts]: https://docs.rs/bestool/latest/bestool/__help/tamanu/alerts/struct.AlertsArgs.html"}, "doc.tamanu.logs__debug_logs__id": {"name": "logs__debug_logs__id", "resource_type": "doc", "package_name": "tamanu", "path": "debug_logs.md", "original_file_path": "../../database/model/logs/debug_logs.md", "unique_id": "doc.tamanu.logs__debug_logs__id", "block_contents": "UUID"}, "doc.tamanu.logs__debug_logs__type": {"name": "logs__debug_logs__type", "resource_type": "doc", "package_name": "tamanu", "path": "debug_logs.md", "original_file_path": "../../database/model/logs/debug_logs.md", "unique_id": "doc.tamanu.logs__debug_logs__type", "block_contents": "Stable classifier for the log message."}, "doc.tamanu.logs__debug_logs__info": {"name": "logs__debug_logs__info", "resource_type": "doc", "package_name": "tamanu", "path": "debug_logs.md", "original_file_path": "../../database/model/logs/debug_logs.md", "unique_id": "doc.tamanu.logs__debug_logs__info", "block_contents": "Arbitrary JSON log message.\n\nNot that unlike typical JSON-based log messages (only top-level string key to scalar value), this\ncan be nested arbitrarily deep, as it can include objects directly from the application."}, "doc.tamanu.logs__table__fhir_writes": {"name": "logs__table__fhir_writes", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__table__fhir_writes", "block_contents": "Full-request logs of writes (creates and modifies) coming over the FHIR API.\n\nFHIR is an extensive standard and we current support a small subset of it. There's an even tinier\nsubset of that which supports writes instead of just reads and searches. To avoid missing or losing\ndata which we could support accepting as writes in the future, and for development purposes, this\ntable logs the full request bodies for FHIR endpoints. This is not just the endpoints that we\ncurrently support, but all incoming write requests."}, "doc.tamanu.logs__fhir_writes__id": {"name": "logs__fhir_writes__id", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__id", "block_contents": "UUID"}, "doc.tamanu.logs__fhir_writes__created_at": {"name": "logs__fhir_writes__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__created_at", "block_contents": "When Tamanu received the request."}, "doc.tamanu.logs__fhir_writes__verb": {"name": "logs__fhir_writes__verb", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__verb", "block_contents": "HTTP verb (GET, POST, etc)"}, "doc.tamanu.logs__fhir_writes__url": {"name": "logs__fhir_writes__url", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__url", "block_contents": "HTTP URL"}, "doc.tamanu.logs__fhir_writes__body": {"name": "logs__fhir_writes__body", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__body", "block_contents": "Full request body"}, "doc.tamanu.logs__fhir_writes__headers": {"name": "logs__fhir_writes__headers", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__headers", "block_contents": "Selected request headers.\n\nSome headers are stripped for sensitivity."}, "doc.tamanu.logs__fhir_writes__user_id": {"name": "logs__fhir_writes__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "fhir_writes.md", "original_file_path": "../../database/model/logs/fhir_writes.md", "unique_id": "doc.tamanu.logs__fhir_writes__user_id", "block_contents": "The authenticated user for the API request."}, "doc.tamanu.logs__table__accesses": {"name": "logs__table__accesses", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__table__accesses", "block_contents": "Audit logs for users accessing records"}, "doc.tamanu.logs__accesses__id": {"name": "logs__accesses__id", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__id", "block_contents": "UUID"}, "doc.tamanu.logs__accesses__created_at": {"name": "logs__accesses__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__created_at", "block_contents": "Timestamp of when record was created"}, "doc.tamanu.logs__accesses__updated_at": {"name": "logs__accesses__updated_at", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__updated_at", "block_contents": "Timestamp of when record was last updated"}, "doc.tamanu.logs__accesses__deleted_at": {"name": "logs__accesses__deleted_at", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__deleted_at", "block_contents": "Timestamp of when record was deleted"}, "doc.tamanu.logs__accesses__user_id": {"name": "logs__accesses__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__user_id", "block_contents": "The user that accessed the records"}, "doc.tamanu.logs__accesses__record_id": {"name": "logs__accesses__record_id", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__record_id", "block_contents": "The ID of the accessed record"}, "doc.tamanu.logs__accesses__record_type": {"name": "logs__accesses__record_type", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__record_type", "block_contents": "The type of record accessed"}, "doc.tamanu.logs__accesses__facility_id": {"name": "logs__accesses__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__facility_id", "block_contents": "The facility that the record was accessed on"}, "doc.tamanu.logs__accesses__session_id": {"name": "logs__accesses__session_id", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__session_id", "block_contents": "The user session that the record was accessed on"}, "doc.tamanu.logs__accesses__device_id": {"name": "logs__accesses__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__device_id", "block_contents": "The id for the device that the user was accessing the record on"}, "doc.tamanu.logs__accesses__logged_at": {"name": "logs__accesses__logged_at", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__logged_at", "block_contents": "The time string of when the record was accessed"}, "doc.tamanu.logs__accesses__front_end_context": {"name": "logs__accesses__front_end_context", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__front_end_context", "block_contents": "A JSON object containing front end information about the record access"}, "doc.tamanu.logs__accesses__back_end_context": {"name": "logs__accesses__back_end_context", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__back_end_context", "block_contents": "A JSON object containing back end information about the record access"}, "doc.tamanu.logs__accesses__is_mobile": {"name": "logs__accesses__is_mobile", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__is_mobile", "block_contents": "Whether or not the user accessed the record from mobile"}, "doc.tamanu.logs__accesses__version": {"name": "logs__accesses__version", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__version", "block_contents": "The version of tamanu the record was created on"}, "doc.tamanu.logs__accesses__updated_at_sync_tick": {"name": "logs__accesses__updated_at_sync_tick", "resource_type": "doc", "package_name": "tamanu", "path": "accesses.md", "original_file_path": "../../database/model/logs/accesses.md", "unique_id": "doc.tamanu.logs__accesses__updated_at_sync_tick", "block_contents": "TODO"}, "doc.tamanu.logs__table__dhis2_pushes": {"name": "logs__table__dhis2_pushes", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__table__dhis2_pushes", "block_contents": "Audit logs for DHIS2 integration pushes.\n\nThis table tracks the results of automated pushes of report data to DHIS2 instances.\nThe DHIS2IntegrationProcessor scheduled task processes configured reports and pushes\ntheir data to external DHIS2 systems. Each push attempt is logged here with details\nabout the success/failure status, import counts, and any conflicts encountered.\n\nThe table stores metadata about data synchronization operations including how many\nrecords were imported, updated, ignored, or deleted during each push operation."}, "doc.tamanu.logs__dhis2_pushes__id": {"name": "logs__dhis2_pushes__id", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__id", "block_contents": "UUID primary key for the push log entry."}, "doc.tamanu.logs__dhis2_pushes__created_at": {"name": "logs__dhis2_pushes__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__created_at", "block_contents": "Timestamp of when the push log entry was created."}, "doc.tamanu.logs__dhis2_pushes__report_id": {"name": "logs__dhis2_pushes__report_id", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__report_id", "block_contents": "The ID of the report that was pushed to DHIS2."}, "doc.tamanu.logs__dhis2_pushes__status": {"name": "logs__dhis2_pushes__status", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__status", "block_contents": "The status of the push operation: \"success\", \"failure\", or \"warning\"."}, "doc.tamanu.logs__dhis2_pushes__imported": {"name": "logs__dhis2_pushes__imported", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__imported", "block_contents": "Number of records that were successfully imported to DHIS2."}, "doc.tamanu.logs__dhis2_pushes__updated": {"name": "logs__dhis2_pushes__updated", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__updated", "block_contents": "Number of records that were updated in DHIS2."}, "doc.tamanu.logs__dhis2_pushes__deleted": {"name": "logs__dhis2_pushes__deleted", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__deleted", "block_contents": "Number of records that were deleted from DHIS2."}, "doc.tamanu.logs__dhis2_pushes__ignored": {"name": "logs__dhis2_pushes__ignored", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__ignored", "block_contents": "Number of records that were ignored during the push operation."}, "doc.tamanu.logs__dhis2_pushes__updated_at": {"name": "logs__dhis2_pushes__updated_at", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__updated_at", "block_contents": "Timestamp of when the push log entry was last updated."}, "doc.tamanu.logs__dhis2_pushes__deleted_at": {"name": "logs__dhis2_pushes__deleted_at", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__deleted_at", "block_contents": "Timestamp of when the push log entry was deleted (soft delete)."}, "doc.tamanu.logs__dhis2_pushes__conflicts": {"name": "logs__dhis2_pushes__conflicts", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__conflicts", "block_contents": "JSON array of conflict details encountered during the push operation."}, "doc.tamanu.logs__dhis2_pushes__message": {"name": "logs__dhis2_pushes__message", "resource_type": "doc", "package_name": "tamanu", "path": "dhis2_pushes.md", "original_file_path": "../../database/model/logs/dhis2_pushes.md", "unique_id": "doc.tamanu.logs__dhis2_pushes__message", "block_contents": "Human-readable message describing the result of the push operation."}, "doc.tamanu.logs__table__migrations": {"name": "logs__table__migrations", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__table__migrations", "block_contents": "This table keeps track of when migrations are run.\n\nThe SequelizeMeta table in the public schema is internal migration state, and\nonly records which migrations are currently applied. This table instead logs\nwhenever migrations are performed, up and down, with additional timing info."}, "doc.tamanu.logs__migrations__id": {"name": "logs__migrations__id", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__id", "block_contents": "A randomly generated UUID."}, "doc.tamanu.logs__migrations__logged_at": {"name": "logs__migrations__logged_at", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__logged_at", "block_contents": "The local server time when the migration run happened."}, "doc.tamanu.logs__migrations__record_sync_tick": {"name": "logs__migrations__record_sync_tick", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__record_sync_tick", "block_contents": "TODO"}, "doc.tamanu.logs__migrations__device_id": {"name": "logs__migrations__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__device_id", "block_contents": "TODO"}, "doc.tamanu.logs__migrations__version": {"name": "logs__migrations__version", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__version", "block_contents": "TODO"}, "doc.tamanu.logs__migrations__direction": {"name": "logs__migrations__direction", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__direction", "block_contents": "What kind of migration operation this was (typically `up`)."}, "doc.tamanu.logs__migrations__migrations": {"name": "logs__migrations__migrations", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__migrations", "block_contents": "The list of migrations applied during this operation."}, "doc.tamanu.logs__migrations__updated_at_sync_tick": {"name": "logs__migrations__updated_at_sync_tick", "resource_type": "doc", "package_name": "tamanu", "path": "migrations.md", "original_file_path": "../../database/model/logs/migrations.md", "unique_id": "doc.tamanu.logs__migrations__updated_at_sync_tick", "block_contents": "TODO"}, "doc.tamanu.table__patient_field_definition_categories": {"name": "table__patient_field_definition_categories", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definition_categories.md", "original_file_path": "../../database/model/public/patient_field_definition_categories.md", "unique_id": "doc.tamanu.table__patient_field_definition_categories", "block_contents": "Groupings for [patient field definitions](#!/source/source.tamanu.tamanu.patient_field_definitions)."}, "doc.tamanu.patient_field_definition_categories__name": {"name": "patient_field_definition_categories__name", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definition_categories.md", "original_file_path": "../../database/model/public/patient_field_definition_categories.md", "unique_id": "doc.tamanu.patient_field_definition_categories__name", "block_contents": "Name of category."}, "doc.tamanu.table__lab_test_panel_lab_test_types": {"name": "table__lab_test_panel_lab_test_types", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.md", "unique_id": "doc.tamanu.table__lab_test_panel_lab_test_types", "block_contents": "The lab tests contained in a lab test panel.\n\nSee [`lab_test_panels`](#!/source/source.tamanu.tamanu.lab_test_panels) for more about lab test\npanels, and [`lab_test_types`](#!/source/source.tamanu.tamanu.lab_test_types) for the test types."}, "doc.tamanu.lab_test_panel_lab_test_types__lab_test_panel_id": {"name": "lab_test_panel_lab_test_types__lab_test_panel_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.md", "unique_id": "doc.tamanu.lab_test_panel_lab_test_types__lab_test_panel_id", "block_contents": "The [test panel](#!/source/source.tamanu.tamanu.lab_test_panels)."}, "doc.tamanu.lab_test_panel_lab_test_types__lab_test_type_id": {"name": "lab_test_panel_lab_test_types__lab_test_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.md", "unique_id": "doc.tamanu.lab_test_panel_lab_test_types__lab_test_type_id", "block_contents": "The [test type](#!/source/source.tamanu.tamanu.lab_test_types)."}, "doc.tamanu.lab_test_panel_lab_test_types__order": {"name": "lab_test_panel_lab_test_types__order", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_panel_lab_test_types.md", "unique_id": "doc.tamanu.lab_test_panel_lab_test_types__order", "block_contents": "The position of this test within the panel, used to control the display\nand processing order of lab tests in a lab test panel. Lower values are\nshown and processed before higher values."}, "doc.tamanu.table__upcoming_vaccinations": {"name": "table__upcoming_vaccinations", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.table__upcoming_vaccinations", "block_contents": "A **view** which lists patients and next vaccine due for a given vaccine type.\n\nThe first dose of a vaccine type is based on weeks from birth due whilst subsequent doses are based on weeks from last \nvaccination due.\n\nAge limits in years and thresholds in days for scheduled status are configurable with the following defaults:\n\n- Age = 15\n- Status: Scheduled = 28\n- Status: Upcoming = 7\n- Status: Due = -7\n- Status: Overdue = -55\n- Status: Missed = -Infinity"}, "doc.tamanu.upcoming_vaccinations__patient_id": {"name": "upcoming_vaccinations__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__patient_id", "block_contents": "The [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.upcoming_vaccinations__scheduled_vaccine_id": {"name": "upcoming_vaccinations__scheduled_vaccine_id", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__scheduled_vaccine_id", "block_contents": "Reference to the [scheduled vaccine](#!/source/source.tamanu.tamanu.scheduled_vaccines)."}, "doc.tamanu.upcoming_vaccinations__vaccine_category": {"name": "upcoming_vaccinations__vaccine_category", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__vaccine_category", "block_contents": "Vaccine category [Routine, Catch-up, Campaign, Other]"}, "doc.tamanu.upcoming_vaccinations__vaccine_id": {"name": "upcoming_vaccinations__vaccine_id", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__vaccine_id", "block_contents": "Reference to the vaccine ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = drug`)."}, "doc.tamanu.upcoming_vaccinations__due_date": {"name": "upcoming_vaccinations__due_date", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__due_date", "block_contents": "Due date of the scheduled vaccine."}, "doc.tamanu.upcoming_vaccinations__days_till_due": {"name": "upcoming_vaccinations__days_till_due", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__days_till_due", "block_contents": "Number of days until the scheduled vaccine is due. Negative numbers indicates the number of days in the past the vaccine\nwas due."}, "doc.tamanu.upcoming_vaccinations__status": {"name": "upcoming_vaccinations__status", "resource_type": "doc", "package_name": "tamanu", "path": "upcoming_vaccinations.md", "original_file_path": "../../database/model/public/upcoming_vaccinations.md", "unique_id": "doc.tamanu.upcoming_vaccinations__status", "block_contents": "Status of the upcoming vaccination listed ['DUE', 'OVERDUE', 'MISSED', 'SCHEDULED', 'UPCOMING']"}, "doc.tamanu.table__patient_field_values": {"name": "table__patient_field_values", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_values.md", "original_file_path": "../../database/model/public/patient_field_values.md", "unique_id": "doc.tamanu.table__patient_field_values", "block_contents": "Values recorded in custom patient fields.\n\nThe `id` column is generated to enforce one value row per field definition per patient."}, "doc.tamanu.patient_field_values__value": {"name": "patient_field_values__value", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_values.md", "original_file_path": "../../database/model/public/patient_field_values.md", "unique_id": "doc.tamanu.patient_field_values__value", "block_contents": "Value."}, "doc.tamanu.patient_field_values__definition_id": {"name": "patient_field_values__definition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_values.md", "original_file_path": "../../database/model/public/patient_field_values.md", "unique_id": "doc.tamanu.patient_field_values__definition_id", "block_contents": "The [field definition](#!/source/source.tamanu.tamanu.patient_field_definitions)."}, "doc.tamanu.patient_field_values__patient_id": {"name": "patient_field_values__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_values.md", "original_file_path": "../../database/model/public/patient_field_values.md", "unique_id": "doc.tamanu.patient_field_values__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.table__permissions": {"name": "table__permissions", "resource_type": "doc", "package_name": "tamanu", "path": "permissions.md", "original_file_path": "../../database/model/public/permissions.md", "unique_id": "doc.tamanu.table__permissions", "block_contents": "These are associations of permissions to roles.\n\nPermissions are modeled on the concept of a sentence like\n\n```\nROLE can VERB the NOUN\nROLE can VERB the NOUN which is specifically the OBJECT ID\n```\n\nSee also the [`roles`](#!/source/source.tamanu.tamanu.roles) and\n[`users`](#!/source/source.tamanu.tamanu.users) tables."}, "doc.tamanu.permissions__role_id": {"name": "permissions__role_id", "resource_type": "doc", "package_name": "tamanu", "path": "permissions.md", "original_file_path": "../../database/model/public/permissions.md", "unique_id": "doc.tamanu.permissions__role_id", "block_contents": "The [`role`](#!/source/source.tamanu.tamanu.roles) authorised for this permission."}, "doc.tamanu.permissions__noun": {"name": "permissions__noun", "resource_type": "doc", "package_name": "tamanu", "path": "permissions.md", "original_file_path": "../../database/model/public/permissions.md", "unique_id": "doc.tamanu.permissions__noun", "block_contents": "The subject of the action/permission, usually the model or resource being affected.\n\nNouns are defined in `PascalCase` and are singular."}, "doc.tamanu.permissions__verb": {"name": "permissions__verb", "resource_type": "doc", "package_name": "tamanu", "path": "permissions.md", "original_file_path": "../../database/model/public/permissions.md", "unique_id": "doc.tamanu.permissions__verb", "block_contents": "The action verb for this permission.\n\nSome common verbs include: `create`, `read`, `write`, `list`."}, "doc.tamanu.permissions__object_id": {"name": "permissions__object_id", "resource_type": "doc", "package_name": "tamanu", "path": "permissions.md", "original_file_path": "../../database/model/public/permissions.md", "unique_id": "doc.tamanu.permissions__object_id", "block_contents": "An optional object ID to specialise the permission.\n\nIf this is not set the permission is generally for the entire class of objects, if it _is_ set then\nthe permission is _only_ for the specific object."}, "doc.tamanu.table__user_login_attempts": {"name": "table__user_login_attempts", "resource_type": "doc", "package_name": "tamanu", "path": "user_login_attempts.md", "original_file_path": "../../database/model/public/user_login_attempts.md", "unique_id": "doc.tamanu.table__user_login_attempts", "block_contents": "A table that tracks user login attempts for the lockout feature."}, "doc.tamanu.user_login_attempts__outcome": {"name": "user_login_attempts__outcome", "resource_type": "doc", "package_name": "tamanu", "path": "user_login_attempts.md", "original_file_path": "../../database/model/public/user_login_attempts.md", "unique_id": "doc.tamanu.user_login_attempts__outcome", "block_contents": "A string specifying the outcome of the login attempt."}, "doc.tamanu.user_login_attempts__device_id": {"name": "user_login_attempts__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_login_attempts.md", "original_file_path": "../../database/model/public/user_login_attempts.md", "unique_id": "doc.tamanu.user_login_attempts__device_id", "block_contents": "The [device](#!/source/source.tamanu.tamanu.devices)."}, "doc.tamanu.user_login_attempts__user_id": {"name": "user_login_attempts__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_login_attempts.md", "original_file_path": "../../database/model/public/user_login_attempts.md", "unique_id": "doc.tamanu.user_login_attempts__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.table__lab_tests": {"name": "table__lab_tests", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.table__lab_tests", "block_contents": "A single test as part of a [lab request](#!/source/source.tamanu.tamanu.lab_requests)."}, "doc.tamanu.lab_tests__result": {"name": "lab_tests__result", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__result", "block_contents": "The result of the test."}, "doc.tamanu.lab_tests__lab_request_id": {"name": "lab_tests__lab_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__lab_request_id", "block_contents": "The [lab request](#!/source/source.tamanu.tamanu.lab_requests) this test is part of."}, "doc.tamanu.lab_tests__lab_test_type_id": {"name": "lab_tests__lab_test_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__lab_test_type_id", "block_contents": "The [type](#!/source/source.tamanu.tamanu.lab_test_types) of the test."}, "doc.tamanu.lab_tests__category_id": {"name": "lab_tests__category_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__category_id", "block_contents": "Reference to the category ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test."}, "doc.tamanu.lab_tests__lab_test_method_id": {"name": "lab_tests__lab_test_method_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__lab_test_method_id", "block_contents": "Reference to the method ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test."}, "doc.tamanu.lab_tests__laboratory_officer": {"name": "lab_tests__laboratory_officer", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__laboratory_officer", "block_contents": "Name of the lab officer performing the test."}, "doc.tamanu.lab_tests__completed_date": {"name": "lab_tests__completed_date", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__completed_date", "block_contents": "Datetime at which the test was completed."}, "doc.tamanu.lab_tests__verification": {"name": "lab_tests__verification", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__verification", "block_contents": "Free-form field for a verification indication.\n\nMay be a verifying or supervising officer's name, a department, lab notes..."}, "doc.tamanu.lab_tests__completed_date_legacy": {"name": "lab_tests__completed_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "lab_tests.md", "original_file_path": "../../database/model/public/lab_tests.md", "unique_id": "doc.tamanu.lab_tests__completed_date_legacy", "block_contents": "[Deprecated] Timestamp at which the test was completed."}, "doc.tamanu.table__reference_data_relations": {"name": "table__reference_data_relations", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data_relations.md", "original_file_path": "../../database/model/public/reference_data_relations.md", "unique_id": "doc.tamanu.table__reference_data_relations", "block_contents": "Entity hierarchy for reference data.\n\nSome reference datas can be organised in a hierarchy. This is how that's done."}, "doc.tamanu.reference_data_relations__reference_data_id": {"name": "reference_data_relations__reference_data_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data_relations.md", "original_file_path": "../../database/model/public/reference_data_relations.md", "unique_id": "doc.tamanu.reference_data_relations__reference_data_id", "block_contents": "The [reference data](#!/source/source.tamanu.tamanu.reference_data) item."}, "doc.tamanu.reference_data_relations__reference_data_parent_id": {"name": "reference_data_relations__reference_data_parent_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data_relations.md", "original_file_path": "../../database/model/public/reference_data_relations.md", "unique_id": "doc.tamanu.reference_data_relations__reference_data_parent_id", "block_contents": "Another [reference data](#!/source/source.tamanu.tamanu.reference_data) item which is the parent of this one."}, "doc.tamanu.reference_data_relations__type": {"name": "reference_data_relations__type", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data_relations.md", "original_file_path": "../../database/model/public/reference_data_relations.md", "unique_id": "doc.tamanu.reference_data_relations__type", "block_contents": "The type of hierarchy being described."}, "doc.tamanu.table__invoice_price_list_items": {"name": "table__invoice_price_list_items", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_list_items.md", "original_file_path": "../../database/model/public/invoice_price_list_items.md", "unique_id": "doc.tamanu.table__invoice_price_list_items", "block_contents": "Contains individual pricing entries for specific products within a price list. Each record defines the price or pricing configuration for a particular product in the context of a specific price list."}, "doc.tamanu.invoice_price_list_items__invoice_price_list_id": {"name": "invoice_price_list_items__invoice_price_list_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_list_items.md", "original_file_path": "../../database/model/public/invoice_price_list_items.md", "unique_id": "doc.tamanu.invoice_price_list_items__invoice_price_list_id", "block_contents": "Foreign key reference to the invoice_price_lists table. Links this pricing item to its parent price list."}, "doc.tamanu.invoice_price_list_items__invoice_product_id": {"name": "invoice_price_list_items__invoice_product_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_list_items.md", "original_file_path": "../../database/model/public/invoice_price_list_items.md", "unique_id": "doc.tamanu.invoice_price_list_items__invoice_product_id", "block_contents": "Foreign key reference to the invoice products/services that can be priced. Identifies which product or service this pricing item applies to."}, "doc.tamanu.invoice_price_list_items__price": {"name": "invoice_price_list_items__price", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_list_items.md", "original_file_path": "../../database/model/public/invoice_price_list_items.md", "unique_id": "doc.tamanu.invoice_price_list_items__price", "block_contents": "The price amount for this product in the context of this price list. Stored as a numeric value representing the cost in the system's base currency."}, "doc.tamanu.invoice_price_list_items__is_hidden": {"name": "invoice_price_list_items__is_hidden", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_list_items.md", "original_file_path": "../../database/model/public/invoice_price_list_items.md", "unique_id": "doc.tamanu.invoice_price_list_items__is_hidden", "block_contents": "Determines whether the related invoice product should be hidden from searches on the frontend and also whether it should be automatically added to the invoice."}, "doc.tamanu.table__surveys": {"name": "table__surveys", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.table__surveys", "block_contents": "Surveys, aka custom forms that can be filled by practitioners.\n\nThese are composed of [screen components](#!/source/source.tamanu.tamanu.survey_screen_components)."}, "doc.tamanu.surveys__code": {"name": "surveys__code", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__code", "block_contents": "Machine-friendly code."}, "doc.tamanu.surveys__name": {"name": "surveys__name", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__name", "block_contents": "Human-friendly name."}, "doc.tamanu.surveys__program_id": {"name": "surveys__program_id", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__program_id", "block_contents": "The [program](#!/source/source.tamanu.tamanu.programs) grouping this survey."}, "doc.tamanu.surveys__survey_type": {"name": "surveys__survey_type", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__survey_type", "block_contents": "Type of survey.\n\nOne of:\n- `programs`\n- `referral`\n- `obsolete`\n- `vitals`"}, "doc.tamanu.surveys__is_sensitive": {"name": "surveys__is_sensitive", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__is_sensitive", "block_contents": "Whether the data recorded in the survey is sensitive."}, "doc.tamanu.surveys__notifiable": {"name": "surveys__notifiable", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__notifiable", "block_contents": "Whether filling this survey sends a notification email.\n\nThese are sent by the `SurveyCompletionNotifierProcessor` scheduled task."}, "doc.tamanu.surveys__notify_email_addresses": {"name": "surveys__notify_email_addresses", "resource_type": "doc", "package_name": "tamanu", "path": "surveys.md", "original_file_path": "../../database/model/public/surveys.md", "unique_id": "doc.tamanu.surveys__notify_email_addresses", "block_contents": "If `notifiable` is true, where to send the notification."}, "doc.tamanu.table__invoice_insurance_plan_items": {"name": "table__invoice_insurance_plan_items", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plan_items.md", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.md", "unique_id": "doc.tamanu.table__invoice_insurance_plan_items", "block_contents": "Table for insurance contract items used for invoicing."}, "doc.tamanu.invoice_insurance_plan_items__invoice_insurance_plan_id": {"name": "invoice_insurance_plan_items__invoice_insurance_plan_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plan_items.md", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.md", "unique_id": "doc.tamanu.invoice_insurance_plan_items__invoice_insurance_plan_id", "block_contents": "Reference to the [insurance contract](#!/source/source.tamanu.tamanu.invoice_insurance_plans)."}, "doc.tamanu.invoice_insurance_plan_items__invoice_product_id": {"name": "invoice_insurance_plan_items__invoice_product_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plan_items.md", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.md", "unique_id": "doc.tamanu.invoice_insurance_plan_items__invoice_product_id", "block_contents": "Reference to the [invoice product](#!/source/source.tamanu.tamanu.invoice_products)."}, "doc.tamanu.invoice_insurance_plan_items__coverage_value": {"name": "invoice_insurance_plan_items__coverage_value", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plan_items.md", "original_file_path": "../../database/model/public/invoice_insurance_plan_items.md", "unique_id": "doc.tamanu.invoice_insurance_plan_items__coverage_value", "block_contents": "The amount of coverage (in percentage) of the insurance contract item."}, "doc.tamanu.table__invoice_items": {"name": "table__invoice_items", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.table__invoice_items", "block_contents": "Items (products) on invoices."}, "doc.tamanu.invoice_items__invoice_id": {"name": "invoice_items__invoice_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__invoice_id", "block_contents": "The [invoice](#!/source/source.tamanu.tamanu.invoices)."}, "doc.tamanu.invoice_items__order_date": {"name": "invoice_items__order_date", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__order_date", "block_contents": "When the item was ordered."}, "doc.tamanu.invoice_items__product_id": {"name": "invoice_items__product_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__product_id", "block_contents": "The [product](#!/source/source.tamanu.tamanu.invoice_products)."}, "doc.tamanu.invoice_items__quantity": {"name": "invoice_items__quantity", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__quantity", "block_contents": "Quantity ordered."}, "doc.tamanu.invoice_items__ordered_by_user_id": {"name": "invoice_items__ordered_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__ordered_by_user_id", "block_contents": "[Who](#!/source/source.tamanu.tamanu.users) ordered the item."}, "doc.tamanu.invoice_items__product_name_final": {"name": "invoice_items__product_name_final", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__product_name_final", "block_contents": "The final product name used on the invoice. Saved from the product name field when the invoice is finalised."}, "doc.tamanu.invoice_items__manual_entry_price": {"name": "invoice_items__manual_entry_price", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__manual_entry_price", "block_contents": "Manually entered price override for this item, if specified. When set, this takes precedence over the product's standard price."}, "doc.tamanu.invoice_items__note": {"name": "invoice_items__note", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__note", "block_contents": "Free-form note for this item."}, "doc.tamanu.invoice_items__source_record_type": {"name": "invoice_items__source_record_type", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__source_record_type", "block_contents": "The underlying model that the source record belongs to."}, "doc.tamanu.invoice_items__source_record_id": {"name": "invoice_items__source_record_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__source_record_id", "block_contents": "Foreign key relation for record type."}, "doc.tamanu.invoice_items__product_code_final": {"name": "invoice_items__product_code_final", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__product_code_final", "block_contents": "The final product code used on the invoice. Saved from the product code field when the invoice is finalised."}, "doc.tamanu.invoice_items__price_final": {"name": "invoice_items__price_final", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__price_final", "block_contents": "The final price per unit for this item on the invoice. This is determined by the manual_entry_price if provided, otherwise from the product's price when the invoice is finalised."}, "doc.tamanu.invoice_items__approved": {"name": "invoice_items__approved", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_items.md", "original_file_path": "../../database/model/public/invoice_items.md", "unique_id": "doc.tamanu.invoice_items__approved", "block_contents": "A boolean field that enables clinicians to track the approval status of individual invoice line items"}, "doc.tamanu.table__settings": {"name": "table__settings", "resource_type": "doc", "package_name": "tamanu", "path": "settings.md", "original_file_path": "../../database/model/public/settings.md", "unique_id": "doc.tamanu.table__settings", "block_contents": "Shared and synced configuration values.\n\nAlways set from the Central server / Admin interfaces and then synced to facilities.\n\nThose can change dynamically when a server/client is up, some settings are read at point of use and\nso change is applied \"immediately\", some settings are read once at server start but those should be\nrare and eventually eliminated as there's no facility within Tamanu to restart its own servers."}, "doc.tamanu.settings__key": {"name": "settings__key", "resource_type": "doc", "package_name": "tamanu", "path": "settings.md", "original_file_path": "../../database/model/public/settings.md", "unique_id": "doc.tamanu.settings__key", "block_contents": "Dotted JSON path."}, "doc.tamanu.settings__value": {"name": "settings__value", "resource_type": "doc", "package_name": "tamanu", "path": "settings.md", "original_file_path": "../../database/model/public/settings.md", "unique_id": "doc.tamanu.settings__value", "block_contents": "JSON value."}, "doc.tamanu.settings__facility_id": {"name": "settings__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "settings.md", "original_file_path": "../../database/model/public/settings.md", "unique_id": "doc.tamanu.settings__facility_id", "block_contents": "The [facility](#!/source/source.tamanu.tamanu.facilities) this setting is scoped to."}, "doc.tamanu.settings__scope": {"name": "settings__scope", "resource_type": "doc", "package_name": "tamanu", "path": "settings.md", "original_file_path": "../../database/model/public/settings.md", "unique_id": "doc.tamanu.settings__scope", "block_contents": "Scope of the setting, which determines how it's applied.\n\nOne of:\n- `global`\n- `central`\n- `facility`"}, "doc.tamanu.table__sync_lookup": {"name": "table__sync_lookup", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.table__sync_lookup", "block_contents": "Cache of records to use for sync.\n\nThis is used internally in the sync process."}, "doc.tamanu.sync_lookup__record_id": {"name": "sync_lookup__record_id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__record_id", "block_contents": "The `id` field of the record."}, "doc.tamanu.sync_lookup__record_type": {"name": "sync_lookup__record_type", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__record_type", "block_contents": "The table name of the record."}, "doc.tamanu.sync_lookup__data": {"name": "sync_lookup__data", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__data", "block_contents": "All the fields of the record."}, "doc.tamanu.sync_lookup__patient_id": {"name": "sync_lookup__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__patient_id", "block_contents": "If the record has a [patient](#!/source/source.tamanu.tamanu.patients) reference, this is it extracted here.\n\nThis is used to filter records efficiently during the sync process."}, "doc.tamanu.sync_lookup__encounter_id": {"name": "sync_lookup__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__encounter_id", "block_contents": "If the record has an [encounter](#!/source/source.tamanu.tamanu.encounters) reference, this is it extracted here.\n\nThis is used to filter records efficiently during the sync process."}, "doc.tamanu.sync_lookup__facility_id": {"name": "sync_lookup__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__facility_id", "block_contents": "If the record has a [facility](#!/source/source.tamanu.tamanu.facilitys) reference, this is it extracted here.\n\nThis is used to filter records efficiently during the sync process."}, "doc.tamanu.sync_lookup__is_lab_request": {"name": "sync_lookup__is_lab_request", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__is_lab_request", "block_contents": "Whether the record is or is related to a lab request.\n\nThis is used to filter records efficiently during the sync process."}, "doc.tamanu.sync_lookup__is_deleted": {"name": "sync_lookup__is_deleted", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__is_deleted", "block_contents": "Whether the record is deleted (`deleted_at` is not null).\n\nThis is used to sort and filter records efficiently during the sync process."}, "doc.tamanu.sync_lookup__updated_at_by_field_sum": {"name": "sync_lookup__updated_at_by_field_sum", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__updated_at_by_field_sum", "block_contents": "If the record has an `updatedAtByField`, the sum of those values.\n\nThis is used to sort and filter records efficiently during the sync process."}, "doc.tamanu.sync_lookup__pushed_by_device_id": {"name": "sync_lookup__pushed_by_device_id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup.md", "original_file_path": "../../database/model/public/sync_lookup.md", "unique_id": "doc.tamanu.sync_lookup__pushed_by_device_id", "block_contents": "The unique device that pushed this record."}, "doc.tamanu.table__invoice_products": {"name": "table__invoice_products", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_products.md", "original_file_path": "../../database/model/public/invoice_products.md", "unique_id": "doc.tamanu.table__invoice_products", "block_contents": "Products which can be invoiced."}, "doc.tamanu.invoice_products__name": {"name": "invoice_products__name", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_products.md", "original_file_path": "../../database/model/public/invoice_products.md", "unique_id": "doc.tamanu.invoice_products__name", "block_contents": "Name of the product."}, "doc.tamanu.invoice_products__category": {"name": "invoice_products__category", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_products.md", "original_file_path": "../../database/model/public/invoice_products.md", "unique_id": "doc.tamanu.invoice_products__category", "block_contents": "The category of the product."}, "doc.tamanu.invoice_products__source_record_type": {"name": "invoice_products__source_record_type", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_products.md", "original_file_path": "../../database/model/public/invoice_products.md", "unique_id": "doc.tamanu.invoice_products__source_record_type", "block_contents": "The underlying database model of the source record for the product."}, "doc.tamanu.invoice_products__source_record_id": {"name": "invoice_products__source_record_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_products.md", "original_file_path": "../../database/model/public/invoice_products.md", "unique_id": "doc.tamanu.invoice_products__source_record_id", "block_contents": "The id of the source record for the product."}, "doc.tamanu.invoice_products__insurable": {"name": "invoice_products__insurable", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_products.md", "original_file_path": "../../database/model/public/invoice_products.md", "unique_id": "doc.tamanu.invoice_products__insurable", "block_contents": "Whether or not discounts can be applied to a product"}, "doc.tamanu.table__report_requests": {"name": "table__report_requests", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.table__report_requests", "block_contents": "Queued requests for reports by users.\n\nReports can be generated on-demand on the server a user is connected to, or it can be queued and\nexecuted at the server's leisure, and then sent attached to an email."}, "doc.tamanu.report_requests__report_type": {"name": "report_requests__report_type", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__report_type", "block_contents": "If the report is defined in code, this is the code of that report.\n\nMost reports are now created in SQL, but there are still a number of legacy reports that are\nhardcoded in the Tamanu source code, and this is how they're referenced."}, "doc.tamanu.report_requests__recipients": {"name": "report_requests__recipients", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__recipients", "block_contents": "JSON array of email addresses.\n\nSome legacy data may exist that specifies this as a comma-separated values."}, "doc.tamanu.report_requests__parameters": {"name": "report_requests__parameters", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__parameters", "block_contents": "JSON parameters for the report."}, "doc.tamanu.report_requests__status": {"name": "report_requests__status", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__status", "block_contents": "Processing status of the report request.\n\nOne of:\n- `Received`\n- `Processing`\n- `Processed`\n- `Error`"}, "doc.tamanu.report_requests__requested_by_user_id": {"name": "report_requests__requested_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__requested_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) requesting this report generation."}, "doc.tamanu.report_requests__error": {"name": "report_requests__error", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__error", "block_contents": "If the report fails to process, the error."}, "doc.tamanu.report_requests__process_started_time": {"name": "report_requests__process_started_time", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__process_started_time", "block_contents": "When processing started."}, "doc.tamanu.report_requests__facility_id": {"name": "report_requests__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this report request is from."}, "doc.tamanu.report_requests__export_format": {"name": "report_requests__export_format", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__export_format", "block_contents": "The format the report results must be exported as.\n\nOne of:\n- `xlsx`\n- `csv`"}, "doc.tamanu.report_requests__report_definition_version_id": {"name": "report_requests__report_definition_version_id", "resource_type": "doc", "package_name": "tamanu", "path": "report_requests.md", "original_file_path": "../../database/model/public/report_requests.md", "unique_id": "doc.tamanu.report_requests__report_definition_version_id", "block_contents": "The [report version](#!/source/source.tamanu.tamanu.report_definition_versions) being generated.\n\nNote that this is a version, not a report. If a report is updated after a request is queued, the\n\"old\" version will be executed. Additionally, new versions must be synced to facilities to be usable."}, "doc.tamanu.table__departments": {"name": "table__departments", "resource_type": "doc", "package_name": "tamanu", "path": "departments.md", "original_file_path": "../../database/model/public/departments.md", "unique_id": "doc.tamanu.table__departments", "block_contents": "Basic department info with a reference to parent facility."}, "doc.tamanu.departments__code": {"name": "departments__code", "resource_type": "doc", "package_name": "tamanu", "path": "departments.md", "original_file_path": "../../database/model/public/departments.md", "unique_id": "doc.tamanu.departments__code", "block_contents": "Code for department."}, "doc.tamanu.departments__name": {"name": "departments__name", "resource_type": "doc", "package_name": "tamanu", "path": "departments.md", "original_file_path": "../../database/model/public/departments.md", "unique_id": "doc.tamanu.departments__name", "block_contents": "Full readable name for department."}, "doc.tamanu.departments__facility_id": {"name": "departments__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "departments.md", "original_file_path": "../../database/model/public/departments.md", "unique_id": "doc.tamanu.departments__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this department is in."}, "doc.tamanu.table__invoice_discounts": {"name": "table__invoice_discounts", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.table__invoice_discounts", "block_contents": "Invoice discount that is applied to the patient's portion of the discountable costs."}, "doc.tamanu.invoice_discounts__id": {"name": "invoice_discounts__id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__id", "block_contents": "Tamanu identifier for invoice discounts"}, "doc.tamanu.invoice_discounts__invoice_id": {"name": "invoice_discounts__invoice_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__invoice_id", "block_contents": "The [invoice](#!/source/source.tamanu.tamanu.invoices)."}, "doc.tamanu.invoice_discounts__percentage": {"name": "invoice_discounts__percentage", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__percentage", "block_contents": "Percentage discount to apply to the invoice"}, "doc.tamanu.invoice_discounts__reason": {"name": "invoice_discounts__reason", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__reason", "block_contents": "Reason the discount is given"}, "doc.tamanu.invoice_discounts__is_manual": {"name": "invoice_discounts__is_manual", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__is_manual", "block_contents": "Indicates if the discount was manually added or based on an assessment"}, "doc.tamanu.invoice_discounts__applied_by_user_id": {"name": "invoice_discounts__applied_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__applied_by_user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users) who applied this discount."}, "doc.tamanu.invoice_discounts__applied_time": {"name": "invoice_discounts__applied_time", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_discounts.md", "original_file_path": "../../database/model/public/invoice_discounts.md", "unique_id": "doc.tamanu.invoice_discounts__applied_time", "block_contents": "When this discount was applied."}, "doc.tamanu.table__discharges": {"name": "table__discharges", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.table__discharges", "block_contents": "Information about a discharge.\n\nA discharge is the end of the lifecycle for an encounter."}, "doc.tamanu.discharges__note": {"name": "discharges__note", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__note", "block_contents": "Free-form notes about the discharge.\n\nMay include treatment plan and follow-ups, written by the discharging clinician.\n\nSince v2.0, also see the [`notes`](#!/source/source.tamanu.tamanu.notes) table for encounter and discharge notes."}, "doc.tamanu.discharges__encounter_id": {"name": "discharges__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this discharge is for."}, "doc.tamanu.discharges__discharger_id": {"name": "discharges__discharger_id", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__discharger_id", "block_contents": "The [discharging clinician](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.discharges__disposition_id": {"name": "discharges__disposition_id", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__disposition_id", "block_contents": "The discharge disposition or classification of the discharge ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.discharges__facility_name": {"name": "discharges__facility_name", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__facility_name", "block_contents": "Name of the discharging facility."}, "doc.tamanu.discharges__facility_address": {"name": "discharges__facility_address", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__facility_address", "block_contents": "Address of the discharging facility."}, "doc.tamanu.discharges__facility_town": {"name": "discharges__facility_town", "resource_type": "doc", "package_name": "tamanu", "path": "discharges.md", "original_file_path": "../../database/model/public/discharges.md", "unique_id": "doc.tamanu.discharges__facility_town", "block_contents": "Town of the discharging facility."}, "doc.tamanu.table__patients": {"name": "table__patients", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.table__patients", "block_contents": "The central record for a patient.\n\n\u26a0\ufe0f The full contents of this table are synced to all devices, and in larger deployments this may be\nhundreds of thousands of records (or even millions), so it is critical to keep the row size small.\n\nOnly contains basic patient data (name, dob, etc.): the bare minimum to be able to find that patient\nin the system from the search page.\n\nThe remainder of the patient data is stored in the `patient_additional_data` table, which is only\nsynced to a device once it has marked that patient for sync (in the `patient_facility` table)."}, "doc.tamanu.patients__display_id": {"name": "patients__display_id", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__display_id", "block_contents": "Tamanu identifier for patients that is used on the front-end to refer to a patient.\n\nIt is usually the primary \"health system\" ID for this patient (ie something like a medicare number,\nnational healthcare number, etc), and may be imported from an external system or allocated by Tamanu\nitself.\n\nInformally this is called NHN or \"Display ID\" interchangeably.\n\nAdditional external IDs are tracked in the `patient_secondary_ids` table."}, "doc.tamanu.patients__first_name": {"name": "patients__first_name", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__first_name", "block_contents": "First name of patient"}, "doc.tamanu.patients__middle_name": {"name": "patients__middle_name", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__middle_name", "block_contents": "Middle name of patient"}, "doc.tamanu.patients__last_name": {"name": "patients__last_name", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__last_name", "block_contents": "Last name of patient"}, "doc.tamanu.patients__cultural_name": {"name": "patients__cultural_name", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__cultural_name", "block_contents": "Cultural name of patient"}, "doc.tamanu.patients__email": {"name": "patients__email", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__email", "block_contents": "Email address of patient"}, "doc.tamanu.patients__date_of_birth": {"name": "patients__date_of_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__date_of_birth", "block_contents": "Date of birth of patient"}, "doc.tamanu.patients__sex": {"name": "patients__sex", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__sex", "block_contents": "Sex of patient.\n\nOne of:\n- `male`\n- `female`\n- `other`"}, "doc.tamanu.patients__village_id": {"name": "patients__village_id", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__village_id", "block_contents": "Tamanu village identifier defined in the reference data"}, "doc.tamanu.patients__additional_details": {"name": "patients__additional_details", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__additional_details", "block_contents": "[Deprecated] Additional details of the patient"}, "doc.tamanu.patients__merged_into_id": {"name": "patients__merged_into_id", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__merged_into_id", "block_contents": "Tamanu identifier for the patient the patient record was merged into"}, "doc.tamanu.patients__date_of_death_legacy": {"name": "patients__date_of_death_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__date_of_death_legacy", "block_contents": "[Deprecated] Timestamp of death of patient"}, "doc.tamanu.patients__date_of_death": {"name": "patients__date_of_death", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__date_of_death", "block_contents": "Date and time of death of patient"}, "doc.tamanu.patients__date_of_birth_legacy": {"name": "patients__date_of_birth_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patients.md", "original_file_path": "../../database/model/public/patients.md", "unique_id": "doc.tamanu.patients__date_of_birth_legacy", "block_contents": "[Deprecated] Timestamp of birth of patient"}, "doc.tamanu.table__encounters": {"name": "table__encounters", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.table__encounters", "block_contents": "Tracks the basic information of the patient encounters within Tamanu from start to finish"}, "doc.tamanu.encounters__encounter_type": {"name": "encounters__encounter_type", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__encounter_type", "block_contents": "The type of the encounter.\n\nOne of:\n- `admission`\n- `clinic`\n- `imaging`\n- `emergency`\n- `observation`\n- `triage`\n- `surveyResponse`\n- `vaccination`"}, "doc.tamanu.encounters__start_date": {"name": "encounters__start_date", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__start_date", "block_contents": "The beginning of the encounter"}, "doc.tamanu.encounters__end_date": {"name": "encounters__end_date", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__end_date", "block_contents": "The date encounter was discharged/ended"}, "doc.tamanu.encounters__reason_for_encounter": {"name": "encounters__reason_for_encounter", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__reason_for_encounter", "block_contents": "Free-form information about the encounter.\n\nCan include info like type of survey submitted, emergency diagnosis, etc."}, "doc.tamanu.encounters__device_id": {"name": "encounters__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__device_id", "block_contents": "Unique identifier for the device that created the encounter.\n\nDevice IDs are proper to each device and not globally recorded in e.g. a `devices` table."}, "doc.tamanu.encounters__start_date_legacy": {"name": "encounters__start_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__start_date_legacy", "block_contents": "[Deprecated] Start date."}, "doc.tamanu.encounters__end_date_legacy": {"name": "encounters__end_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__end_date_legacy", "block_contents": "[Deprecated] End date."}, "doc.tamanu.encounters__planned_location_id": {"name": "encounters__planned_location_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__planned_location_id", "block_contents": "The [location](#!/source/source.tamanu.tamanu.locations) that the encounter will transfer to at the\n`planned_location_start_time`."}, "doc.tamanu.encounters__patient_id": {"name": "encounters__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.encounters__examiner_id": {"name": "encounters__examiner_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__examiner_id", "block_contents": "Reference to the [examiner](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.encounters__location_id": {"name": "encounters__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__location_id", "block_contents": "Reference to the current [location](#!/source/source.tamanu.tamanu.locations) this encounter is in."}, "doc.tamanu.encounters__department_id": {"name": "encounters__department_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__department_id", "block_contents": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) this encounter is in."}, "doc.tamanu.encounters__planned_location_start_time": {"name": "encounters__planned_location_start_time", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__planned_location_start_time", "block_contents": "The time that the encounter will transfer to the planned location."}, "doc.tamanu.encounters__patient_billing_type_id": {"name": "encounters__patient_billing_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__patient_billing_type_id", "block_contents": "The billing type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of the patient."}, "doc.tamanu.encounters__referral_source_id": {"name": "encounters__referral_source_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__referral_source_id", "block_contents": "The referral source ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of the patient."}, "doc.tamanu.encounters__discharge_draft": {"name": "encounters__discharge_draft", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__discharge_draft", "block_contents": "Draft data of the encounter"}, "doc.tamanu.encounters__estimated_end_date": {"name": "encounters__estimated_end_date", "resource_type": "doc", "package_name": "tamanu", "path": "encounters.md", "original_file_path": "../../database/model/public/encounters.md", "unique_id": "doc.tamanu.encounters__estimated_end_date", "block_contents": "The estimated discharge date of the encounter"}, "doc.tamanu.table__task_template_designations": {"name": "table__task_template_designations", "resource_type": "doc", "package_name": "tamanu", "path": "task_template_designations.md", "original_file_path": "../../database/model/public/task_template_designations.md", "unique_id": "doc.tamanu.table__task_template_designations", "block_contents": "Association of designation to task template"}, "doc.tamanu.task_template_designations__task_template_id": {"name": "task_template_designations__task_template_id", "resource_type": "doc", "package_name": "tamanu", "path": "task_template_designations.md", "original_file_path": "../../database/model/public/task_template_designations.md", "unique_id": "doc.tamanu.task_template_designations__task_template_id", "block_contents": "The task template ([Task Template](#!/source/source.tamanu.tamanu.task_templates))."}, "doc.tamanu.task_template_designations__designation_id": {"name": "task_template_designations__designation_id", "resource_type": "doc", "package_name": "tamanu", "path": "task_template_designations.md", "original_file_path": "../../database/model/public/task_template_designations.md", "unique_id": "doc.tamanu.task_template_designations__designation_id", "block_contents": "The designation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.table__translated_strings": {"name": "table__translated_strings", "resource_type": "doc", "package_name": "tamanu", "path": "translated_strings.md", "original_file_path": "../../database/model/public/translated_strings.md", "unique_id": "doc.tamanu.table__translated_strings", "block_contents": "Localisation and translation strings.\n\nThese are used for two distinct purposes:\n- to translate Tamanu in languages other than English\n- to adjust the wording of specific items in the UI"}, "doc.tamanu.translated_strings__string_id": {"name": "translated_strings__string_id", "resource_type": "doc", "package_name": "tamanu", "path": "translated_strings.md", "original_file_path": "../../database/model/public/translated_strings.md", "unique_id": "doc.tamanu.translated_strings__string_id", "block_contents": "The internal reference of the item being translated."}, "doc.tamanu.translated_strings__language": {"name": "translated_strings__language", "resource_type": "doc", "package_name": "tamanu", "path": "translated_strings.md", "original_file_path": "../../database/model/public/translated_strings.md", "unique_id": "doc.tamanu.translated_strings__language", "block_contents": "The language code."}, "doc.tamanu.translated_strings__text": {"name": "translated_strings__text", "resource_type": "doc", "package_name": "tamanu", "path": "translated_strings.md", "original_file_path": "../../database/model/public/translated_strings.md", "unique_id": "doc.tamanu.translated_strings__text", "block_contents": "The actual translated text."}, "doc.tamanu.table__reference_medication_templates": {"name": "table__reference_medication_templates", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.table__reference_medication_templates", "block_contents": "Stores templates for medications, allowing for pre-defined medication orders."}, "doc.tamanu.reference_medication_templates__reference_data_id": {"name": "reference_medication_templates__reference_data_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__reference_data_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) for this medication template."}, "doc.tamanu.reference_medication_templates__medication_id": {"name": "reference_medication_templates__medication_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__medication_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) for the specific drug in this template."}, "doc.tamanu.reference_medication_templates__is_variable_dose": {"name": "reference_medication_templates__is_variable_dose", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__is_variable_dose", "block_contents": "Boolean indicating if the medication is to be administered \"pro re nata\" (as needed)."}, "doc.tamanu.reference_medication_templates__is_prn": {"name": "reference_medication_templates__is_prn", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__is_prn", "block_contents": "Boolean indicating if the medication dose is variable."}, "doc.tamanu.reference_medication_templates__dose_amount": {"name": "reference_medication_templates__dose_amount", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__dose_amount", "block_contents": "The amount of medication per dose."}, "doc.tamanu.reference_medication_templates__units": {"name": "reference_medication_templates__units", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__units", "block_contents": "The unit for the dose amount (e.g., mg, mL)."}, "doc.tamanu.reference_medication_templates__frequency": {"name": "reference_medication_templates__frequency", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__frequency", "block_contents": "How often the medication should be administered (e.g., BID, TID, QID)."}, "doc.tamanu.reference_medication_templates__route": {"name": "reference_medication_templates__route", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__route", "block_contents": "The route of administration for the medication (e.g., Oral, IV, IM)."}, "doc.tamanu.reference_medication_templates__duration_value": {"name": "reference_medication_templates__duration_value", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__duration_value", "block_contents": "The numeric value for the duration the medication should be taken (e.g., 7, 14)."}, "doc.tamanu.reference_medication_templates__duration_unit": {"name": "reference_medication_templates__duration_unit", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__duration_unit", "block_contents": "The unit for the medication duration (e.g., days, weeks, months)."}, "doc.tamanu.reference_medication_templates__notes": {"name": "reference_medication_templates__notes", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__notes", "block_contents": "Additional notes or instructions for the medication template."}, "doc.tamanu.reference_medication_templates__discharge_quantity": {"name": "reference_medication_templates__discharge_quantity", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__discharge_quantity", "block_contents": "The quantity of medication to be dispensed upon patient discharge."}, "doc.tamanu.reference_medication_templates__is_ongoing": {"name": "reference_medication_templates__is_ongoing", "resource_type": "doc", "package_name": "tamanu", "path": "reference_medication_templates.md", "original_file_path": "../../database/model/public/reference_medication_templates.md", "unique_id": "doc.tamanu.reference_medication_templates__is_ongoing", "block_contents": "A boolean indicating if the medication is ongoing"}, "doc.tamanu.table__portal_survey_assignments": {"name": "table__portal_survey_assignments", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.table__portal_survey_assignments", "block_contents": "Assignments of surveys to patients for completion through the patient portal.\n\nThis table tracks which surveys have been assigned to which patients for self-completion through\nthe patient portal application. Patients can log into the portal to view their assigned surveys\nand complete them independently. Surveys can be assigned to patients for various purposes such as\nhealth assessments, follow-up questionnaires, or program evaluations."}, "doc.tamanu.portal_survey_assignments__patient_id": {"name": "portal_survey_assignments__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients) who has been assigned the survey."}, "doc.tamanu.portal_survey_assignments__survey_id": {"name": "portal_survey_assignments__survey_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__survey_id", "block_contents": "Reference to the [survey](#!/source/source.tamanu.tamanu.surveys) that has been assigned to the patient."}, "doc.tamanu.portal_survey_assignments__status": {"name": "portal_survey_assignments__status", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__status", "block_contents": "The current status of the survey assignment in the patient portal.\n\nOne of:\n- `assigned` - Survey has been assigned but the patient has not yet started it in the portal\n- `in_progress` - Patient has started the survey in the portal but not completed it\n- `completed` - Survey has been fully completed by the patient through the portal\n- `expired` - Survey assignment has expired and can no longer be completed in the portal"}, "doc.tamanu.portal_survey_assignments__assigned_by_id": {"name": "portal_survey_assignments__assigned_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__assigned_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who assigned the survey to the patient."}, "doc.tamanu.portal_survey_assignments__survey_response_id": {"name": "portal_survey_assignments__survey_response_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__survey_response_id", "block_contents": "Reference to the [survey response](#!/source/source.tamanu.tamanu.survey_responses) containing the patient's answers from the portal.\n\nThis field is only populated when the survey has been completed through the patient portal and a response has been recorded."}, "doc.tamanu.portal_survey_assignments__assigned_at": {"name": "portal_survey_assignments__assigned_at", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__assigned_at", "block_contents": "Timestamp when the survey was assigned to the patient for completion through the patient portal.\n\nThis field is provided a value by the Tamanu web frontend when a survey assignment is created."}, "doc.tamanu.portal_survey_assignments__facility_id": {"name": "portal_survey_assignments__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_survey_assignments.md", "original_file_path": "../../database/model/public/portal_survey_assignments.md", "unique_id": "doc.tamanu.portal_survey_assignments__facility_id", "block_contents": "The facility that the survey was assigned from"}, "doc.tamanu.table__program_registry_clinical_statuses": {"name": "table__program_registry_clinical_statuses", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_clinical_statuses.md", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.md", "unique_id": "doc.tamanu.table__program_registry_clinical_statuses", "block_contents": "Table of clinical statuses used in program registries."}, "doc.tamanu.program_registry_clinical_statuses__code": {"name": "program_registry_clinical_statuses__code", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_clinical_statuses.md", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.md", "unique_id": "doc.tamanu.program_registry_clinical_statuses__code", "block_contents": "Code (identifier) for the clinical status."}, "doc.tamanu.program_registry_clinical_statuses__name": {"name": "program_registry_clinical_statuses__name", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_clinical_statuses.md", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.md", "unique_id": "doc.tamanu.program_registry_clinical_statuses__name", "block_contents": "The name of the clinical status."}, "doc.tamanu.program_registry_clinical_statuses__color": {"name": "program_registry_clinical_statuses__color", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_clinical_statuses.md", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.md", "unique_id": "doc.tamanu.program_registry_clinical_statuses__color", "block_contents": "A color for the clinical status.\n\nOne of:\n- `purple`\n- `pink`\n- `orange`\n- `yellow`\n- `blue`\n- `green`\n- `grey`\n- `red`\n- `brown`\n- `teal`"}, "doc.tamanu.program_registry_clinical_statuses__program_registry_id": {"name": "program_registry_clinical_statuses__program_registry_id", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_clinical_statuses.md", "original_file_path": "../../database/model/public/program_registry_clinical_statuses.md", "unique_id": "doc.tamanu.program_registry_clinical_statuses__program_registry_id", "block_contents": "Reference to the [Program Registry](#!/source/source.tamanu.tamanu.program_registries)\nthe status is a part of."}, "doc.tamanu.table__user_leaves": {"name": "table__user_leaves", "resource_type": "doc", "package_name": "tamanu", "path": "user_leaves.md", "original_file_path": "../../database/model/public/user_leaves.md", "unique_id": "doc.tamanu.table__user_leaves", "block_contents": "Records user leave requests, including leave period and scheduling/removal metadata."}, "doc.tamanu.user_leaves__start_date": {"name": "user_leaves__start_date", "resource_type": "doc", "package_name": "tamanu", "path": "user_leaves.md", "original_file_path": "../../database/model/public/user_leaves.md", "unique_id": "doc.tamanu.user_leaves__start_date", "block_contents": "Start date of the leave."}, "doc.tamanu.user_leaves__end_date": {"name": "user_leaves__end_date", "resource_type": "doc", "package_name": "tamanu", "path": "user_leaves.md", "original_file_path": "../../database/model/public/user_leaves.md", "unique_id": "doc.tamanu.user_leaves__end_date", "block_contents": "End date of the leave."}, "doc.tamanu.user_leaves__user_id": {"name": "user_leaves__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_leaves.md", "original_file_path": "../../database/model/public/user_leaves.md", "unique_id": "doc.tamanu.user_leaves__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who requested the leave."}, "doc.tamanu.table__referrals": {"name": "table__referrals", "resource_type": "doc", "package_name": "tamanu", "path": "referrals.md", "original_file_path": "../../database/model/public/referrals.md", "unique_id": "doc.tamanu.table__referrals", "block_contents": "[Referrals](https://en.wikipedia.org/wiki/Referral_(medicine)).\n\nReferrals use a confusing mix of data in the `referrals` table and\n[`survey_response_answers`](#!/source/source.tamanu.tamanu.survey_response_answers) identified by\nthe text of the question they are for. \n\nSome additional data is captured in\n[survey response answers](#!/source/source.tamanu.tamanu.survey_response_answers), but this is\nvariable and not enforced through any validation:\n- Where the person is being referred to can be captured by a range of questions, sometimes with a\n  list of hard coded facility name options, or location groups, or departments.\n- Who the referral is \"completed by\" can be captured by a question either the name\n  'Referring doctor' or 'Referral completed by'.\n- Some referrals are the product of a previous screening survey. In some cases (e.g. Samoa) there is\n  a SurveyLink question that captures which survey led to this referral, in others (e.g. Nauru)\n  there is no such question so the two survey responses cannot be reliably linked."}, "doc.tamanu.referrals__referred_facility": {"name": "referrals__referred_facility", "resource_type": "doc", "package_name": "tamanu", "path": "referrals.md", "original_file_path": "../../database/model/public/referrals.md", "unique_id": "doc.tamanu.referrals__referred_facility", "block_contents": "Unused."}, "doc.tamanu.referrals__initiating_encounter_id": {"name": "referrals__initiating_encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "referrals.md", "original_file_path": "../../database/model/public/referrals.md", "unique_id": "doc.tamanu.referrals__initiating_encounter_id", "block_contents": "Reference to the [initiating encounter](#!/source/source.tamanu.tamanu.encounters)."}, "doc.tamanu.referrals__completing_encounter_id": {"name": "referrals__completing_encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "referrals.md", "original_file_path": "../../database/model/public/referrals.md", "unique_id": "doc.tamanu.referrals__completing_encounter_id", "block_contents": "Unused."}, "doc.tamanu.referrals__survey_response_id": {"name": "referrals__survey_response_id", "resource_type": "doc", "package_name": "tamanu", "path": "referrals.md", "original_file_path": "../../database/model/public/referrals.md", "unique_id": "doc.tamanu.referrals__survey_response_id", "block_contents": "Reference to the [survey response](#!/source/source.tamanu.tamanu.survey_responses) with more data."}, "doc.tamanu.referrals__status": {"name": "referrals__status", "resource_type": "doc", "package_name": "tamanu", "path": "referrals.md", "original_file_path": "../../database/model/public/referrals.md", "unique_id": "doc.tamanu.referrals__status", "block_contents": "Status of the referral.\n\nOne of:\n- `pending`\n- `cancelled`\n- `completed`"}, "doc.tamanu.table__lab_request_attachments": {"name": "table__lab_request_attachments", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_attachments.md", "original_file_path": "../../database/model/public/lab_request_attachments.md", "unique_id": "doc.tamanu.table__lab_request_attachments", "block_contents": "Attachments (uploaded documents) to a lab request.\n\nThis could be forms for authorisation or consent, notes, instructions, etc."}, "doc.tamanu.lab_request_attachments__attachment_id": {"name": "lab_request_attachments__attachment_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_attachments.md", "original_file_path": "../../database/model/public/lab_request_attachments.md", "unique_id": "doc.tamanu.lab_request_attachments__attachment_id", "block_contents": "The [attachment](#!/source/source.tamanu.tamanu.attachments) (obtained by uploading the file)."}, "doc.tamanu.lab_request_attachments__lab_request_id": {"name": "lab_request_attachments__lab_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_attachments.md", "original_file_path": "../../database/model/public/lab_request_attachments.md", "unique_id": "doc.tamanu.lab_request_attachments__lab_request_id", "block_contents": "Reference to the [lab request](#!/source/source.tamanu.tamanu.lab_requests)."}, "doc.tamanu.lab_request_attachments__title": {"name": "lab_request_attachments__title", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_attachments.md", "original_file_path": "../../database/model/public/lab_request_attachments.md", "unique_id": "doc.tamanu.lab_request_attachments__title", "block_contents": "Short name of the attachment."}, "doc.tamanu.lab_request_attachments__replaced_by_id": {"name": "lab_request_attachments__replaced_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_attachments.md", "original_file_path": "../../database/model/public/lab_request_attachments.md", "unique_id": "doc.tamanu.lab_request_attachments__replaced_by_id", "block_contents": "Another lab request attachment which replaces this one."}, "doc.tamanu.table__one_time_logins": {"name": "table__one_time_logins", "resource_type": "doc", "package_name": "tamanu", "path": "one_time_logins.md", "original_file_path": "../../database/model/public/one_time_logins.md", "unique_id": "doc.tamanu.table__one_time_logins", "block_contents": "One time logins are used for password resets."}, "doc.tamanu.one_time_logins__user_id": {"name": "one_time_logins__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "one_time_logins.md", "original_file_path": "../../database/model/public/one_time_logins.md", "unique_id": "doc.tamanu.one_time_logins__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users) for whom this one time login is for."}, "doc.tamanu.one_time_logins__token": {"name": "one_time_logins__token", "resource_type": "doc", "package_name": "tamanu", "path": "one_time_logins.md", "original_file_path": "../../database/model/public/one_time_logins.md", "unique_id": "doc.tamanu.one_time_logins__token", "block_contents": "A random value to use as the login code.\n\nThis is sent to the user in an email and then entered in a form to reset their password."}, "doc.tamanu.one_time_logins__expires_at": {"name": "one_time_logins__expires_at", "resource_type": "doc", "package_name": "tamanu", "path": "one_time_logins.md", "original_file_path": "../../database/model/public/one_time_logins.md", "unique_id": "doc.tamanu.one_time_logins__expires_at", "block_contents": "Beyond this time, the one time login can no longer be used."}, "doc.tamanu.one_time_logins__used_at": {"name": "one_time_logins__used_at", "resource_type": "doc", "package_name": "tamanu", "path": "one_time_logins.md", "original_file_path": "../../database/model/public/one_time_logins.md", "unique_id": "doc.tamanu.one_time_logins__used_at", "block_contents": "When this token was used."}, "doc.tamanu.table__pharmacy_order_prescriptions": {"name": "table__pharmacy_order_prescriptions", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.table__pharmacy_order_prescriptions", "block_contents": "Individual prescriptions that are included in a [pharmacy_order](#!/source/source.tamanu.tamanu.pharmacy_orders)."}, "doc.tamanu.pharmacy_order_prescriptions__pharmacy_order_id": {"name": "pharmacy_order_prescriptions__pharmacy_order_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__pharmacy_order_id", "block_contents": "Reference to the [pharmacy_order](#!/source/source.tamanu.tamanu.pharmacy_orders)."}, "doc.tamanu.pharmacy_order_prescriptions__prescription_id": {"name": "pharmacy_order_prescriptions__prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__prescription_id", "block_contents": "Reference to the [prescription](#!/source/source.tamanu.tamanu.prescriptions)."}, "doc.tamanu.pharmacy_order_prescriptions__ongoing_prescription_id": {"name": "pharmacy_order_prescriptions__ongoing_prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__ongoing_prescription_id", "block_contents": "When this pharmacy order prescription was created from an ongoing prescription (send to pharmacy flow), references the ongoing [prescription](#!/source/source.tamanu.tamanu.prescriptions). Null for encounter-based pharmacy orders."}, "doc.tamanu.pharmacy_order_prescriptions__display_id": {"name": "pharmacy_order_prescriptions__display_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__display_id", "block_contents": "Human-readable request number for this prescription order. A new request number is generated each time a prescription is sent to pharmacy."}, "doc.tamanu.pharmacy_order_prescriptions__quantity": {"name": "pharmacy_order_prescriptions__quantity", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__quantity", "block_contents": "Quantity of medication ordered."}, "doc.tamanu.pharmacy_order_prescriptions__repeats": {"name": "pharmacy_order_prescriptions__repeats", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__repeats", "block_contents": "Number of repeats for the prescription."}, "doc.tamanu.pharmacy_order_prescriptions__is_completed": {"name": "pharmacy_order_prescriptions__is_completed", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_order_prescriptions.md", "original_file_path": "../../database/model/public/pharmacy_order_prescriptions.md", "unique_id": "doc.tamanu.pharmacy_order_prescriptions__is_completed", "block_contents": "Indicates whether this prescription has been fully completed. Set to `true` when all repeats have been dispensed for a discharge prescription (outpatient medication). Used to filter completed prescriptions from active medication request lists."}, "doc.tamanu.table__devices": {"name": "table__devices", "resource_type": "doc", "package_name": "tamanu", "path": "devices.md", "original_file_path": "../../database/model/public/devices.md", "unique_id": "doc.tamanu.table__devices", "block_contents": "Devices that are authorised to login.\n\nDevices not in the table can only connect if the user they're\n**first** logging in as has enough quota (`device_registration_quota`\non the [`users`](#!/source/source.tamanu.tamanu.users) table.)\n\nThis check is not performed when `features.deviceRegistrationQuota` is disabled."}, "doc.tamanu.devices__last_seen_at": {"name": "devices__last_seen_at", "resource_type": "doc", "package_name": "tamanu", "path": "devices.md", "original_file_path": "../../database/model/public/devices.md", "unique_id": "doc.tamanu.devices__last_seen_at", "block_contents": "When this device last logged in."}, "doc.tamanu.devices__registered_by_id": {"name": "devices__registered_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "devices.md", "original_file_path": "../../database/model/public/devices.md", "unique_id": "doc.tamanu.devices__registered_by_id", "block_contents": "Which user registered this device.\n\nThis is used for quota calculations."}, "doc.tamanu.devices__name": {"name": "devices__name", "resource_type": "doc", "package_name": "tamanu", "path": "devices.md", "original_file_path": "../../database/model/public/devices.md", "unique_id": "doc.tamanu.devices__name", "block_contents": "Optional descriptive name, to make it easier to map device IDs to real devices\nin debugging and troubleshooting situations."}, "doc.tamanu.devices__scopes": {"name": "devices__scopes", "resource_type": "doc", "package_name": "tamanu", "path": "devices.md", "original_file_path": "../../database/model/public/devices.md", "unique_id": "doc.tamanu.devices__scopes", "block_contents": "Scopes the device is authorised to access.\n\nScopes allow access to parts of the API that are closed to other devices\notherwise. Some scopes are restricted by quota. Devices aren't allowed to\nrequest more scopes than they currently have, but may login without\nspecifying the full scopes they have."}, "doc.tamanu.table__medication_dispenses": {"name": "table__medication_dispenses", "resource_type": "doc", "package_name": "tamanu", "path": "medication_dispenses.md", "original_file_path": "../../database/model/public/medication_dispenses.md", "unique_id": "doc.tamanu.table__medication_dispenses", "block_contents": "Records of medication dispensing events, tracking when medications from pharmacy orders are physically dispensed to patients. Each record represents a single dispensing event for a specific prescription within a pharmacy order."}, "doc.tamanu.medication_dispenses__pharmacy_order_prescription_id": {"name": "medication_dispenses__pharmacy_order_prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_dispenses.md", "original_file_path": "../../database/model/public/medication_dispenses.md", "unique_id": "doc.tamanu.medication_dispenses__pharmacy_order_prescription_id", "block_contents": "Reference to the [pharmacy_order_prescription](#!/source/source.tamanu.tamanu.pharmacy_order_prescriptions) that this dispense record fulfills. Links this dispensing event to the specific medication order being filled."}, "doc.tamanu.medication_dispenses__quantity": {"name": "medication_dispenses__quantity", "resource_type": "doc", "package_name": "tamanu", "path": "medication_dispenses.md", "original_file_path": "../../database/model/public/medication_dispenses.md", "unique_id": "doc.tamanu.medication_dispenses__quantity", "block_contents": "The quantity of medication units dispensed to the patient in each dispensing."}, "doc.tamanu.medication_dispenses__instructions": {"name": "medication_dispenses__instructions", "resource_type": "doc", "package_name": "tamanu", "path": "medication_dispenses.md", "original_file_path": "../../database/model/public/medication_dispenses.md", "unique_id": "doc.tamanu.medication_dispenses__instructions", "block_contents": "Additional instructions provided to the patient when dispensing the medication, such as dosage guidance, timing, storage requirements, or special considerations for administration."}, "doc.tamanu.medication_dispenses__dispensed_by_user_id": {"name": "medication_dispenses__dispensed_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_dispenses.md", "original_file_path": "../../database/model/public/medication_dispenses.md", "unique_id": "doc.tamanu.medication_dispenses__dispensed_by_user_id", "block_contents": "Reference to the [user](#!/model/model.public.users) (typically a pharmacist or pharmacy staff member) who dispensed the medication."}, "doc.tamanu.medication_dispenses__dispensed_at": {"name": "medication_dispenses__dispensed_at", "resource_type": "doc", "package_name": "tamanu", "path": "medication_dispenses.md", "original_file_path": "../../database/model/public/medication_dispenses.md", "unique_id": "doc.tamanu.medication_dispenses__dispensed_at", "block_contents": "The timestamp indicating when the medication was physically dispensed to the patient."}, "doc.tamanu.table__attachments": {"name": "table__attachments", "resource_type": "doc", "package_name": "tamanu", "path": "attachments.md", "original_file_path": "../../database/model/public/attachments.md", "unique_id": "doc.tamanu.table__attachments", "block_contents": "Uploaded files.\n\nThese can be documents, photo IDs, patient letters...\n\nMost direct uploads will have a corresponding [`document_metadata`](#!/source/source.tamanu.tamanu.document_metadata),\nbut there's other ways to upload files, such as [for lab requests](#!/source/source.tamanu.tamanu.lab_request_attachments).\n\nUploaded files are not currently synced to facility servers. Instead, servers request the contents\nof documents just-in-time. This does require facility servers to be \"online\" but significantly\nreduces sync pressure."}, "doc.tamanu.attachments__name": {"name": "attachments__name", "resource_type": "doc", "package_name": "tamanu", "path": "attachments.md", "original_file_path": "../../database/model/public/attachments.md", "unique_id": "doc.tamanu.attachments__name", "block_contents": "The name for the attachment set on upload.\n\nTypically this is the filename."}, "doc.tamanu.attachments__type": {"name": "attachments__type", "resource_type": "doc", "package_name": "tamanu", "path": "attachments.md", "original_file_path": "../../database/model/public/attachments.md", "unique_id": "doc.tamanu.attachments__type", "block_contents": "The [media type](https://en.wikipedia.org/wiki/Media_type) of the file."}, "doc.tamanu.attachments__size": {"name": "attachments__size", "resource_type": "doc", "package_name": "tamanu", "path": "attachments.md", "original_file_path": "../../database/model/public/attachments.md", "unique_id": "doc.tamanu.attachments__size", "block_contents": "The file size in bytes."}, "doc.tamanu.attachments__data": {"name": "attachments__data", "resource_type": "doc", "package_name": "tamanu", "path": "attachments.md", "original_file_path": "../../database/model/public/attachments.md", "unique_id": "doc.tamanu.attachments__data", "block_contents": "The file data."}, "doc.tamanu.table__sync_device_ticks": {"name": "table__sync_device_ticks", "resource_type": "doc", "package_name": "tamanu", "path": "sync_device_ticks.md", "original_file_path": "../../database/model/public/sync_device_ticks.md", "unique_id": "doc.tamanu.table__sync_device_ticks", "block_contents": "Cache of which syncing device is at which tick.\n\nThis is used internally as part of sync."}, "doc.tamanu.sync_device_ticks__persisted_at_sync_tick": {"name": "sync_device_ticks__persisted_at_sync_tick", "resource_type": "doc", "package_name": "tamanu", "path": "sync_device_ticks.md", "original_file_path": "../../database/model/public/sync_device_ticks.md", "unique_id": "doc.tamanu.sync_device_ticks__persisted_at_sync_tick", "block_contents": "The sync tick."}, "doc.tamanu.sync_device_ticks__device_id": {"name": "sync_device_ticks__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_device_ticks.md", "original_file_path": "../../database/model/public/sync_device_ticks.md", "unique_id": "doc.tamanu.sync_device_ticks__device_id", "block_contents": "The device that's at this sync tick."}, "doc.tamanu.table__imaging_results": {"name": "table__imaging_results", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.table__imaging_results", "block_contents": "Result of an [imaging request](#!/source/source.tamanu.tamanu.imaging_requests).\n\nIn practice, there is usually one or two results per request:\n- one containing a reference to a PACS image, when imaging integrations are enabled;\n- one containing notes from a doctor who analysed the image.\n\nHowever there is no limit; for example there may be multiple notes from multiple doctors."}, "doc.tamanu.imaging_results__imaging_request_id": {"name": "imaging_results__imaging_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.imaging_results__imaging_request_id", "block_contents": "Reference to the [imaging request](#!/source/source.tamanu.tamanu.imaging_requests)."}, "doc.tamanu.imaging_results__completed_by_id": {"name": "imaging_results__completed_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.imaging_results__completed_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who completed this imaging."}, "doc.tamanu.imaging_results__description": {"name": "imaging_results__description", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.imaging_results__description", "block_contents": "Free-form description / notes about this imaging."}, "doc.tamanu.imaging_results__external_code": {"name": "imaging_results__external_code", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.imaging_results__external_code", "block_contents": "External code for this result, used with PACS integration (generally via FHIR)."}, "doc.tamanu.imaging_results__completed_at": {"name": "imaging_results__completed_at", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.imaging_results__completed_at", "block_contents": "When this result was completed."}, "doc.tamanu.imaging_results__result_image_url": {"name": "imaging_results__result_image_url", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_results.md", "original_file_path": "../../database/model/public/imaging_results.md", "unique_id": "doc.tamanu.imaging_results__result_image_url", "block_contents": "Link to external imaging result viewer."}, "doc.tamanu.table__patient_field_definitions": {"name": "table__patient_field_definitions", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definitions.md", "original_file_path": "../../database/model/public/patient_field_definitions.md", "unique_id": "doc.tamanu.table__patient_field_definitions", "block_contents": "Custom inputs to be included in the Tamanu patient details screens.\n\nThese are grouped using [categories](#!/source/source.tamanu.tamanu.patient_field_definition_categories)."}, "doc.tamanu.patient_field_definitions__name": {"name": "patient_field_definitions__name", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definitions.md", "original_file_path": "../../database/model/public/patient_field_definitions.md", "unique_id": "doc.tamanu.patient_field_definitions__name", "block_contents": "Name of the input."}, "doc.tamanu.patient_field_definitions__field_type": {"name": "patient_field_definitions__field_type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definitions.md", "original_file_path": "../../database/model/public/patient_field_definitions.md", "unique_id": "doc.tamanu.patient_field_definitions__field_type", "block_contents": "Input field type.\n\nOne of:\n- `string`\n- `number`\n- `select`"}, "doc.tamanu.patient_field_definitions__options": {"name": "patient_field_definitions__options", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definitions.md", "original_file_path": "../../database/model/public/patient_field_definitions.md", "unique_id": "doc.tamanu.patient_field_definitions__options", "block_contents": "When `type = 'select'`, the list of options for this select.\n\nPostgreSQL array of strings."}, "doc.tamanu.patient_field_definitions__category_id": {"name": "patient_field_definitions__category_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_field_definitions.md", "original_file_path": "../../database/model/public/patient_field_definitions.md", "unique_id": "doc.tamanu.patient_field_definitions__category_id", "block_contents": "The [category](#!/source/source.tamanu.tamanu.patient_field_definition_categories) this field is in."}, "doc.tamanu.table__patient_communications": {"name": "table__patient_communications", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.table__patient_communications", "block_contents": "Messages being sent to a patient, via a variety of channels.\n\nThis is a multiplexed queue to send emails, SMS, IM messages, etc specifically to patients.\n\nProcessed by the `PatientEmailCommunicationProcessor` scheduled task."}, "doc.tamanu.patient_communications__type": {"name": "patient_communications__type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__type", "block_contents": "The type of communication.\n\nThis affects the template or action being taken."}, "doc.tamanu.patient_communications__channel": {"name": "patient_communications__channel", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__channel", "block_contents": "The channel to send the message with.\n\nOne of:\n- Email\n- Sms\n- WhatsApp\n- Telegram"}, "doc.tamanu.patient_communications__subject": {"name": "patient_communications__subject", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__subject", "block_contents": "Subject line (short summary of the message).\n\nThis is the subject line of an email, or equivalent for other channels."}, "doc.tamanu.patient_communications__content": {"name": "patient_communications__content", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__content", "block_contents": "Content of the message."}, "doc.tamanu.patient_communications__status": {"name": "patient_communications__status", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__status", "block_contents": "Processing status of the communication.\n\nOne of:\n- `Queued`\n- `Processed`\n- `Sent`\n- `Error`\n- `Delivered`\n- `Bad Format`"}, "doc.tamanu.patient_communications__error": {"name": "patient_communications__error", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__error", "block_contents": "If the communication sending fails, this is the error."}, "doc.tamanu.patient_communications__retry_count": {"name": "patient_communications__retry_count", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__retry_count", "block_contents": "How many times the sending has been retried."}, "doc.tamanu.patient_communications__patient_id": {"name": "patient_communications__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__patient_id", "block_contents": "The [patient](#!/source/source.tamanu.tamanu.patients) that communication is for."}, "doc.tamanu.patient_communications__destination": {"name": "patient_communications__destination", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__destination", "block_contents": "Destination address to send this message to.\n\nIf this is not provided here, it will be derived from the patient, such as using the\n[`patient_contacts`](#!/source/source.tamanu.tamanu.patient_contacts) table."}, "doc.tamanu.patient_communications__attachment": {"name": "patient_communications__attachment", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__attachment", "block_contents": "The attachment as a string."}, "doc.tamanu.patient_communications__hash": {"name": "patient_communications__hash", "resource_type": "doc", "package_name": "tamanu", "path": "patient_communications.md", "original_file_path": "../../database/model/public/patient_communications.md", "unique_id": "doc.tamanu.patient_communications__hash", "block_contents": "Hash of original data that went into creating the row, for purposes of deduplication.\n\nThe hashing is done with the `hashtext` postgres function."}, "doc.tamanu.table__sync_lookup_ticks": {"name": "table__sync_lookup_ticks", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup_ticks.md", "original_file_path": "../../database/model/public/sync_lookup_ticks.md", "unique_id": "doc.tamanu.table__sync_lookup_ticks", "block_contents": "Stores range of sync lookup ticks per sync."}, "doc.tamanu.sync_lookup_ticks__source_start_tick": {"name": "sync_lookup_ticks__source_start_tick", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup_ticks.md", "original_file_path": "../../database/model/public/sync_lookup_ticks.md", "unique_id": "doc.tamanu.sync_lookup_ticks__source_start_tick", "block_contents": "Represents the previous lookup up to tick."}, "doc.tamanu.sync_lookup_ticks__lookup_end_tick": {"name": "sync_lookup_ticks__lookup_end_tick", "resource_type": "doc", "package_name": "tamanu", "path": "sync_lookup_ticks.md", "original_file_path": "../../database/model/public/sync_lookup_ticks.md", "unique_id": "doc.tamanu.sync_lookup_ticks__lookup_end_tick", "block_contents": "Represents the new sync tick at time of updating lookup-pending records."}, "doc.tamanu.table__portal_one_time_tokens": {"name": "table__portal_one_time_tokens", "resource_type": "doc", "package_name": "tamanu", "path": "portal_one_time_tokens.md", "original_file_path": "../../database/model/public/portal_one_time_tokens.md", "unique_id": "doc.tamanu.table__portal_one_time_tokens", "block_contents": "A table that stores one-time tokens for portal users. These tokens are used for secure operations such as login, password reset, and other temporary authentication requirements. Each token is associated with a specific portal user and has an expiration date."}, "doc.tamanu.portal_one_time_tokens__portal_user_id": {"name": "portal_one_time_tokens__portal_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_one_time_tokens.md", "original_file_path": "../../database/model/public/portal_one_time_tokens.md", "unique_id": "doc.tamanu.portal_one_time_tokens__portal_user_id", "block_contents": "Foreign key that references the id of the portal user to whom this token belongs. When the user is deleted, all associated tokens are automatically deleted (CASCADE)."}, "doc.tamanu.portal_one_time_tokens__type": {"name": "portal_one_time_tokens__type", "resource_type": "doc", "package_name": "tamanu", "path": "portal_one_time_tokens.md", "original_file_path": "../../database/model/public/portal_one_time_tokens.md", "unique_id": "doc.tamanu.portal_one_time_tokens__type", "block_contents": "Specifies the purpose of the token\nOne of:\n- `login` (default)\n- `password-reset`"}, "doc.tamanu.portal_one_time_tokens__token": {"name": "portal_one_time_tokens__token", "resource_type": "doc", "package_name": "tamanu", "path": "portal_one_time_tokens.md", "original_file_path": "../../database/model/public/portal_one_time_tokens.md", "unique_id": "doc.tamanu.portal_one_time_tokens__token", "block_contents": "The unique, secure token string that is used for verification. This token should be generated with strong cryptographic methods to ensure security."}, "doc.tamanu.portal_one_time_tokens__expires_at": {"name": "portal_one_time_tokens__expires_at", "resource_type": "doc", "package_name": "tamanu", "path": "portal_one_time_tokens.md", "original_file_path": "../../database/model/public/portal_one_time_tokens.md", "unique_id": "doc.tamanu.portal_one_time_tokens__expires_at", "block_contents": "The timestamp at which this token expires and becomes invalid. Tokens should have a limited lifespan appropriate to their purpose, typically ranging from a few minutes to 24 hours depending on the token type."}, "doc.tamanu.table__imaging_requests": {"name": "table__imaging_requests", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.table__imaging_requests", "block_contents": "Imaging requests are the entrypoint of imaging workflows in Tamanu.\n\nEach row is a request for radiology to perform one or more imagings on a patient.\n\nImagings can have one or more [request areas](#!/source/source.tamanu.tamanu.imaging_request_areas)\nattached, and when completed will have [results](#!/source/source.tamanu.tamanu.imaging_results)."}, "doc.tamanu.imaging_requests__status": {"name": "imaging_requests__status", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__status", "block_contents": "The status of the request.\n\nOne of:\n- `pending`\n- `in_progress`\n- `completed`\n- `cancelled`\n- `deleted`\n- `entered_in_error`"}, "doc.tamanu.imaging_requests__requested_date": {"name": "imaging_requests__requested_date", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__requested_date", "block_contents": "When the imaging was requested."}, "doc.tamanu.imaging_requests__encounter_id": {"name": "imaging_requests__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this imaging request is a part of."}, "doc.tamanu.imaging_requests__requested_by_id": {"name": "imaging_requests__requested_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__requested_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who requested this imaging."}, "doc.tamanu.imaging_requests__legacy_results": {"name": "imaging_requests__legacy_results", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__legacy_results", "block_contents": "[Deprecated] Description of the results.\n\nSince v1.24 this has moved to the [imaging results](#!/source/source.tamanu.tamanu.imaging_results) table."}, "doc.tamanu.imaging_requests__completed_by_id": {"name": "imaging_requests__completed_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__completed_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who completed this imaging."}, "doc.tamanu.imaging_requests__location_id": {"name": "imaging_requests__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__location_id", "block_contents": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) for this imaging request."}, "doc.tamanu.imaging_requests__imaging_type": {"name": "imaging_requests__imaging_type", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__imaging_type", "block_contents": "Type of imaging.\n\nOne of:\n- `angiogram`\n- `colonoscopy`\n- `ctScan`\n- `ecg`\n- `echocardiogram`\n- `endoscopy`\n- `fluroscopy`\n- `holterMonitor`\n- `mammogram`\n- `orthopantomography`\n- `mri`\n- `stressTest`\n- `ultrasound`\n- `vascularStudy`\n- `xRay`"}, "doc.tamanu.imaging_requests__requested_date_legacy": {"name": "imaging_requests__requested_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__requested_date_legacy", "block_contents": "[Deprecated] Timestamp when the imaging was requested."}, "doc.tamanu.imaging_requests__priority": {"name": "imaging_requests__priority", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__priority", "block_contents": "Priority of the request.\n\nThis is a customisable list; by default the values are `routine`, `urgent`, `asap`, `stat`."}, "doc.tamanu.imaging_requests__location_group_id": {"name": "imaging_requests__location_group_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__location_group_id", "block_contents": "Reference to the [location group](#!/source/source.tamanu.tamanu.location_groups) for this imaging request."}, "doc.tamanu.imaging_requests__reason_for_cancellation": {"name": "imaging_requests__reason_for_cancellation", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__reason_for_cancellation", "block_contents": "If the request is cancelled, why that is.\n\nThis is a customisable list; by default the values are `duplicate` and `entered-in-error`.\n\nThe 31-character limit was [arbitrary to avoid extremely long values set in error](https://github.com/beyondessential/tamanu/pull/3512/files#r1102169113)."}, "doc.tamanu.imaging_requests__display_id": {"name": "imaging_requests__display_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_requests.md", "original_file_path": "../../database/model/public/imaging_requests.md", "unique_id": "doc.tamanu.imaging_requests__display_id", "block_contents": "Short unique identifier used on the frontend."}, "doc.tamanu.table__encounter_pause_prescriptions": {"name": "table__encounter_pause_prescriptions", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.table__encounter_pause_prescriptions", "block_contents": "Records details about the prescription being paused, the duration and timing of the pause, and the clinician responsible for initiating the pause."}, "doc.tamanu.encounter_pause_prescriptions__encounter_prescription_id": {"name": "encounter_pause_prescriptions__encounter_prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__encounter_prescription_id", "block_contents": "References the unique identifier of the prescription being paused. This links to the `encounter_prescriptions` table to provide context about the specific prescription."}, "doc.tamanu.encounter_pause_prescriptions__pause_duration": {"name": "encounter_pause_prescriptions__pause_duration", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__pause_duration", "block_contents": "Describes the length of time for which the prescription is paused. This value works in conjunction with the `pause_time_unit` field to specify the duration (e.g., 5 days, 2 weeks)."}, "doc.tamanu.encounter_pause_prescriptions__pause_time_unit": {"name": "encounter_pause_prescriptions__pause_time_unit", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__pause_time_unit", "block_contents": "Specifies the unit of time for the pause duration. Common values include days, weeks and it works in conjunction with the `pause_duration` field to define the total pause period."}, "doc.tamanu.encounter_pause_prescriptions__pause_start_date": {"name": "encounter_pause_prescriptions__pause_start_date", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__pause_start_date", "block_contents": "Indicates the date when the prescription pause begins. This field is used to track the start of the pause period."}, "doc.tamanu.encounter_pause_prescriptions__pause_end_date": {"name": "encounter_pause_prescriptions__pause_end_date", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__pause_end_date", "block_contents": "Indicates the date when the prescription pause ends. This field is used to track the end of the pause period."}, "doc.tamanu.encounter_pause_prescriptions__notes": {"name": "encounter_pause_prescriptions__notes", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__notes", "block_contents": "Provides additional information or context about the prescription pause."}, "doc.tamanu.encounter_pause_prescriptions__pausing_clinician_id": {"name": "encounter_pause_prescriptions__pausing_clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__pausing_clinician_id", "block_contents": "References the unique identifier of the clinician responsible for initiating the pause."}, "doc.tamanu.encounter_pause_prescriptions__created_by": {"name": "encounter_pause_prescriptions__created_by", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescriptions.md", "original_file_path": "../../database/model/public/encounter_pause_prescriptions.md", "unique_id": "doc.tamanu.encounter_pause_prescriptions__created_by", "block_contents": "References the unique identifier of the user who created the record."}, "doc.tamanu.table__program_registries": {"name": "table__program_registries", "resource_type": "doc", "package_name": "tamanu", "path": "program_registries.md", "original_file_path": "../../database/model/public/program_registries.md", "unique_id": "doc.tamanu.table__program_registries", "block_contents": "Table of program registries.\n\nThis provides functionality to track a patient population defined by a particular disease or\ncondition, and follow this population over time.\n\nThis table defines the different registries available to track users with."}, "doc.tamanu.program_registries__code": {"name": "program_registries__code", "resource_type": "doc", "package_name": "tamanu", "path": "program_registries.md", "original_file_path": "../../database/model/public/program_registries.md", "unique_id": "doc.tamanu.program_registries__code", "block_contents": "Machine-friendly identifier."}, "doc.tamanu.program_registries__name": {"name": "program_registries__name", "resource_type": "doc", "package_name": "tamanu", "path": "program_registries.md", "original_file_path": "../../database/model/public/program_registries.md", "unique_id": "doc.tamanu.program_registries__name", "block_contents": "Human-friendly name."}, "doc.tamanu.program_registries__currently_at_type": {"name": "program_registries__currently_at_type", "resource_type": "doc", "package_name": "tamanu", "path": "program_registries.md", "original_file_path": "../../database/model/public/program_registries.md", "unique_id": "doc.tamanu.program_registries__currently_at_type", "block_contents": "Defines what kind of location the registry can be filtered with.\n\nOne of:\n- `village`\n- `facility`"}, "doc.tamanu.program_registries__program_id": {"name": "program_registries__program_id", "resource_type": "doc", "package_name": "tamanu", "path": "program_registries.md", "original_file_path": "../../database/model/public/program_registries.md", "unique_id": "doc.tamanu.program_registries__program_id", "block_contents": "Reference to a [program](#!/source/source.tamanu.tamanu.programs)."}, "doc.tamanu.table__triages": {"name": "table__triages", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.table__triages", "block_contents": "Triage data of patients waiting in an emergency department."}, "doc.tamanu.triages__arrival_time": {"name": "triages__arrival_time", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__arrival_time", "block_contents": "When the patient arrived."}, "doc.tamanu.triages__triage_time": {"name": "triages__triage_time", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__triage_time", "block_contents": "When the patient was triaged."}, "doc.tamanu.triages__closed_time": {"name": "triages__closed_time", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__closed_time", "block_contents": "When the patient was processed."}, "doc.tamanu.triages__score": {"name": "triages__score", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__score", "block_contents": "Classification done by the triage practitioner."}, "doc.tamanu.triages__encounter_id": {"name": "triages__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this triage is for."}, "doc.tamanu.triages__practitioner_id": {"name": "triages__practitioner_id", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__practitioner_id", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) assigned to this patient."}, "doc.tamanu.triages__chief_complaint_id": {"name": "triages__chief_complaint_id", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__chief_complaint_id", "block_contents": "Reference to the primary complaint ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = triageReason`)."}, "doc.tamanu.triages__secondary_complaint_id": {"name": "triages__secondary_complaint_id", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__secondary_complaint_id", "block_contents": "Reference to the secondary complaint ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = triageReason`)."}, "doc.tamanu.triages__arrival_time_legacy": {"name": "triages__arrival_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__arrival_time_legacy", "block_contents": "[Deprecated] When the patient arrived."}, "doc.tamanu.triages__triage_time_legacy": {"name": "triages__triage_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__triage_time_legacy", "block_contents": "[Deprecated] When the patient was triaged."}, "doc.tamanu.triages__closed_time_legacy": {"name": "triages__closed_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__closed_time_legacy", "block_contents": "[Deprecated] When the patient was processed."}, "doc.tamanu.triages__arrival_mode_id": {"name": "triages__arrival_mode_id", "resource_type": "doc", "package_name": "tamanu", "path": "triages.md", "original_file_path": "../../database/model/public/triages.md", "unique_id": "doc.tamanu.triages__arrival_mode_id", "block_contents": "Reference to how the patient arrived ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = arrivalMode`)."}, "doc.tamanu.table__sync_queued_devices": {"name": "table__sync_queued_devices", "resource_type": "doc", "package_name": "tamanu", "path": "sync_queued_devices.md", "original_file_path": "../../database/model/public/sync_queued_devices.md", "unique_id": "doc.tamanu.table__sync_queued_devices", "block_contents": "Devices waiting their turn to be synced."}, "doc.tamanu.sync_queued_devices__last_seen_time": {"name": "sync_queued_devices__last_seen_time", "resource_type": "doc", "package_name": "tamanu", "path": "sync_queued_devices.md", "original_file_path": "../../database/model/public/sync_queued_devices.md", "unique_id": "doc.tamanu.sync_queued_devices__last_seen_time", "block_contents": "The last time the device has reached out to the syncing server."}, "doc.tamanu.sync_queued_devices__last_synced_tick": {"name": "sync_queued_devices__last_synced_tick", "resource_type": "doc", "package_name": "tamanu", "path": "sync_queued_devices.md", "original_file_path": "../../database/model/public/sync_queued_devices.md", "unique_id": "doc.tamanu.sync_queued_devices__last_synced_tick", "block_contents": "The sync tick the device is currently at."}, "doc.tamanu.sync_queued_devices__facility_id_legacy": {"name": "sync_queued_devices__facility_id_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "sync_queued_devices.md", "original_file_path": "../../database/model/public/sync_queued_devices.md", "unique_id": "doc.tamanu.sync_queued_devices__facility_id_legacy", "block_contents": "[Deprecated] Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this device is associated with."}, "doc.tamanu.sync_queued_devices__urgent": {"name": "sync_queued_devices__urgent", "resource_type": "doc", "package_name": "tamanu", "path": "sync_queued_devices.md", "original_file_path": "../../database/model/public/sync_queued_devices.md", "unique_id": "doc.tamanu.sync_queued_devices__urgent", "block_contents": "A way for a device to bump its priority in the queue."}, "doc.tamanu.sync_queued_devices__facility_ids": {"name": "sync_queued_devices__facility_ids", "resource_type": "doc", "package_name": "tamanu", "path": "sync_queued_devices.md", "original_file_path": "../../database/model/public/sync_queued_devices.md", "unique_id": "doc.tamanu.sync_queued_devices__facility_ids", "block_contents": "Reference to the [facilities](#!/source/source.tamanu.tamanu.facilities) this device is associated with."}, "doc.tamanu.generic__schema": {"name": "generic__schema", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__schema", "block_contents": "Contains the primary data for Tamanu.\n\nThis is the main namespace for Tamanu data. All contained here is generally regarded as the source\nof truth within Tamanu, with data in other schemas being ether auxiliary or derived from this in\nsome way.\n\nDespite the name, this schema is not accessible publicly via postgres, and requires authentication."}, "doc.tamanu.generic__id": {"name": "generic__id", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__id", "block_contents": "Tamanu internal identifier (generally a UUID)"}, "doc.tamanu.generic__created_at": {"name": "generic__created_at", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__created_at", "block_contents": "Timestamp of when record was created"}, "doc.tamanu.generic__updated_at": {"name": "generic__updated_at", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__updated_at", "block_contents": "Timestamp of when record was last updated"}, "doc.tamanu.generic__deleted_at": {"name": "generic__deleted_at", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__deleted_at", "block_contents": "Timestamp of when record was deleted"}, "doc.tamanu.generic__updated_by": {"name": "generic__updated_by", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__updated_by", "block_contents": "The identifier of the user logged on when the record was created, updated or deleted"}, "doc.tamanu.generic__date": {"name": "generic__date", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__date", "block_contents": "Local date for the record"}, "doc.tamanu.generic__datetime": {"name": "generic__datetime", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__datetime", "block_contents": "Local date and time for the record"}, "doc.tamanu.generic__start_datetime": {"name": "generic__start_datetime", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__start_datetime", "block_contents": "Local start date and time for the record"}, "doc.tamanu.generic__end_datetime": {"name": "generic__end_datetime", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__end_datetime", "block_contents": "Local end date and time for the record"}, "doc.tamanu.generic__date_legacy": {"name": "generic__date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__date_legacy", "block_contents": "[Deprecated] date field which is a timestamp of the event being recorded"}, "doc.tamanu.generic__date_recorded": {"name": "generic__date_recorded", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__date_recorded", "block_contents": "Local date and time of the event being recorded"}, "doc.tamanu.generic__date_recorded_legacy": {"name": "generic__date_recorded_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__date_recorded_legacy", "block_contents": "[Deprecated] date field which is a timestamp of the event being recorded"}, "doc.tamanu.generic__deletion_date": {"name": "generic__deletion_date", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__deletion_date", "block_contents": "Date field which is a timestamp of record being deleted"}, "doc.tamanu.generic__visibility_status": {"name": "generic__visibility_status", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__visibility_status", "block_contents": "The visibility status of the record.\n\n- `current` indicates the record is currently in use and should be visible and accessible to users\n  on the User Interface.\n- `historical` indicates that the record is no longer in use and should not be visible nor\n  accessible to users. However, the record may still be present in Reporting.\n- `merged` indicates that the record has been merged, is no longer in use and should not be visible\n  nor accessible to users.\n\nThe default value is `current`."}, "doc.tamanu.generic__updated_at_sync_tick": {"name": "generic__updated_at_sync_tick", "resource_type": "doc", "package_name": "tamanu", "path": "generic.md", "original_file_path": "../../database/model/public/generic.md", "unique_id": "doc.tamanu.generic__updated_at_sync_tick", "block_contents": "Last tick that the record was updated. Used to figure out old vs new data when syncing"}, "doc.tamanu.table__certifiable_vaccines": {"name": "table__certifiable_vaccines", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.table__certifiable_vaccines", "block_contents": "Table of scheduled vaccines which are eligible for inclusion in COVID-19 vaccine certificates.\n\nThis table signals which vaccines may be included in the COVID-19 vaccine certificate printout."}, "doc.tamanu.certifiable_vaccines__vaccine_id": {"name": "certifiable_vaccines__vaccine_id", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__vaccine_id", "block_contents": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data) (`type=vaccine`)\nfor the vaccine drug."}, "doc.tamanu.certifiable_vaccines__manufacturer_id": {"name": "certifiable_vaccines__manufacturer_id", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__manufacturer_id", "block_contents": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data) (`type=manufacturer`)\nfor the organisation that manufactured the drug."}, "doc.tamanu.certifiable_vaccines__icd11_drug_code": {"name": "certifiable_vaccines__icd11_drug_code", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__icd11_drug_code", "block_contents": "Free-text for the ICD11 code for the drug."}, "doc.tamanu.certifiable_vaccines__icd11_disease_code": {"name": "certifiable_vaccines__icd11_disease_code", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__icd11_disease_code", "block_contents": "Free-text for the ICD11 code for the disease targeted by the drug."}, "doc.tamanu.certifiable_vaccines__vaccine_code": {"name": "certifiable_vaccines__vaccine_code", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__vaccine_code", "block_contents": "SNOMED CT or ATC code for the vaccine type."}, "doc.tamanu.certifiable_vaccines__target_code": {"name": "certifiable_vaccines__target_code", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__target_code", "block_contents": "SNOMED CT or ATC code for targeted disease."}, "doc.tamanu.certifiable_vaccines__eu_product_code": {"name": "certifiable_vaccines__eu_product_code", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__eu_product_code", "block_contents": "EU authorisation code for the vaccine product."}, "doc.tamanu.certifiable_vaccines__maximum_dosage": {"name": "certifiable_vaccines__maximum_dosage", "resource_type": "doc", "package_name": "tamanu", "path": "certifiable_vaccines.md", "original_file_path": "../../database/model/public/certifiable_vaccines.md", "unique_id": "doc.tamanu.certifiable_vaccines__maximum_dosage", "block_contents": "Maximum number of doses. Defaults to 1."}, "doc.tamanu.table__survey_response_answers": {"name": "table__survey_response_answers", "resource_type": "doc", "package_name": "tamanu", "path": "survey_response_answers.md", "original_file_path": "../../database/model/public/survey_response_answers.md", "unique_id": "doc.tamanu.table__survey_response_answers", "block_contents": "A single answer as part of a [survey response](#!/source/source.tamanu.tamanu.survey_responses)."}, "doc.tamanu.survey_response_answers__name": {"name": "survey_response_answers__name", "resource_type": "doc", "package_name": "tamanu", "path": "survey_response_answers.md", "original_file_path": "../../database/model/public/survey_response_answers.md", "unique_id": "doc.tamanu.survey_response_answers__name", "block_contents": "Name of the question."}, "doc.tamanu.survey_response_answers__body": {"name": "survey_response_answers__body", "resource_type": "doc", "package_name": "tamanu", "path": "survey_response_answers.md", "original_file_path": "../../database/model/public/survey_response_answers.md", "unique_id": "doc.tamanu.survey_response_answers__body", "block_contents": "Value of the answer."}, "doc.tamanu.survey_response_answers__response_id": {"name": "survey_response_answers__response_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_response_answers.md", "original_file_path": "../../database/model/public/survey_response_answers.md", "unique_id": "doc.tamanu.survey_response_answers__response_id", "block_contents": "The [survey response](#!/source/source.tamanu.tamanu.survey_responses)."}, "doc.tamanu.survey_response_answers__data_element_id": {"name": "survey_response_answers__data_element_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_response_answers.md", "original_file_path": "../../database/model/public/survey_response_answers.md", "unique_id": "doc.tamanu.survey_response_answers__data_element_id", "block_contents": "Reference to the [question](#!/source/source.tamanu.tamanu.program_data_elements)."}, "doc.tamanu.survey_response_answers__body_legacy": {"name": "survey_response_answers__body_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "survey_response_answers.md", "original_file_path": "../../database/model/public/survey_response_answers.md", "unique_id": "doc.tamanu.survey_response_answers__body_legacy", "block_contents": "[Deprecated] Value of the answer in old format."}, "doc.tamanu.table__task_templates": {"name": "table__task_templates", "resource_type": "doc", "package_name": "tamanu", "path": "task_templates.md", "original_file_path": "../../database/model/public/task_templates.md", "unique_id": "doc.tamanu.table__task_templates", "block_contents": "Template of tasks which then can be created upon"}, "doc.tamanu.task_templates__reference_data_id": {"name": "task_templates__reference_data_id", "resource_type": "doc", "package_name": "tamanu", "path": "task_templates.md", "original_file_path": "../../database/model/public/task_templates.md", "unique_id": "doc.tamanu.task_templates__reference_data_id", "block_contents": "The name of task template, referred to ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.task_templates__high_priority": {"name": "task_templates__high_priority", "resource_type": "doc", "package_name": "tamanu", "path": "task_templates.md", "original_file_path": "../../database/model/public/task_templates.md", "unique_id": "doc.tamanu.task_templates__high_priority", "block_contents": "Boolean specify if the task template is high priority."}, "doc.tamanu.task_templates__frequency_value": {"name": "task_templates__frequency_value", "resource_type": "doc", "package_name": "tamanu", "path": "task_templates.md", "original_file_path": "../../database/model/public/task_templates.md", "unique_id": "doc.tamanu.task_templates__frequency_value", "block_contents": "Frequency value of the task template (if the task is repeating), must go with frequency unit."}, "doc.tamanu.task_templates__frequency_unit": {"name": "task_templates__frequency_unit", "resource_type": "doc", "package_name": "tamanu", "path": "task_templates.md", "original_file_path": "../../database/model/public/task_templates.md", "unique_id": "doc.tamanu.task_templates__frequency_unit", "block_contents": "Frequency unit of the task template (if the task is repeating).\n\nOne of:\n- `minute`\n- `hour`\n- `day`"}, "doc.tamanu.table__invoice_patient_payments": {"name": "table__invoice_patient_payments", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_patient_payments.md", "original_file_path": "../../database/model/public/invoice_patient_payments.md", "unique_id": "doc.tamanu.table__invoice_patient_payments", "block_contents": "Extra metadata about a payment when it was done by a patient."}, "doc.tamanu.invoice_patient_payments__invoice_payment_id": {"name": "invoice_patient_payments__invoice_payment_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_patient_payments.md", "original_file_path": "../../database/model/public/invoice_patient_payments.md", "unique_id": "doc.tamanu.invoice_patient_payments__invoice_payment_id", "block_contents": "The [payment](#!/source/source.tamanu.tamanu.invoice_payments)."}, "doc.tamanu.invoice_patient_payments__method_id": {"name": "invoice_patient_payments__method_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_patient_payments.md", "original_file_path": "../../database/model/public/invoice_patient_payments.md", "unique_id": "doc.tamanu.invoice_patient_payments__method_id", "block_contents": "The method used to pay ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.invoice_patient_payments__cheque_number": {"name": "invoice_patient_payments__cheque_number", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_patient_payments.md", "original_file_path": "../../database/model/public/invoice_patient_payments.md", "unique_id": "doc.tamanu.invoice_patient_payments__cheque_number", "block_contents": "The cheque number for cheque payments."}, "doc.tamanu.table__patient_issues": {"name": "table__patient_issues", "resource_type": "doc", "package_name": "tamanu", "path": "patient_issues.md", "original_file_path": "../../database/model/public/patient_issues.md", "unique_id": "doc.tamanu.table__patient_issues", "block_contents": "List of \"other issues\" known about a patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Other patient issues\".\n\nSee also: `public.patient_allergies`, `public.patient_care_plans`, `public.patient_conditions`,\n`public.patient_family_histories`."}, "doc.tamanu.patient_issues__note": {"name": "patient_issues__note", "resource_type": "doc", "package_name": "tamanu", "path": "patient_issues.md", "original_file_path": "../../database/model/public/patient_issues.md", "unique_id": "doc.tamanu.patient_issues__note", "block_contents": "Free-form description of this issue."}, "doc.tamanu.patient_issues__recorded_date": {"name": "patient_issues__recorded_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_issues.md", "original_file_path": "../../database/model/public/patient_issues.md", "unique_id": "doc.tamanu.patient_issues__recorded_date", "block_contents": "Datetime at which this issue was recorded."}, "doc.tamanu.patient_issues__type": {"name": "patient_issues__type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_issues.md", "original_file_path": "../../database/model/public/patient_issues.md", "unique_id": "doc.tamanu.patient_issues__type", "block_contents": "If set to `Warning`, an alert will pop up when visiting the patient."}, "doc.tamanu.patient_issues__patient_id": {"name": "patient_issues__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_issues.md", "original_file_path": "../../database/model/public/patient_issues.md", "unique_id": "doc.tamanu.patient_issues__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_issues__recorded_date_legacy": {"name": "patient_issues__recorded_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_issues.md", "original_file_path": "../../database/model/public/patient_issues.md", "unique_id": "doc.tamanu.patient_issues__recorded_date_legacy", "block_contents": "[Deprecated] Timestamp at which this issue was recorded."}, "doc.tamanu.table__medication_administration_records": {"name": "table__medication_administration_records", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.table__medication_administration_records", "block_contents": "Records of medication administrations to patients, tracking when medications prescribed in the system were given, not given, or otherwise administered."}, "doc.tamanu.medication_administration_records__status": {"name": "medication_administration_records__status", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__status", "block_contents": "Status of the medication administration.\n\nOne of:\n- `GIVEN` - The medication was administered to the patient\n- `NOT_GIVEN` - The medication was not administered to the patient"}, "doc.tamanu.medication_administration_records__prescription_id": {"name": "medication_administration_records__prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__prescription_id", "block_contents": "Reference to the [prescription](#!/source/source.tamanu.tamanu.prescriptions) that this administration record is associated with. Links this administration event to the specific medication order it fulfills."}, "doc.tamanu.medication_administration_records__due_at": {"name": "medication_administration_records__due_at", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__due_at", "block_contents": "The scheduled date and time when the medication administration was planned to occur, based on the prescription's frequency and start date."}, "doc.tamanu.medication_administration_records__recorded_at": {"name": "medication_administration_records__recorded_at", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__recorded_at", "block_contents": "The timestamp indicating when the administration status (e.g., `GIVEN` or `NOT_GIVEN`) was actually recorded in the system. May be null if the status has not yet been recorded."}, "doc.tamanu.medication_administration_records__recorded_by_user_id": {"name": "medication_administration_records__recorded_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__recorded_by_user_id", "block_contents": "Reference to the [user](#!/model/model.public.users) who recorded that the medication was given or not given."}, "doc.tamanu.medication_administration_records__reason_not_given_id": {"name": "medication_administration_records__reason_not_given_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__reason_not_given_id", "block_contents": "Reference to the reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why the medication was not administered to the patient. Only applicable when status is `NOT_GIVEN`."}, "doc.tamanu.medication_administration_records__is_auto_generated": {"name": "medication_administration_records__is_auto_generated", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__is_auto_generated", "block_contents": "Indicates whether this administration record was automatically generated by the system based on the prescription's frequency and schedule. This is typically true for scheduled medications and false for one-time or as-needed medications."}, "doc.tamanu.medication_administration_records__changing_status_reason": {"name": "medication_administration_records__changing_status_reason", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__changing_status_reason", "block_contents": "Optional free text field that allows healthcare professionals to document the reason for changing the status of a medication administration record. This is particularly useful when changing a previously recorded status to a different one."}, "doc.tamanu.medication_administration_records__is_error": {"name": "medication_administration_records__is_error", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__is_error", "block_contents": "Indicates whether this medication administration record is marked as error."}, "doc.tamanu.medication_administration_records__error_notes": {"name": "medication_administration_records__error_notes", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__error_notes", "block_contents": "Detailed description of any errors or discrepancies associated with this medication administration record."}, "doc.tamanu.medication_administration_records__changing_not_given_info_reason": {"name": "medication_administration_records__changing_not_given_info_reason", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__changing_not_given_info_reason", "block_contents": "Optional free text field that allows healthcare professionals to document the reason for modifying information about why a medication was not given. This is used when updating or changing the details of a previously recorded 'not given' status, providing an audit trail of why the information was changed."}, "doc.tamanu.medication_administration_records__is_edited": {"name": "medication_administration_records__is_edited", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_records.md", "original_file_path": "../../database/model/public/medication_administration_records.md", "unique_id": "doc.tamanu.medication_administration_records__is_edited", "block_contents": "Indicates whether this medication administration record has been manually edited after its initial creation or recording."}, "doc.tamanu.table__refresh_tokens": {"name": "table__refresh_tokens", "resource_type": "doc", "package_name": "tamanu", "path": "refresh_tokens.md", "original_file_path": "../../database/model/public/refresh_tokens.md", "unique_id": "doc.tamanu.table__refresh_tokens", "block_contents": "Refresh tokens are used by API clients to refresh their authentication quickly, within a timeout."}, "doc.tamanu.refresh_tokens__refresh_id": {"name": "refresh_tokens__refresh_id", "resource_type": "doc", "package_name": "tamanu", "path": "refresh_tokens.md", "original_file_path": "../../database/model/public/refresh_tokens.md", "unique_id": "doc.tamanu.refresh_tokens__refresh_id", "block_contents": "Random value given to the client to use as this refresh token."}, "doc.tamanu.refresh_tokens__device_id": {"name": "refresh_tokens__device_id", "resource_type": "doc", "package_name": "tamanu", "path": "refresh_tokens.md", "original_file_path": "../../database/model/public/refresh_tokens.md", "unique_id": "doc.tamanu.refresh_tokens__device_id", "block_contents": "Unique device ID from the client."}, "doc.tamanu.refresh_tokens__user_id": {"name": "refresh_tokens__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "refresh_tokens.md", "original_file_path": "../../database/model/public/refresh_tokens.md", "unique_id": "doc.tamanu.refresh_tokens__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users) being authenticated as."}, "doc.tamanu.refresh_tokens__expires_at": {"name": "refresh_tokens__expires_at", "resource_type": "doc", "package_name": "tamanu", "path": "refresh_tokens.md", "original_file_path": "../../database/model/public/refresh_tokens.md", "unique_id": "doc.tamanu.refresh_tokens__expires_at", "block_contents": "When the refresh token expires."}, "doc.tamanu.table__document_metadata": {"name": "table__document_metadata", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.table__document_metadata", "block_contents": "Information about an uploaded document or file, typically attached to an encounter or directly to a patient.\n\nThe actual file data is stored in [`attachments`](#!/source/source.tamanu.tamanu.attachments)."}, "doc.tamanu.document_metadata__name": {"name": "document_metadata__name", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__name", "block_contents": "Free-form name of the document.\n\nOften this is the filename."}, "doc.tamanu.document_metadata__type": {"name": "document_metadata__type", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__type", "block_contents": "The [media type](https://en.wikipedia.org/wiki/Media_type) of the file."}, "doc.tamanu.document_metadata__document_created_at": {"name": "document_metadata__document_created_at", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__document_created_at", "block_contents": "When the document was created.\n\nHistorically (before v2.0) this was the \"created at\" timestamp of the file itself, as reported by\nthe OS. However that information is no longer available to Tamanu in most contexts, so this is now\nusually set to the upload time."}, "doc.tamanu.document_metadata__document_uploaded_at": {"name": "document_metadata__document_uploaded_at", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__document_uploaded_at", "block_contents": "When the document was uploaded."}, "doc.tamanu.document_metadata__document_owner": {"name": "document_metadata__document_owner", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__document_owner", "block_contents": "Name of the person who owns the document.\n\nTypically this is the uploader's name."}, "doc.tamanu.document_metadata__patient_id": {"name": "document_metadata__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients) the document was uploaded to."}, "doc.tamanu.document_metadata__encounter_id": {"name": "document_metadata__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) the document was uploaded to."}, "doc.tamanu.document_metadata__attachment_id": {"name": "document_metadata__attachment_id", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__attachment_id", "block_contents": "The [file data](#!/source/source.tamanu.tamanu.attachments)."}, "doc.tamanu.document_metadata__department_id": {"name": "document_metadata__department_id", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__department_id", "block_contents": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) the document was uploaded from."}, "doc.tamanu.document_metadata__note": {"name": "document_metadata__note", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__note", "block_contents": "Free-form description of the document."}, "doc.tamanu.document_metadata__document_created_at_legacy": {"name": "document_metadata__document_created_at_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__document_created_at_legacy", "block_contents": "[Deprecated] When the document was created."}, "doc.tamanu.document_metadata__document_uploaded_at_legacy": {"name": "document_metadata__document_uploaded_at_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__document_uploaded_at_legacy", "block_contents": "[Deprecated] When the document was uploaded."}, "doc.tamanu.document_metadata__source": {"name": "document_metadata__source", "resource_type": "doc", "package_name": "tamanu", "path": "document_metadata.md", "original_file_path": "../../database/model/public/document_metadata.md", "unique_id": "doc.tamanu.document_metadata__source", "block_contents": "Where the document came from.\n\nOne of:\n- `patient_letter`\n- `uploaded`"}, "doc.tamanu.table__invoice_price_lists": {"name": "table__invoice_price_lists", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_lists.md", "original_file_path": "../../database/model/public/invoice_price_lists.md", "unique_id": "doc.tamanu.table__invoice_price_lists", "block_contents": "Contains price list definitions used for invoice line item pricing. Each price list represents a set of pricing rules that can be applied to different types of invoices, patients, or services."}, "doc.tamanu.invoice_price_lists__code": {"name": "invoice_price_lists__code", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_lists.md", "original_file_path": "../../database/model/public/invoice_price_lists.md", "unique_id": "doc.tamanu.invoice_price_lists__code", "block_contents": "Unique identifier code for the price list. Used for referencing the price list in business logic and integrations."}, "doc.tamanu.invoice_price_lists__name": {"name": "invoice_price_lists__name", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_lists.md", "original_file_path": "../../database/model/public/invoice_price_lists.md", "unique_id": "doc.tamanu.invoice_price_lists__name", "block_contents": "Human-readable name of the price list, displayed in user interfaces and reports."}, "doc.tamanu.invoice_price_lists__rules": {"name": "invoice_price_lists__rules", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_price_lists.md", "original_file_path": "../../database/model/public/invoice_price_lists.md", "unique_id": "doc.tamanu.invoice_price_lists__rules", "block_contents": "JSON configuration containing the pricing rules and logic for this price list. Defines how prices are calculated or retrieved for invoice line items."}, "doc.tamanu.table__death_revert_logs": {"name": "table__death_revert_logs", "resource_type": "doc", "package_name": "tamanu", "path": "death_revert_logs.md", "original_file_path": "../../database/model/public/death_revert_logs.md", "unique_id": "doc.tamanu.table__death_revert_logs", "block_contents": "Patient deaths can be reverted if they were recorded in error, this tracks those reverts.\n\nSee [`patient_death_data`](#!/source/source.tamanu.tamanu.patient_death_data)."}, "doc.tamanu.death_revert_logs__revert_time": {"name": "death_revert_logs__revert_time", "resource_type": "doc", "package_name": "tamanu", "path": "death_revert_logs.md", "original_file_path": "../../database/model/public/death_revert_logs.md", "unique_id": "doc.tamanu.death_revert_logs__revert_time", "block_contents": "When the reversion happened."}, "doc.tamanu.death_revert_logs__death_data_id": {"name": "death_revert_logs__death_data_id", "resource_type": "doc", "package_name": "tamanu", "path": "death_revert_logs.md", "original_file_path": "../../database/model/public/death_revert_logs.md", "unique_id": "doc.tamanu.death_revert_logs__death_data_id", "block_contents": "The [`patient_death_data`](#!/source/source.tamanu.tamanu.patient_death_data) record this is reverting."}, "doc.tamanu.death_revert_logs__patient_id": {"name": "death_revert_logs__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "death_revert_logs.md", "original_file_path": "../../database/model/public/death_revert_logs.md", "unique_id": "doc.tamanu.death_revert_logs__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.death_revert_logs__reverted_by_id": {"name": "death_revert_logs__reverted_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "death_revert_logs.md", "original_file_path": "../../database/model/public/death_revert_logs.md", "unique_id": "doc.tamanu.death_revert_logs__reverted_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who reverted this death record."}, "doc.tamanu.table__templates": {"name": "table__templates", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.table__templates", "block_contents": "Templates used for patient letters and clinical notes etc."}, "doc.tamanu.templates__name": {"name": "templates__name", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.templates__name", "block_contents": "Internal name of the template (used when importing)."}, "doc.tamanu.templates__date_created": {"name": "templates__date_created", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.templates__date_created", "block_contents": "When the template was created."}, "doc.tamanu.templates__title": {"name": "templates__title", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.templates__title", "block_contents": "Title of the template (which will be rendered)."}, "doc.tamanu.templates__body": {"name": "templates__body", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.templates__body", "block_contents": "Body of the template (which will be rendered)."}, "doc.tamanu.templates__created_by_id": {"name": "templates__created_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.templates__created_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who created this template."}, "doc.tamanu.templates__type": {"name": "templates__type", "resource_type": "doc", "package_name": "tamanu", "path": "templates.md", "original_file_path": "../../database/model/public/templates.md", "unique_id": "doc.tamanu.templates__type", "block_contents": "Type of the template (referred to in code)."}, "doc.tamanu.table__tasks": {"name": "table__tasks", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.table__tasks", "block_contents": "Tasks related to encounters"}, "doc.tamanu.tasks__encounter_id": {"name": "tasks__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this task is a part of."}, "doc.tamanu.tasks__name": {"name": "tasks__name", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__name", "block_contents": "Name of the task."}, "doc.tamanu.tasks__due_time": {"name": "tasks__due_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__due_time", "block_contents": "When the task is due."}, "doc.tamanu.tasks__end_time": {"name": "tasks__end_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__end_time", "block_contents": "When the repeating task is end."}, "doc.tamanu.tasks__requested_by_user_id": {"name": "tasks__requested_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__requested_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who requested this task."}, "doc.tamanu.tasks__request_time": {"name": "tasks__request_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__request_time", "block_contents": "When the task is requested."}, "doc.tamanu.tasks__status": {"name": "tasks__status", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__status", "block_contents": "Status of the task.\n\nOne of:\n- `todo`\n- `completed`\n- `non_completed`"}, "doc.tamanu.tasks__note": {"name": "tasks__note", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__note", "block_contents": "Note of the task."}, "doc.tamanu.tasks__frequency_value": {"name": "tasks__frequency_value", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__frequency_value", "block_contents": "Frequency value of the task (if the task is repeating), must go with frequency unit."}, "doc.tamanu.tasks__frequency_unit": {"name": "tasks__frequency_unit", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__frequency_unit", "block_contents": "Frequency unit of the task (if the task is repeating).\n\nOne of:\n- `minute`\n- `hour`\n- `day`"}, "doc.tamanu.tasks__high_priority": {"name": "tasks__high_priority", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__high_priority", "block_contents": "Boolean specify if the task is high priority."}, "doc.tamanu.tasks__parent_task_id": {"name": "tasks__parent_task_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__parent_task_id", "block_contents": "Reference to the original [task](#!/source/source.tamanu.tamanu.tasks) that the task is repeated from if it is a repeating task."}, "doc.tamanu.tasks__completed_by_user_id": {"name": "tasks__completed_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__completed_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who marked this task as completed."}, "doc.tamanu.tasks__completed_time": {"name": "tasks__completed_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__completed_time", "block_contents": "When the task is marked as completed."}, "doc.tamanu.tasks__completed_note": {"name": "tasks__completed_note", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__completed_note", "block_contents": "Completed note of the task."}, "doc.tamanu.tasks__not_completed_by_user_id": {"name": "tasks__not_completed_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__not_completed_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who marked this task as not completed."}, "doc.tamanu.tasks__not_completed_time": {"name": "tasks__not_completed_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__not_completed_time", "block_contents": "When the task is marked as not completed."}, "doc.tamanu.tasks__not_completed_reason_id": {"name": "tasks__not_completed_reason_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__not_completed_reason_id", "block_contents": "The reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why this task is not completed."}, "doc.tamanu.tasks__todo_by_user_id": {"name": "tasks__todo_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__todo_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who marked this task as to-do."}, "doc.tamanu.tasks__todo_time": {"name": "tasks__todo_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__todo_time", "block_contents": "When the task is marked as to-do."}, "doc.tamanu.tasks__todo_note": {"name": "tasks__todo_note", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__todo_note", "block_contents": "To-do note of the task."}, "doc.tamanu.tasks__deleted_by_user_id": {"name": "tasks__deleted_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__deleted_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who delete this task."}, "doc.tamanu.tasks__deleted_time": {"name": "tasks__deleted_time", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__deleted_time", "block_contents": "When the task is deleted."}, "doc.tamanu.tasks__deleted_reason_id": {"name": "tasks__deleted_reason_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__deleted_reason_id", "block_contents": "The reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why this task is deleted."}, "doc.tamanu.tasks__deleted_reason_for_sync_id": {"name": "tasks__deleted_reason_for_sync_id", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__deleted_reason_for_sync_id", "block_contents": "The reason ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) why this task is deleted if it is deleted by the system."}, "doc.tamanu.tasks__duration_value": {"name": "tasks__duration_value", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__duration_value", "block_contents": "Numeric value specifying the expected duration of the task, must be used in conjunction with duration_unit."}, "doc.tamanu.tasks__duration_unit": {"name": "tasks__duration_unit", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__duration_unit", "block_contents": "Unit of time for the task duration.\n\nOne of:\n- `hours`\n- `days`\n- `occurrences`"}, "doc.tamanu.tasks__task_type": {"name": "tasks__task_type", "resource_type": "doc", "package_name": "tamanu", "path": "tasks.md", "original_file_path": "../../database/model/public/tasks.md", "unique_id": "doc.tamanu.tasks__task_type", "block_contents": "Type of the task.\n\nOne of:\n- `normal_task`\n- `medication_due_task`"}, "doc.tamanu.table__vitals": {"name": "table__vitals", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.table__vitals", "block_contents": "[Deprecated] Patient's observed vitals. This is now done as a survey response."}, "doc.tamanu.vitals__id": {"name": "vitals__id", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__id", "block_contents": "Tamanu identifier for vitals"}, "doc.tamanu.vitals__temperature": {"name": "vitals__temperature", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__temperature", "block_contents": "Observed patient's body temperature"}, "doc.tamanu.vitals__weight": {"name": "vitals__weight", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__weight", "block_contents": "Observed patient's body weight"}, "doc.tamanu.vitals__height": {"name": "vitals__height", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__height", "block_contents": "Observed patient's height"}, "doc.tamanu.vitals__sbp": {"name": "vitals__sbp", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__sbp", "block_contents": "Observed patient's systolic blood pressure"}, "doc.tamanu.vitals__dbp": {"name": "vitals__dbp", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__dbp", "block_contents": "Observed patient's diastolic blood pressure"}, "doc.tamanu.vitals__heart_rate": {"name": "vitals__heart_rate", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__heart_rate", "block_contents": "Observed patient's heart rate"}, "doc.tamanu.vitals__respiratory_rate": {"name": "vitals__respiratory_rate", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__respiratory_rate", "block_contents": "Observed patient's respiratory rate"}, "doc.tamanu.vitals__spo2": {"name": "vitals__spo2", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__spo2", "block_contents": "Observed patient's SpO2 level or saturation of peripheral oxygen"}, "doc.tamanu.vitals__avpu": {"name": "vitals__avpu", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__avpu", "block_contents": "Observed patient's AVPU (alert, verbal, pain, unresponsive) level"}, "doc.tamanu.vitals__gcs": {"name": "vitals__gcs", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__gcs", "block_contents": "Observed patient's Glasgow coma scale (GCS)"}, "doc.tamanu.vitals__hemoglobin": {"name": "vitals__hemoglobin", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__hemoglobin", "block_contents": "Observed patient's hemoglobin levels"}, "doc.tamanu.vitals__fasting_blood_glucose": {"name": "vitals__fasting_blood_glucose", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__fasting_blood_glucose", "block_contents": "Observed patient's fasting blood glucose level"}, "doc.tamanu.vitals__urine_ph": {"name": "vitals__urine_ph", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_ph", "block_contents": "Observed patient's urine pH"}, "doc.tamanu.vitals__encounter_id": {"name": "vitals__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this recording of vitals is a part of."}, "doc.tamanu.vitals__urine_leukocytes": {"name": "vitals__urine_leukocytes", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_leukocytes", "block_contents": "Observed patient's urine leukocytes level"}, "doc.tamanu.vitals__urine_nitrites": {"name": "vitals__urine_nitrites", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_nitrites", "block_contents": "Observed patient's urine nitrites"}, "doc.tamanu.vitals__urobilinogen": {"name": "vitals__urobilinogen", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urobilinogen", "block_contents": "Observed patient's urobilinogen level"}, "doc.tamanu.vitals__urine_protein": {"name": "vitals__urine_protein", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_protein", "block_contents": "Observed patient's urine protein level"}, "doc.tamanu.vitals__blood_in_urine": {"name": "vitals__blood_in_urine", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__blood_in_urine", "block_contents": "Observed patient's blood in urine"}, "doc.tamanu.vitals__urine_specific_gravity": {"name": "vitals__urine_specific_gravity", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_specific_gravity", "block_contents": "Observed patient's urine_specific_gravity"}, "doc.tamanu.vitals__urine_ketone": {"name": "vitals__urine_ketone", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_ketone", "block_contents": "Observed patient's urine ketone level"}, "doc.tamanu.vitals__urine_bilirubin": {"name": "vitals__urine_bilirubin", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_bilirubin", "block_contents": "Observed patient's urine bilirubin level"}, "doc.tamanu.vitals__urine_glucose": {"name": "vitals__urine_glucose", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__urine_glucose", "block_contents": "Observed patient's urine glucose levels"}, "doc.tamanu.vitals__migrated_record": {"name": "vitals__migrated_record", "resource_type": "doc", "package_name": "tamanu", "path": "vitals.md", "original_file_path": "../../database/model/public/vitals.md", "unique_id": "doc.tamanu.vitals__migrated_record", "block_contents": "Tamanu identifier for the survey response the vitals record was migrated to"}, "doc.tamanu.table__imaging_area_external_codes": {"name": "table__imaging_area_external_codes", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_area_external_codes.md", "original_file_path": "../../database/model/public/imaging_area_external_codes.md", "unique_id": "doc.tamanu.table__imaging_area_external_codes", "block_contents": "External codes for imaging areas (such as for [PACS](https://en.wikipedia.org/wiki/Picture_archiving_and_communication_system)).\n\nImaging areas are stored in [Reference Data](#!/source/source.tamanu.tamanu.reference_data), this\ntable adds additional (external) codes."}, "doc.tamanu.imaging_area_external_codes__area_id": {"name": "imaging_area_external_codes__area_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_area_external_codes.md", "original_file_path": "../../database/model/public/imaging_area_external_codes.md", "unique_id": "doc.tamanu.imaging_area_external_codes__area_id", "block_contents": "Reference to the imaging area ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.imaging_area_external_codes__code": {"name": "imaging_area_external_codes__code", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_area_external_codes.md", "original_file_path": "../../database/model/public/imaging_area_external_codes.md", "unique_id": "doc.tamanu.imaging_area_external_codes__code", "block_contents": "External code."}, "doc.tamanu.imaging_area_external_codes__description": {"name": "imaging_area_external_codes__description", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_area_external_codes.md", "original_file_path": "../../database/model/public/imaging_area_external_codes.md", "unique_id": "doc.tamanu.imaging_area_external_codes__description", "block_contents": "Human-friendly description for the area/code."}, "doc.tamanu.table__user_localisation_caches": {"name": "table__user_localisation_caches", "resource_type": "doc", "package_name": "tamanu", "path": "user_localisation_caches.md", "original_file_path": "../../database/model/public/user_localisation_caches.md", "unique_id": "doc.tamanu.table__user_localisation_caches", "block_contents": "Cached localisation data.\n\nLocalisation can be pretty expensive to retrieve, so this caches it per user."}, "doc.tamanu.user_localisation_caches__localisation": {"name": "user_localisation_caches__localisation", "resource_type": "doc", "package_name": "tamanu", "path": "user_localisation_caches.md", "original_file_path": "../../database/model/public/user_localisation_caches.md", "unique_id": "doc.tamanu.user_localisation_caches__localisation", "block_contents": "JSON data."}, "doc.tamanu.user_localisation_caches__user_id": {"name": "user_localisation_caches__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_localisation_caches.md", "original_file_path": "../../database/model/public/user_localisation_caches.md", "unique_id": "doc.tamanu.user_localisation_caches__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) this cache is for."}, "doc.tamanu.table__certificate_notifications": {"name": "table__certificate_notifications", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.table__certificate_notifications", "block_contents": "Various medical certificates being sent to patients.\n\nThese rows are processed by the `CertificateNotificationProcessor` scheduled task, and generate a\n[`patient_communications`](#!/source/source.tamanu.tamanu.patient_communications) row.\n\nThe actual certificate itself is stored separately on the filesystem while it's generated."}, "doc.tamanu.certificate_notifications__type": {"name": "certificate_notifications__type", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__type", "block_contents": "Type of certificate being generated.\n\nThis dictates both from which resource the certificate is generated, and also the template being\nused for generating the certificate itself.\n\nOne of:\n- `covid_19_clearance`\n- `vaccination_certificate`\n- `icao.test`\n- `icao.vacc`"}, "doc.tamanu.certificate_notifications__patient_id": {"name": "certificate_notifications__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__patient_id", "block_contents": "Reference to a [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.certificate_notifications__forward_address": {"name": "certificate_notifications__forward_address", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__forward_address", "block_contents": "An email address to send the generated certificate to."}, "doc.tamanu.certificate_notifications__lab_test_id": {"name": "certificate_notifications__lab_test_id", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__lab_test_id", "block_contents": "The [lab test](#!/source/source.tamanu.tamanu.lab_tests) this certificate is for, if applicable."}, "doc.tamanu.certificate_notifications__status": {"name": "certificate_notifications__status", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__status", "block_contents": "Processing status.\n\nOne of:\n- `Queued`\n- `Processed`\n- `Error`\n- `Ignore`"}, "doc.tamanu.certificate_notifications__error": {"name": "certificate_notifications__error", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__error", "block_contents": "If the certificate generation fails, this is the error."}, "doc.tamanu.certificate_notifications__created_by": {"name": "certificate_notifications__created_by", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__created_by", "block_contents": "The name of the user who initiated the creation of this certificate."}, "doc.tamanu.certificate_notifications__lab_request_id": {"name": "certificate_notifications__lab_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__lab_request_id", "block_contents": "The [lab request](#!/source/source.tamanu.tamanu.lab_requests) this certificate is for, if applicable."}, "doc.tamanu.certificate_notifications__printed_date": {"name": "certificate_notifications__printed_date", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__printed_date", "block_contents": "When this certificate was printed, if applicable."}, "doc.tamanu.certificate_notifications__facility_name": {"name": "certificate_notifications__facility_name", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__facility_name", "block_contents": "The name of the facility where the creation of this certificate was initiated."}, "doc.tamanu.certificate_notifications__language": {"name": "certificate_notifications__language", "resource_type": "doc", "package_name": "tamanu", "path": "certificate_notifications.md", "original_file_path": "../../database/model/public/certificate_notifications.md", "unique_id": "doc.tamanu.certificate_notifications__language", "block_contents": "Used to translate the certificate."}, "doc.tamanu.table__roles": {"name": "table__roles", "resource_type": "doc", "package_name": "tamanu", "path": "roles.md", "original_file_path": "../../database/model/public/roles.md", "unique_id": "doc.tamanu.table__roles", "block_contents": "These are sets of permissions that are given to users to determine what they can do in Tamanu.\n\nThe actual permissions are associated to the role in the\n[`permissions`](#!/source/source.tamanu.tamanu.permissions) table."}, "doc.tamanu.roles__name": {"name": "roles__name", "resource_type": "doc", "package_name": "tamanu", "path": "roles.md", "original_file_path": "../../database/model/public/roles.md", "unique_id": "doc.tamanu.roles__name", "block_contents": "Readable name for the role."}, "doc.tamanu.table__encounter_pause_prescription_histories": {"name": "table__encounter_pause_prescription_histories", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.table__encounter_pause_prescription_histories", "block_contents": "This table tracks the history of paused prescriptions for encounters, including details about the action, user, and duration."}, "doc.tamanu.encounter_pause_prescription_histories__encounter_prescription_id": {"name": "encounter_pause_prescription_histories__encounter_prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__encounter_prescription_id", "block_contents": "The ID of the prescription associated with the encounter."}, "doc.tamanu.encounter_pause_prescription_histories__action": {"name": "encounter_pause_prescription_histories__action", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__action", "block_contents": "The type of action performed, such as \"pause\" or \"resume.\""}, "doc.tamanu.encounter_pause_prescription_histories__action_date": {"name": "encounter_pause_prescription_histories__action_date", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__action_date", "block_contents": "The date and time when the action was performed."}, "doc.tamanu.encounter_pause_prescription_histories__action_user_id": {"name": "encounter_pause_prescription_histories__action_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__action_user_id", "block_contents": "The ID of the user who performed the action."}, "doc.tamanu.encounter_pause_prescription_histories__notes": {"name": "encounter_pause_prescription_histories__notes", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__notes", "block_contents": "Additional notes or comments of the paused prescription."}, "doc.tamanu.encounter_pause_prescription_histories__pause_duration": {"name": "encounter_pause_prescription_histories__pause_duration", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__pause_duration", "block_contents": "The duration for which the prescription was paused."}, "doc.tamanu.encounter_pause_prescription_histories__pause_time_unit": {"name": "encounter_pause_prescription_histories__pause_time_unit", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_pause_prescription_histories.md", "original_file_path": "../../database/model/public/encounter_pause_prescription_histories.md", "unique_id": "doc.tamanu.encounter_pause_prescription_histories__pause_time_unit", "block_contents": "The unit of time for the pause duration, such as \"days\" or \"hours.\""}, "doc.tamanu.table__invoice_payments": {"name": "table__invoice_payments", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_payments.md", "original_file_path": "../../database/model/public/invoice_payments.md", "unique_id": "doc.tamanu.table__invoice_payments", "block_contents": "Individual payment against an invoice.\n\nInvoices can be paid in installments, by different parties, etc."}, "doc.tamanu.invoice_payments__invoice_id": {"name": "invoice_payments__invoice_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_payments.md", "original_file_path": "../../database/model/public/invoice_payments.md", "unique_id": "doc.tamanu.invoice_payments__invoice_id", "block_contents": "The [invoice](#!/source/source.tamanu.tamanu.invoices)."}, "doc.tamanu.invoice_payments__receipt_number": {"name": "invoice_payments__receipt_number", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_payments.md", "original_file_path": "../../database/model/public/invoice_payments.md", "unique_id": "doc.tamanu.invoice_payments__receipt_number", "block_contents": "Receipt number. Usually auto-generated."}, "doc.tamanu.invoice_payments__amount": {"name": "invoice_payments__amount", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_payments.md", "original_file_path": "../../database/model/public/invoice_payments.md", "unique_id": "doc.tamanu.invoice_payments__amount", "block_contents": "Amount paid."}, "doc.tamanu.invoice_payments__updated_by_user_id": {"name": "invoice_payments__updated_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_payments.md", "original_file_path": "../../database/model/public/invoice_payments.md", "unique_id": "doc.tamanu.invoice_payments__updated_by_user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who updated this invoice payment."}, "doc.tamanu.invoice_payments__original_payment_id": {"name": "invoice_payments__original_payment_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_payments.md", "original_file_path": "../../database/model/public/invoice_payments.md", "unique_id": "doc.tamanu.invoice_payments__original_payment_id", "block_contents": "Foreign key to the payment that this refund is reversing (null for non-refund transactions)"}, "doc.tamanu.table__invoices": {"name": "table__invoices", "resource_type": "doc", "package_name": "tamanu", "path": "invoices.md", "original_file_path": "../../database/model/public/invoices.md", "unique_id": "doc.tamanu.table__invoices", "block_contents": "Invoices related to encounters."}, "doc.tamanu.invoices__display_id": {"name": "invoices__display_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoices.md", "original_file_path": "../../database/model/public/invoices.md", "unique_id": "doc.tamanu.invoices__display_id", "block_contents": "Short unique identifier used on the frontend."}, "doc.tamanu.invoices__status": {"name": "invoices__status", "resource_type": "doc", "package_name": "tamanu", "path": "invoices.md", "original_file_path": "../../database/model/public/invoices.md", "unique_id": "doc.tamanu.invoices__status", "block_contents": "Status of the invoice.\n\nOne of:\n- `cancelled`\n- `in_progress`\n- `finalised`"}, "doc.tamanu.invoices__encounter_id": {"name": "invoices__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoices.md", "original_file_path": "../../database/model/public/invoices.md", "unique_id": "doc.tamanu.invoices__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this invoice is a part of."}, "doc.tamanu.invoices__patient_payment_status": {"name": "invoices__patient_payment_status", "resource_type": "doc", "package_name": "tamanu", "path": "invoices.md", "original_file_path": "../../database/model/public/invoices.md", "unique_id": "doc.tamanu.invoices__patient_payment_status", "block_contents": "Payment status (patient portion, if applicable).\n\nOne of:\n- `unpaid`\n- `paid`\n- `partial`"}, "doc.tamanu.invoices__insurer_payment_status": {"name": "invoices__insurer_payment_status", "resource_type": "doc", "package_name": "tamanu", "path": "invoices.md", "original_file_path": "../../database/model/public/invoices.md", "unique_id": "doc.tamanu.invoices__insurer_payment_status", "block_contents": "Payment status (insurer portion, if applicable).\n\nOne of:\n- `unpaid`\n- `paid`\n- `partial`\n- `rejected`"}, "doc.tamanu.table__invoices_invoice_insurance_plans": {"name": "table__invoices_invoice_insurance_plans", "resource_type": "doc", "package_name": "tamanu", "path": "invoices_invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.md", "unique_id": "doc.tamanu.table__invoices_invoice_insurance_plans", "block_contents": "Junction table linking invoices to insurance contracts. This many-to-many relationship allows an invoice to be associated with multiple insurance contracts."}, "doc.tamanu.invoices_invoice_insurance_plans__invoice_id": {"name": "invoices_invoice_insurance_plans__invoice_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoices_invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.md", "unique_id": "doc.tamanu.invoices_invoice_insurance_plans__invoice_id", "block_contents": "Reference to the [invoice](#!/source/source.tamanu.tamanu.invoices) that this insurance contract applies to."}, "doc.tamanu.invoices_invoice_insurance_plans__invoice_insurance_plan_id": {"name": "invoices_invoice_insurance_plans__invoice_insurance_plan_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoices_invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoices_invoice_insurance_plans.md", "unique_id": "doc.tamanu.invoices_invoice_insurance_plans__invoice_insurance_plan_id", "block_contents": "Reference to the [insurance contract](#!/source/source.tamanu.tamanu.invoice_insurance_plans) being applied to the invoice."}, "doc.tamanu.table__patient_family_histories": {"name": "table__patient_family_histories", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.table__patient_family_histories", "block_contents": "List of family history conditions known about a patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Family history\".\n\nSee also: `public.patient_allergies`, `public.patient_care_plans`, `public.patient_conditions`,\n`public.patient_issues`."}, "doc.tamanu.patient_family_histories__note": {"name": "patient_family_histories__note", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__note", "block_contents": "Free-form description of this issue."}, "doc.tamanu.patient_family_histories__recorded_date": {"name": "patient_family_histories__recorded_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__recorded_date", "block_contents": "Datetime at which this issue was recorded."}, "doc.tamanu.patient_family_histories__relationship": {"name": "patient_family_histories__relationship", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__relationship", "block_contents": "Free-form description of the family relationship."}, "doc.tamanu.patient_family_histories__patient_id": {"name": "patient_family_histories__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_family_histories__practitioner_id": {"name": "patient_family_histories__practitioner_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__practitioner_id", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) recording this history."}, "doc.tamanu.patient_family_histories__diagnosis_id": {"name": "patient_family_histories__diagnosis_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__diagnosis_id", "block_contents": "Reference to a diagnosis ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))\ndescribing this issue."}, "doc.tamanu.patient_family_histories__recorded_date_legacy": {"name": "patient_family_histories__recorded_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_family_histories.md", "original_file_path": "../../database/model/public/patient_family_histories.md", "unique_id": "doc.tamanu.patient_family_histories__recorded_date_legacy", "block_contents": "[Deprecated] Timestamp at which this issue was recorded."}, "doc.tamanu.table__lab_test_types": {"name": "table__lab_test_types", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.table__lab_test_types", "block_contents": "A kind of test that's possible to request.\n\nThis includes information about the test itself, and also parameters around result formatting, like\ndata type, expected ranges, etc."}, "doc.tamanu.lab_test_types__code": {"name": "lab_test_types__code", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__code", "block_contents": "Internal Tamanu code of the test."}, "doc.tamanu.lab_test_types__name": {"name": "lab_test_types__name", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__name", "block_contents": "Human-friendly name of the test."}, "doc.tamanu.lab_test_types__unit": {"name": "lab_test_types__unit", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__unit", "block_contents": "Unit the test result is measured in."}, "doc.tamanu.lab_test_types__male_min": {"name": "lab_test_types__male_min", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__male_min", "block_contents": "Minimum typical range for males."}, "doc.tamanu.lab_test_types__male_max": {"name": "lab_test_types__male_max", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__male_max", "block_contents": "Maximum typical range for males."}, "doc.tamanu.lab_test_types__female_min": {"name": "lab_test_types__female_min", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__female_min", "block_contents": "Minimum typical range for females."}, "doc.tamanu.lab_test_types__female_max": {"name": "lab_test_types__female_max", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__female_max", "block_contents": "Maximum typical range for females."}, "doc.tamanu.lab_test_types__range_text": {"name": "lab_test_types__range_text", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__range_text", "block_contents": "Unused."}, "doc.tamanu.lab_test_types__result_type": {"name": "lab_test_types__result_type", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__result_type", "block_contents": "Input type of result.\n\nOne of:\n- `FreeText`\n- `Number`\n- `Select`"}, "doc.tamanu.lab_test_types__options": {"name": "lab_test_types__options", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__options", "block_contents": "Comma-separated list of options. Unused."}, "doc.tamanu.lab_test_types__lab_test_category_id": {"name": "lab_test_types__lab_test_category_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__lab_test_category_id", "block_contents": "Reference to the category ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test."}, "doc.tamanu.lab_test_types__external_code": {"name": "lab_test_types__external_code", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__external_code", "block_contents": "External code for the test (such as for LIMS)."}, "doc.tamanu.lab_test_types__is_sensitive": {"name": "lab_test_types__is_sensitive", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_types.md", "original_file_path": "../../database/model/public/lab_test_types.md", "unique_id": "doc.tamanu.lab_test_types__is_sensitive", "block_contents": "Used to indicate if the lab test type is sensitive and should be hidden accordingly."}, "doc.tamanu.table__scheduled_vaccines": {"name": "table__scheduled_vaccines", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.table__scheduled_vaccines", "block_contents": "A vaccine schedule listing all vaccines expected to be given to a child as part of a country wide Expanded Program of \nImmunisation can be incorporated into Tamanu to show each dose and due date on the front end of the system. \n\nFirst dose of a vaccine should use `weeks_from_birth_due` whilst subsequent doses should use \n`weeks_from_last_vaccination_due`."}, "doc.tamanu.scheduled_vaccines__id": {"name": "scheduled_vaccines__id", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__id", "block_contents": "Tamanu identifier for vaccine schedules"}, "doc.tamanu.scheduled_vaccines__category": {"name": "scheduled_vaccines__category", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__category", "block_contents": "Vaccine category [Routine, Catch-up, Campaign, Other]"}, "doc.tamanu.scheduled_vaccines__label": {"name": "scheduled_vaccines__label", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__label", "block_contents": "Contents of the label column is what will be displayed on the front end of Tamanu \nunder fields labelled 'Vaccine'. This is where the vaccine name is listed. E.g. 'BCG'."}, "doc.tamanu.scheduled_vaccines__dose_label": {"name": "scheduled_vaccines__dose_label", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__dose_label", "block_contents": "Dose label indicates what will appear on the front end of Tamanu re when the dose is due. It can be a time in a child's \nlife (e.g. 'Birth', '6 weeks') or a dose of vaccine (e.g. 'Dose 1', 'Dose 2')"}, "doc.tamanu.scheduled_vaccines__weeks_from_birth_due": {"name": "scheduled_vaccines__weeks_from_birth_due", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__weeks_from_birth_due", "block_contents": "This column is used to tell Tamanu how many weeks from the child's date of birth a vaccine is due. This will populate \nthe front end within the Vaccine schedule section in the column 'Due date'. For a vaccine to appear in the Vaccine \nschedule a dose must have a `weeksFromBirthDue` entered into the reference data. \n\nThis field should be used only for the first dose of the vaccine. Subsequent doses should use \n`weeks_from_last_vaccination_due`"}, "doc.tamanu.scheduled_vaccines__index": {"name": "scheduled_vaccines__index", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__index", "block_contents": "This column is used to show when a second dose is due in relation to the first dose. For example, if dose 1 is due at 6 \nweeks and dose 2 is due at 10 weeks, this column would read '4' against the 10 week dose as dose 2 is due 4 weeks after \ndose 1 is given."}, "doc.tamanu.scheduled_vaccines__vaccine_id": {"name": "scheduled_vaccines__vaccine_id", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__vaccine_id", "block_contents": "Use the vaccineId column to link the id column of the Reference Data sheet Drug to the vaccine schedule. Copy the exact \nid from the id column in the reference data sheet Drug and paste it in the vaccineId column in the Scheduled Vaccine \nsheet."}, "doc.tamanu.scheduled_vaccines__weeks_from_last_vaccination_due": {"name": "scheduled_vaccines__weeks_from_last_vaccination_due", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__weeks_from_last_vaccination_due", "block_contents": "This column is used to show when a second dose is due in relation to the first dose. For example, if dose 1 is due at 6 \nweeks and dose 2 is due at 10 weeks, this column would read '4' against the 10 week dose as dose 2 is due 4 weeks after \ndose 1 is given. The order of a vaccine dose is defined at the `index` field. \n\nThis field should not be used for the first dose but for subsequent doses. First dose should use `weeks_from_birth_due`"}, "doc.tamanu.scheduled_vaccines__hide_from_certificate": {"name": "scheduled_vaccines__hide_from_certificate", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__hide_from_certificate", "block_contents": "Vaccines can be hidden from the vaccine certificate where required\n\nTo hide a vaccine from appearing on the vaccine certificate across the deployment, use column hideFromCertificate\n- true = vaccine will not appear on the vaccine certificate\n- blank / false = vaccine will appear on the vaccine certificate"}, "doc.tamanu.scheduled_vaccines__sort_index": {"name": "scheduled_vaccines__sort_index", "resource_type": "doc", "package_name": "tamanu", "path": "scheduled_vaccines.md", "original_file_path": "../../database/model/public/scheduled_vaccines.md", "unique_id": "doc.tamanu.scheduled_vaccines__sort_index", "block_contents": "Sort index defaults to 0"}, "doc.tamanu.table__patient_additional_data": {"name": "table__patient_additional_data", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.table__patient_additional_data", "block_contents": "Core or adjunct patient data that doesn't fit elsewhere, but is only downloaded to a facility once a\npatient is marked for sync.\n\nThis is often referred to as \"PAD\".\n\nSee also `patient_field_definition_categories`, `patient_field_definitions`, and `patient_field_values`,\nwhich define and specify custom/non-standard data to be stored against patients."}, "doc.tamanu.patient_additional_data__place_of_birth": {"name": "patient_additional_data__place_of_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__place_of_birth", "block_contents": "Free-form place of birth (typically a place name or country)."}, "doc.tamanu.patient_additional_data__primary_contact_number": {"name": "patient_additional_data__primary_contact_number", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__primary_contact_number", "block_contents": "Primary contact number.\n\nNote that this may be complementary to the more structured data in `patient_contacts`."}, "doc.tamanu.patient_additional_data__secondary_contact_number": {"name": "patient_additional_data__secondary_contact_number", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__secondary_contact_number", "block_contents": "Secondary contact number.\n\nNote that this may be complementary to the more structured data in `patient_contacts`."}, "doc.tamanu.patient_additional_data__marital_status": {"name": "patient_additional_data__marital_status", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__marital_status", "block_contents": "Marital status.\n\nOne of:\n- `Defacto`\n- `Married`\n- `Single`\n- `Widow`\n- `Divorced`\n- `Separated`\n- `Unknown`"}, "doc.tamanu.patient_additional_data__city_town": {"name": "patient_additional_data__city_town", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__city_town", "block_contents": "Patient current address city or town.\n\nThis may be free-form or chosen from a drop-down, depending on how Tamanu is configured."}, "doc.tamanu.patient_additional_data__street_village": {"name": "patient_additional_data__street_village", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__street_village", "block_contents": "Patient current address street or village.\n\nThis may be free-form or chosen from a drop-down, depending on how Tamanu is configured."}, "doc.tamanu.patient_additional_data__educational_level": {"name": "patient_additional_data__educational_level", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__educational_level", "block_contents": "Highest educational attainment."}, "doc.tamanu.patient_additional_data__social_media": {"name": "patient_additional_data__social_media", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__social_media", "block_contents": "Free-form social media contact.\n\nNote that this may be complementary to the more structured data in `patient_contacts`."}, "doc.tamanu.patient_additional_data__blood_type": {"name": "patient_additional_data__blood_type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__blood_type", "block_contents": "Blood type.\n\nOne of:\n- `A+`\n- `A-`\n- `AB-`\n- `AB+`\n- `B+`\n- `B-`\n- `O+`\n- `O-`"}, "doc.tamanu.patient_additional_data__title": {"name": "patient_additional_data__title", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__title", "block_contents": "Patient name: title."}, "doc.tamanu.patient_additional_data__ethnicity_id": {"name": "patient_additional_data__ethnicity_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__ethnicity_id", "block_contents": "Reference to patient ethnicity ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__nationality_id": {"name": "patient_additional_data__nationality_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__nationality_id", "block_contents": "Reference to patient nationality ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__country_id": {"name": "patient_additional_data__country_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__country_id", "block_contents": "Reference to patient country of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__division_id": {"name": "patient_additional_data__division_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__division_id", "block_contents": "Reference to patient administrative division of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__subdivision_id": {"name": "patient_additional_data__subdivision_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__subdivision_id", "block_contents": "Reference to patient administrative subdivision of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__medical_area_id": {"name": "patient_additional_data__medical_area_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__medical_area_id", "block_contents": "Reference to patient administrative medical area of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__nursing_zone_id": {"name": "patient_additional_data__nursing_zone_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__nursing_zone_id", "block_contents": "Reference to patient administrative nursing zone of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__settlement_id": {"name": "patient_additional_data__settlement_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__settlement_id", "block_contents": "Reference to patient residence settlement ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__occupation_id": {"name": "patient_additional_data__occupation_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__occupation_id", "block_contents": "Reference to patient occupation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__patient_id": {"name": "patient_additional_data__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).\n\nThere is at most one `patient_additional_data` row per patient.\n\nNote that the `id` column is generated from this column to enforce this."}, "doc.tamanu.patient_additional_data__birth_certificate": {"name": "patient_additional_data__birth_certificate", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__birth_certificate", "block_contents": "Birth certificate identifier."}, "doc.tamanu.patient_additional_data__driving_license": {"name": "patient_additional_data__driving_license", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__driving_license", "block_contents": "Driving licence identifier."}, "doc.tamanu.patient_additional_data__passport": {"name": "patient_additional_data__passport", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__passport", "block_contents": "Passport number."}, "doc.tamanu.patient_additional_data__religion_id": {"name": "patient_additional_data__religion_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__religion_id", "block_contents": "Reference to patient religion ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__patient_billing_type_id": {"name": "patient_additional_data__patient_billing_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__patient_billing_type_id", "block_contents": "Reference to patient billing type."}, "doc.tamanu.patient_additional_data__country_of_birth_id": {"name": "patient_additional_data__country_of_birth_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__country_of_birth_id", "block_contents": "Reference to patient country of birth ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__registered_by_id": {"name": "patient_additional_data__registered_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__registered_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who registered the patient in Tamanu."}, "doc.tamanu.patient_additional_data__emergency_contact_name": {"name": "patient_additional_data__emergency_contact_name", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__emergency_contact_name", "block_contents": "Name of emergency contact."}, "doc.tamanu.patient_additional_data__emergency_contact_number": {"name": "patient_additional_data__emergency_contact_number", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__emergency_contact_number", "block_contents": "Phone number of emergency contact."}, "doc.tamanu.patient_additional_data__mother_id": {"name": "patient_additional_data__mother_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__mother_id", "block_contents": "Reference to [patient](#!/source/source.tamanu.tamanu.patients) ID of mother / parent."}, "doc.tamanu.patient_additional_data__father_id": {"name": "patient_additional_data__father_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__father_id", "block_contents": "Reference to [patient](#!/source/source.tamanu.tamanu.patients) ID of father / parent."}, "doc.tamanu.patient_additional_data__updated_at_by_field": {"name": "patient_additional_data__updated_at_by_field", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__updated_at_by_field", "block_contents": "JSON object recording the updated datetime for individual columns.\n\nAs PADs contain a lot of disparate data, it's not uncommon that fields are edited separately in\ndifferent facilities. The default sync strategy is for the last edit to a whole row to \"win out\" in\ncase of a conflict, but this can lead to discarding important data in the case of PADs. This field\nis used to implement per-field \"last edit wins\" instead."}, "doc.tamanu.patient_additional_data__health_center_id": {"name": "patient_additional_data__health_center_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__health_center_id", "block_contents": "Reference to patient primary health center ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__insurer_id": {"name": "patient_additional_data__insurer_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__insurer_id", "block_contents": "Reference to patient insurer ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_additional_data__insurer_policy_number": {"name": "patient_additional_data__insurer_policy_number", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__insurer_policy_number", "block_contents": "Policy number of patient insurance."}, "doc.tamanu.patient_additional_data__secondary_village_id": {"name": "patient_additional_data__secondary_village_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_additional_data.md", "original_file_path": "../../database/model/public/patient_additional_data.md", "unique_id": "doc.tamanu.patient_additional_data__secondary_village_id", "block_contents": "Reference to patient administrative village of residence ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), secondary).\n\nSee also [`patients.village_id`](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.table__patient_program_registrations": {"name": "table__patient_program_registrations", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.table__patient_program_registrations", "block_contents": "Table with information about the program registrations of a patient. This is helpful\nto enroll a specific patient within a program that will be followed for an extended\nperiod of time.\n\n**This table is append-only.**\nA new record is created every time there is a change to the status of a registration. \n\nAt the moment, this implies that when merging two patients, both with a registration to the same\nregistry, the merged patient ends up with two registrations."}, "doc.tamanu.patient_program_registrations__registration_status": {"name": "patient_program_registrations__registration_status", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__registration_status", "block_contents": "The current status of the registration.\n\nOne of:\n- `active`\n- `inactive`\n- `recordedInError`"}, "doc.tamanu.patient_program_registrations__patient_id": {"name": "patient_program_registrations__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__patient_id", "block_contents": "Reference to the [Patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_program_registrations__program_registry_id": {"name": "patient_program_registrations__program_registry_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__program_registry_id", "block_contents": "Reference to the [Program Registry](#!/source/source.tamanu.tamanu.program_registries)\nof the registration."}, "doc.tamanu.patient_program_registrations__clinical_status_id": {"name": "patient_program_registrations__clinical_status_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__clinical_status_id", "block_contents": "Reference to the [Program Registry Clinical Status](#!/source/source.tamanu.tamanu.program_registry_clinical_statuses)\nof the registration."}, "doc.tamanu.patient_program_registrations__clinician_id": {"name": "patient_program_registrations__clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__clinician_id", "block_contents": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) recording that\nregistration."}, "doc.tamanu.patient_program_registrations__registering_facility_id": {"name": "patient_program_registrations__registering_facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__registering_facility_id", "block_contents": "Reference to the [Facility](#!/source/source.tamanu.tamanu.facilities) where the\nregistration was registered in."}, "doc.tamanu.patient_program_registrations__facility_id": {"name": "patient_program_registrations__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__facility_id", "block_contents": "Reference to the [Facility](#!/source/source.tamanu.tamanu.facilities) this program\nregistration is from."}, "doc.tamanu.patient_program_registrations__village_id": {"name": "patient_program_registrations__village_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__village_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=village`) this program registration is from."}, "doc.tamanu.patient_program_registrations__deactivated_clinician_id": {"name": "patient_program_registrations__deactivated_clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__deactivated_clinician_id", "block_contents": "The clinician that removed the patient from the program registry."}, "doc.tamanu.patient_program_registrations__deactivated_date": {"name": "patient_program_registrations__deactivated_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registrations.md", "original_file_path": "../../database/model/public/patient_program_registrations.md", "unique_id": "doc.tamanu.patient_program_registrations__deactivated_date", "block_contents": "The date that the patient from the program registry."}, "doc.tamanu.table__reference_drugs": {"name": "table__reference_drugs", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drugs.md", "original_file_path": "../../database/model/public/reference_drugs.md", "unique_id": "doc.tamanu.table__reference_drugs", "block_contents": "Additional information about referenceData that is of the type \u201cdrug\u201d"}, "doc.tamanu.reference_drugs__reference_data_id": {"name": "reference_drugs__reference_data_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drugs.md", "original_file_path": "../../database/model/public/reference_drugs.md", "unique_id": "doc.tamanu.reference_drugs__reference_data_id", "block_contents": "Id of the associated reference data"}, "doc.tamanu.reference_drugs__route": {"name": "reference_drugs__route", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drugs.md", "original_file_path": "../../database/model/public/reference_drugs.md", "unique_id": "doc.tamanu.reference_drugs__route", "block_contents": "Route of the drug"}, "doc.tamanu.reference_drugs__units": {"name": "reference_drugs__units", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drugs.md", "original_file_path": "../../database/model/public/reference_drugs.md", "unique_id": "doc.tamanu.reference_drugs__units", "block_contents": "Units of the drug"}, "doc.tamanu.reference_drugs__notes": {"name": "reference_drugs__notes", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drugs.md", "original_file_path": "../../database/model/public/reference_drugs.md", "unique_id": "doc.tamanu.reference_drugs__notes", "block_contents": "Notes of the drug"}, "doc.tamanu.reference_drugs__is_sensitive": {"name": "reference_drugs__is_sensitive", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drugs.md", "original_file_path": "../../database/model/public/reference_drugs.md", "unique_id": "doc.tamanu.reference_drugs__is_sensitive", "block_contents": "Whether the drug is sensitive and requires special handling"}, "doc.tamanu.table__signers_historical": {"name": "table__signers_historical", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.table__signers_historical", "block_contents": "Historical VDS-NC signer records retained for compliance. Private keys have been\ncleared. The table is renamed from `signers` and is no longer actively used.\n\nSee also the `certifiable_vaccines` table."}, "doc.tamanu.signers_historical__country_code": {"name": "signers_historical__country_code", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__country_code", "block_contents": "ISO country code for the Health CA."}, "doc.tamanu.signers_historical__private_key": {"name": "signers_historical__private_key", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__private_key", "block_contents": "Private key data (cleared to NULL during migration)."}, "doc.tamanu.signers_historical__public_key": {"name": "signers_historical__public_key", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__public_key", "block_contents": "Public key data."}, "doc.tamanu.signers_historical__request": {"name": "signers_historical__request", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__request", "block_contents": "Certificate Signing Request."}, "doc.tamanu.signers_historical__certificate": {"name": "signers_historical__certificate", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__certificate", "block_contents": "Signed Certificate (signed by the Health CA)."}, "doc.tamanu.signers_historical__validity_period_start": {"name": "signers_historical__validity_period_start", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__validity_period_start", "block_contents": "Before that date, the key cannot be used, and signatures generated by it cannot be trusted."}, "doc.tamanu.signers_historical__validity_period_end": {"name": "signers_historical__validity_period_end", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__validity_period_end", "block_contents": "After that date, the key cannot be used, and signatures generated by it cannot be trusted."}, "doc.tamanu.signers_historical__signatures_issued": {"name": "signers_historical__signatures_issued", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__signatures_issued", "block_contents": "Counter of digital signatures issued from this key."}, "doc.tamanu.signers_historical__request_sent_at": {"name": "signers_historical__request_sent_at", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__request_sent_at", "block_contents": "Date at which the CSR was sent to be signed by the Health CA."}, "doc.tamanu.signers_historical__working_period_start": {"name": "signers_historical__working_period_start", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__working_period_start", "block_contents": "Before that date, the key cannot be used."}, "doc.tamanu.signers_historical__working_period_end": {"name": "signers_historical__working_period_end", "resource_type": "doc", "package_name": "tamanu", "path": "signers_historical.md", "original_file_path": "../../database/model/public/signers_historical.md", "unique_id": "doc.tamanu.signers_historical__working_period_end", "block_contents": "After that date, the key cannot be used.\n\nAfter that date, the private key may also be nulled.\n\nThis is always less than or equal to `validity_period_end`."}, "doc.tamanu.table__local_system_facts": {"name": "table__local_system_facts", "resource_type": "doc", "package_name": "tamanu", "path": "local_system_facts.md", "original_file_path": "../../database/model/public/local_system_facts.md", "unique_id": "doc.tamanu.table__local_system_facts", "block_contents": "A set of values that are proper to this installation of Tamanu.\n\nThese are never synchronised.\nUsage is entirely internal to Tamanu and should never be used externally."}, "doc.tamanu.local_system_facts__key": {"name": "local_system_facts__key", "resource_type": "doc", "package_name": "tamanu", "path": "local_system_facts.md", "original_file_path": "../../database/model/public/local_system_facts.md", "unique_id": "doc.tamanu.local_system_facts__key", "block_contents": "Key of the fact."}, "doc.tamanu.local_system_facts__value": {"name": "local_system_facts__value", "resource_type": "doc", "package_name": "tamanu", "path": "local_system_facts.md", "original_file_path": "../../database/model/public/local_system_facts.md", "unique_id": "doc.tamanu.local_system_facts__value", "block_contents": "Value of the fact.\n\nThis is `text`, but may be interpreted as other things, e.g. JSON objects or numbers."}, "doc.tamanu.table__patient_invoice_insurance_plans": {"name": "table__patient_invoice_insurance_plans", "resource_type": "doc", "package_name": "tamanu", "path": "patient_invoice_insurance_plans.md", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.md", "unique_id": "doc.tamanu.table__patient_invoice_insurance_plans", "block_contents": "Table to record invoice insurance plans against patients"}, "doc.tamanu.patient_invoice_insurance_plans__patient_id": {"name": "patient_invoice_insurance_plans__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_invoice_insurance_plans.md", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.md", "unique_id": "doc.tamanu.patient_invoice_insurance_plans__patient_id", "block_contents": "ID of the patient"}, "doc.tamanu.patient_invoice_insurance_plans__invoice_insurance_plan_id": {"name": "patient_invoice_insurance_plans__invoice_insurance_plan_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_invoice_insurance_plans.md", "original_file_path": "../../database/model/public/patient_invoice_insurance_plans.md", "unique_id": "doc.tamanu.patient_invoice_insurance_plans__invoice_insurance_plan_id", "block_contents": "ID of the invoice insurance plan for the patient"}, "doc.tamanu.table__locations": {"name": "table__locations", "resource_type": "doc", "package_name": "tamanu", "path": "locations.md", "original_file_path": "../../database/model/public/locations.md", "unique_id": "doc.tamanu.table__locations", "block_contents": "Information on the hospital locations."}, "doc.tamanu.locations__code": {"name": "locations__code", "resource_type": "doc", "package_name": "tamanu", "path": "locations.md", "original_file_path": "../../database/model/public/locations.md", "unique_id": "doc.tamanu.locations__code", "block_contents": "Code for location"}, "doc.tamanu.locations__name": {"name": "locations__name", "resource_type": "doc", "package_name": "tamanu", "path": "locations.md", "original_file_path": "../../database/model/public/locations.md", "unique_id": "doc.tamanu.locations__name", "block_contents": "Full readable name for location"}, "doc.tamanu.locations__max_occupancy": {"name": "locations__max_occupancy", "resource_type": "doc", "package_name": "tamanu", "path": "locations.md", "original_file_path": "../../database/model/public/locations.md", "unique_id": "doc.tamanu.locations__max_occupancy", "block_contents": "The maximum number of patients that can be in this location"}, "doc.tamanu.locations__facility_id": {"name": "locations__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "locations.md", "original_file_path": "../../database/model/public/locations.md", "unique_id": "doc.tamanu.locations__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this location is in."}, "doc.tamanu.locations__location_group_id": {"name": "locations__location_group_id", "resource_type": "doc", "package_name": "tamanu", "path": "locations.md", "original_file_path": "../../database/model/public/locations.md", "unique_id": "doc.tamanu.locations__location_group_id", "block_contents": "Reference to the [group](#!/source/source.tamanu.tamanu.location_groups) this location is in."}, "doc.tamanu.table__user_preferences": {"name": "table__user_preferences", "resource_type": "doc", "package_name": "tamanu", "path": "user_preferences.md", "original_file_path": "../../database/model/public/user_preferences.md", "unique_id": "doc.tamanu.table__user_preferences", "block_contents": "Per-user preferences."}, "doc.tamanu.user_preferences__user_id": {"name": "user_preferences__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_preferences.md", "original_file_path": "../../database/model/public/user_preferences.md", "unique_id": "doc.tamanu.user_preferences__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users) these preferences are for."}, "doc.tamanu.user_preferences__key": {"name": "user_preferences__key", "resource_type": "doc", "package_name": "tamanu", "path": "user_preferences.md", "original_file_path": "../../database/model/public/user_preferences.md", "unique_id": "doc.tamanu.user_preferences__key", "block_contents": "Key of the user preference"}, "doc.tamanu.user_preferences__value": {"name": "user_preferences__value", "resource_type": "doc", "package_name": "tamanu", "path": "user_preferences.md", "original_file_path": "../../database/model/public/user_preferences.md", "unique_id": "doc.tamanu.user_preferences__value", "block_contents": "Value of the user preference"}, "doc.tamanu.user_preferences__facility_id": {"name": "user_preferences__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_preferences.md", "original_file_path": "../../database/model/public/user_preferences.md", "unique_id": "doc.tamanu.user_preferences__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) that this preference applies to"}, "doc.tamanu.table__note_items": {"name": "table__note_items", "resource_type": "doc", "package_name": "tamanu", "path": "note_items.md", "original_file_path": "../../database/model/public/note_items.md", "unique_id": "doc.tamanu.table__note_items", "block_contents": "Version 2 of note management.\n\nIn this version, notes were split between note pages and actual note (item) content.\n\nDeprecated.\n\nSee also [`note_pages`](#!/source/source.tamanu.tamanu.note_pages)."}, "doc.tamanu.note_items__note_page_id": {"name": "note_items__note_page_id", "resource_type": "doc", "package_name": "tamanu", "path": "note_items.md", "original_file_path": "../../database/model/public/note_items.md", "unique_id": "doc.tamanu.note_items__note_page_id", "block_contents": "The [note page](#!/source/source.tamanu.tamanu.note_pages) this item belongs to."}, "doc.tamanu.note_items__revised_by_id": {"name": "note_items__revised_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "note_items.md", "original_file_path": "../../database/model/public/note_items.md", "unique_id": "doc.tamanu.note_items__revised_by_id", "block_contents": "Reference to the [note_item](#!/source/source.tamanu.tamanu.note_items) that is revised."}, "doc.tamanu.note_items__author_id": {"name": "note_items__author_id", "resource_type": "doc", "package_name": "tamanu", "path": "note_items.md", "original_file_path": "../../database/model/public/note_items.md", "unique_id": "doc.tamanu.note_items__author_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who published this note item."}, "doc.tamanu.note_items__on_behalf_of_id": {"name": "note_items__on_behalf_of_id", "resource_type": "doc", "package_name": "tamanu", "path": "note_items.md", "original_file_path": "../../database/model/public/note_items.md", "unique_id": "doc.tamanu.note_items__on_behalf_of_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who wrote this note item, if different from `author_id`."}, "doc.tamanu.note_items__content": {"name": "note_items__content", "resource_type": "doc", "package_name": "tamanu", "path": "note_items.md", "original_file_path": "../../database/model/public/note_items.md", "unique_id": "doc.tamanu.note_items__content", "block_contents": "Text content of the note."}, "doc.tamanu.table__users": {"name": "table__users", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.table__users", "block_contents": "Records of each user that can login to Tamanu.\n\nThis includes machine users.\n\nThere is one special user account with an all-zero `id`, which is the global \"system\" user. This is\nused as a pseudo identity where the Tamanu system itself takes an action that normally is performed\nby a human or API user."}, "doc.tamanu.users__email": {"name": "users__email", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__email", "block_contents": "Email address for user. This is used to login and receive emails."}, "doc.tamanu.users__password": {"name": "users__password", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__password", "block_contents": "Hashed password for user login.\n\nThe value is encoded as a \"standard password hash\" with a `$[type]$[params]$[salt]$[hash]` general\nformat. This allows upgrading algorithms and parameters seamlessly. The current algorithm is bcrypt.\n\nThis may be null to prevent a user from being able to login."}, "doc.tamanu.users__display_name": {"name": "users__display_name", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__display_name", "block_contents": "The human readable display name for the user."}, "doc.tamanu.users__display_id": {"name": "users__display_id", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__display_id", "block_contents": "Display identifier for the user.\n\nThis may be the employee code or badge number."}, "doc.tamanu.users__phone_number": {"name": "users__phone_number", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__phone_number", "block_contents": "Phone number for the user.\n\nThis is not currently available anywhere visible."}, "doc.tamanu.users__role": {"name": "users__role", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__role", "block_contents": "The role of the user, which sets their permission level.\n\nThe special values `admin` and `system` indicate a superadmin and a system user respectively."}, "doc.tamanu.users__device_registration_quota": {"name": "users__device_registration_quota", "resource_type": "doc", "package_name": "tamanu", "path": "users.md", "original_file_path": "../../database/model/public/users.md", "unique_id": "doc.tamanu.users__device_registration_quota", "block_contents": "How many devices this user can register (when `features.deviceRegistrationQuota` is enabled).\n\nSee [`devices`](#!/source/source.tamanu.tamanu.devices) for more."}, "doc.tamanu.table__SequelizeMeta": {"name": "table__SequelizeMeta", "resource_type": "doc", "package_name": "tamanu", "path": "SequelizeMeta.md", "original_file_path": "../../database/model/public/SequelizeMeta.md", "unique_id": "doc.tamanu.table__SequelizeMeta", "block_contents": "This table tracks which migrations have been run. It is automatically managed by Sequelize (within Tamanu's `migrate`\nsubcommand), should never be edited manually"}, "doc.tamanu.SequelizeMeta__name": {"name": "SequelizeMeta__name", "resource_type": "doc", "package_name": "tamanu", "path": "SequelizeMeta.md", "original_file_path": "../../database/model/public/SequelizeMeta.md", "unique_id": "doc.tamanu.SequelizeMeta__name", "block_contents": "Name of the migration"}, "doc.tamanu.table__notes_legacy": {"name": "table__notes_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.table__notes_legacy", "block_contents": "Legacy notes"}, "doc.tamanu.notes_legacy__record_id": {"name": "notes_legacy__record_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.notes_legacy__record_id", "block_contents": "Legacy notes record_id"}, "doc.tamanu.notes_legacy__record_type": {"name": "notes_legacy__record_type", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.notes_legacy__record_type", "block_contents": "Legacy notes record_type"}, "doc.tamanu.notes_legacy__note_type": {"name": "notes_legacy__note_type", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.notes_legacy__note_type", "block_contents": "Legacy notes note_type"}, "doc.tamanu.notes_legacy__content": {"name": "notes_legacy__content", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.notes_legacy__content", "block_contents": "Legacy notes content"}, "doc.tamanu.notes_legacy__author_id": {"name": "notes_legacy__author_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.notes_legacy__author_id", "block_contents": "Legacy notes author_id"}, "doc.tamanu.notes_legacy__on_behalf_of_id": {"name": "notes_legacy__on_behalf_of_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes_legacy.md", "original_file_path": "../../database/model/public/notes_legacy.md", "unique_id": "doc.tamanu.notes_legacy__on_behalf_of_id", "block_contents": "Legacy notes on_behalf_of_id"}, "doc.tamanu.table__lab_requests": {"name": "table__lab_requests", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.table__lab_requests", "block_contents": "Lab requests are the entrypoint of laboratory workflows in Tamanu.\n\nEach row is a request for a laboratory to perform a group of tests on a sample taken from a patient.\n\nIt will be updated over the course of the workflow to various statuses, starting with\n`reception_pending` (lab has not received the request yet), up to `published` (lab has completed the\ntests and has attached verified results).\n\nSee also: `lab_request_attachments`, `lab_request_logs`, `lab_results`, `lab_tests`,\n`lab_test_panels`, and related tables to those."}, "doc.tamanu.lab_requests__sample_time": {"name": "lab_requests__sample_time", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__sample_time", "block_contents": "When the sample was collected."}, "doc.tamanu.lab_requests__requested_date": {"name": "lab_requests__requested_date", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__requested_date", "block_contents": "When the request was submitted."}, "doc.tamanu.lab_requests__urgent": {"name": "lab_requests__urgent", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__urgent", "block_contents": "Deprecated."}, "doc.tamanu.lab_requests__specimen_attached": {"name": "lab_requests__specimen_attached", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__specimen_attached", "block_contents": "Whether a specimen is attached.\n\nThis implies `specimen_type_id`."}, "doc.tamanu.lab_requests__status": {"name": "lab_requests__status", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__status", "block_contents": "The status of the request.\n\nOne of:\n- `reception_pending`\n- `results_pending`\n- `interim_results`\n- `to_be_verified`\n- `verified`\n- `published`\n- `cancelled`\n- `invalidated`\n- `deleted`\n- `sample-not-collected`\n- `entered-in-error`"}, "doc.tamanu.lab_requests__senaite_id": {"name": "lab_requests__senaite_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__senaite_id", "block_contents": "When the [SENAITE](https://www.senaite.com/) integration is enabled, this is filled to the SENAITE\nID for the request."}, "doc.tamanu.lab_requests__sample_id": {"name": "lab_requests__sample_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__sample_id", "block_contents": "When the [SENAITE](https://www.senaite.com/) integration is enabled, this is filled to the SENAITE\nID for the sample."}, "doc.tamanu.lab_requests__requested_by_id": {"name": "lab_requests__requested_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__requested_by_id", "block_contents": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) who submitted the request."}, "doc.tamanu.lab_requests__encounter_id": {"name": "lab_requests__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__encounter_id", "block_contents": "Reference to the [Encounter](#!/source/source.tamanu.tamanu.encounters) the request is a part of."}, "doc.tamanu.lab_requests__lab_test_category_id": {"name": "lab_requests__lab_test_category_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__lab_test_category_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\ncategory of this request's test."}, "doc.tamanu.lab_requests__display_id": {"name": "lab_requests__display_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__display_id", "block_contents": "Short unique identifier used on the frontend."}, "doc.tamanu.lab_requests__lab_test_priority_id": {"name": "lab_requests__lab_test_priority_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__lab_test_priority_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\npriority of this request."}, "doc.tamanu.lab_requests__lab_test_laboratory_id": {"name": "lab_requests__lab_test_laboratory_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__lab_test_laboratory_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\nlaboratory fulfilling this request."}, "doc.tamanu.lab_requests__sample_time_legacy": {"name": "lab_requests__sample_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__sample_time_legacy", "block_contents": "[Deprecated] When the sample was collected."}, "doc.tamanu.lab_requests__requested_date_legacy": {"name": "lab_requests__requested_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__requested_date_legacy", "block_contents": "[Deprecated] When the request was submitted."}, "doc.tamanu.lab_requests__reason_for_cancellation": {"name": "lab_requests__reason_for_cancellation", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__reason_for_cancellation", "block_contents": "Why this request was cancelled.\n\nOne of:\n- `clinical`\n- `duplicate`\n- `entered-in-error`\n- `other`\n- `patient-discharged`\n- `patient-refused`"}, "doc.tamanu.lab_requests__department_id": {"name": "lab_requests__department_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__department_id", "block_contents": "Reference to the [Department](#!/source/source.tamanu.tamanu.departments) the request comes from."}, "doc.tamanu.lab_requests__lab_test_panel_request_id": {"name": "lab_requests__lab_test_panel_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__lab_test_panel_request_id", "block_contents": "Reference to the [Test Panel Request](#!/source/source.tamanu.tamanu.lab_test_panel_requests)\nassociated with this request, if any."}, "doc.tamanu.lab_requests__lab_sample_site_id": {"name": "lab_requests__lab_sample_site_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__lab_sample_site_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing where\non the patient the sample was taken."}, "doc.tamanu.lab_requests__published_date": {"name": "lab_requests__published_date", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__published_date", "block_contents": "When this lab request's results were published."}, "doc.tamanu.lab_requests__specimen_type_id": {"name": "lab_requests__specimen_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__specimen_type_id", "block_contents": "Reference to the [Reference Data](#!/source/source.tamanu.tamanu.reference_data) representing the\ntype of the specimen for the request, if specified."}, "doc.tamanu.lab_requests__collected_by_id": {"name": "lab_requests__collected_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__collected_by_id", "block_contents": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) who collected the sample."}, "doc.tamanu.lab_requests__results_interpretation": {"name": "lab_requests__results_interpretation", "resource_type": "doc", "package_name": "tamanu", "path": "lab_requests.md", "original_file_path": "../../database/model/public/lab_requests.md", "unique_id": "doc.tamanu.lab_requests__results_interpretation", "block_contents": "Free-text interpretation and clinical commentary on the laboratory test results."}, "doc.tamanu.table__patient_death_data": {"name": "table__patient_death_data", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.table__patient_death_data", "block_contents": "Information about a patient's death."}, "doc.tamanu.patient_death_data__patient_id": {"name": "patient_death_data__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__patient_id", "block_contents": "The [patient](#!/source/source.tamanu.tamanu.patients) who died."}, "doc.tamanu.patient_death_data__clinician_id": {"name": "patient_death_data__clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__clinician_id", "block_contents": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) who is recording this death."}, "doc.tamanu.patient_death_data__facility_id": {"name": "patient_death_data__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) where this death is being recorded."}, "doc.tamanu.patient_death_data__manner": {"name": "patient_death_data__manner", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__manner", "block_contents": "A descriptive text specifying the manner of death."}, "doc.tamanu.patient_death_data__recent_surgery": {"name": "patient_death_data__recent_surgery", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__recent_surgery", "block_contents": "Whether the deceased patient had a recent surgery, if any."}, "doc.tamanu.patient_death_data__last_surgery_date": {"name": "patient_death_data__last_surgery_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__last_surgery_date", "block_contents": "Datetime of the most recent surgery the patient received, if any."}, "doc.tamanu.patient_death_data__last_surgery_reason_id": {"name": "patient_death_data__last_surgery_reason_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__last_surgery_reason_id", "block_contents": "Reference to a `diagnosis` ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) for the\nreason of the most recent surgery the patient received, if any."}, "doc.tamanu.patient_death_data__external_cause_date": {"name": "patient_death_data__external_cause_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__external_cause_date", "block_contents": "Datetime of external cause of death, if applicable."}, "doc.tamanu.patient_death_data__external_cause_location": {"name": "patient_death_data__external_cause_location", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__external_cause_location", "block_contents": "Physical location of external cause of death, if applicable."}, "doc.tamanu.patient_death_data__external_cause_notes": {"name": "patient_death_data__external_cause_notes", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__external_cause_notes", "block_contents": "Free-form description of the location of external cause of death, if applicable."}, "doc.tamanu.patient_death_data__was_pregnant": {"name": "patient_death_data__was_pregnant", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__was_pregnant", "block_contents": "Whether the deceased was pregnant."}, "doc.tamanu.patient_death_data__pregnancy_contributed": {"name": "patient_death_data__pregnancy_contributed", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__pregnancy_contributed", "block_contents": "Whether the pregnancy contributed to the death."}, "doc.tamanu.patient_death_data__fetal_or_infant": {"name": "patient_death_data__fetal_or_infant", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__fetal_or_infant", "block_contents": "Whether the deceased was themselves a foetus or infant."}, "doc.tamanu.patient_death_data__stillborn": {"name": "patient_death_data__stillborn", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__stillborn", "block_contents": "Whether the deceased was themselves stillborn."}, "doc.tamanu.patient_death_data__birth_weight": {"name": "patient_death_data__birth_weight", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__birth_weight", "block_contents": "If the deceased was a foetus, stillborn, or infant, their birth weight."}, "doc.tamanu.patient_death_data__within_day_of_birth": {"name": "patient_death_data__within_day_of_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__within_day_of_birth", "block_contents": "If the deceased was a foetus, stillborn, or infant, whether their passing was on the day of their birth."}, "doc.tamanu.patient_death_data__hours_survived_since_birth": {"name": "patient_death_data__hours_survived_since_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__hours_survived_since_birth", "block_contents": "If the deceased was an infant, how many days since the birth passed before their death."}, "doc.tamanu.patient_death_data__carrier_age": {"name": "patient_death_data__carrier_age", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__carrier_age", "block_contents": "If the deceased was a foetus, stillborn, or infant, the age of the carrier."}, "doc.tamanu.patient_death_data__carrier_pregnancy_weeks": {"name": "patient_death_data__carrier_pregnancy_weeks", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__carrier_pregnancy_weeks", "block_contents": "If the deceased was a foetus, stillborn, or infant, how many weeks pregnant their carrier was."}, "doc.tamanu.patient_death_data__outside_health_facility": {"name": "patient_death_data__outside_health_facility", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__outside_health_facility", "block_contents": "Whether the death occurred outside of the facility."}, "doc.tamanu.patient_death_data__primary_cause_time_after_onset": {"name": "patient_death_data__primary_cause_time_after_onset", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__primary_cause_time_after_onset", "block_contents": "The time in minutes after onset of the primary cause of death, if known."}, "doc.tamanu.patient_death_data__primary_cause_condition_id": {"name": "patient_death_data__primary_cause_condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__primary_cause_condition_id", "block_contents": "Reference to the primary cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if known."}, "doc.tamanu.patient_death_data__antecedent_cause1_time_after_onset": {"name": "patient_death_data__antecedent_cause1_time_after_onset", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__antecedent_cause1_time_after_onset", "block_contents": "The time in minutes after onset of an antecedent (1) cause of death, if applicable."}, "doc.tamanu.patient_death_data__antecedent_cause1_condition_id": {"name": "patient_death_data__antecedent_cause1_condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__antecedent_cause1_condition_id", "block_contents": "Reference to an antecedent (1) cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if applicable."}, "doc.tamanu.patient_death_data__antecedent_cause2_time_after_onset": {"name": "patient_death_data__antecedent_cause2_time_after_onset", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__antecedent_cause2_time_after_onset", "block_contents": "The time in minutes after onset of an antecedent (2) cause of death, if applicable."}, "doc.tamanu.patient_death_data__antecedent_cause2_condition_id": {"name": "patient_death_data__antecedent_cause2_condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__antecedent_cause2_condition_id", "block_contents": "Reference to an antecedent (2) cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if applicable."}, "doc.tamanu.patient_death_data__external_cause_date_legacy": {"name": "patient_death_data__external_cause_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__external_cause_date_legacy", "block_contents": "[Deprecated] Timestamp of external cause of death, if applicable."}, "doc.tamanu.patient_death_data__last_surgery_date_legacy": {"name": "patient_death_data__last_surgery_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__last_surgery_date_legacy", "block_contents": "[Deprecated] Timestamp of the most recent surgery the patient received, if any."}, "doc.tamanu.patient_death_data__is_final": {"name": "patient_death_data__is_final", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__is_final", "block_contents": "Whether this date record is final.\n\nIn Tamanu, this is set by a supervisor after review, and cannot be reversed; it causes all fields to\nbecome read-only. The only way to undo this record is through a `death_revert_logs`."}, "doc.tamanu.patient_death_data__antecedent_cause3_time_after_onset": {"name": "patient_death_data__antecedent_cause3_time_after_onset", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__antecedent_cause3_time_after_onset", "block_contents": "The time in minutes after onset of an antecedent (3) cause of death, if applicable."}, "doc.tamanu.patient_death_data__antecedent_cause3_condition_id": {"name": "patient_death_data__antecedent_cause3_condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__antecedent_cause3_condition_id", "block_contents": "Reference to an antecedent (3) cause of death\n([Reference Data](#!/source/source.tamanu.tamanu.reference_data)), if applicable."}, "doc.tamanu.patient_death_data__autopsy_requested": {"name": "patient_death_data__autopsy_requested", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__autopsy_requested", "block_contents": "Whether an autopsy was requested."}, "doc.tamanu.patient_death_data__autopsy_findings_used": {"name": "patient_death_data__autopsy_findings_used", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__autopsy_findings_used", "block_contents": "If an autopsy was requested, whether the findings were used in the death certification."}, "doc.tamanu.patient_death_data__manner_of_death_description": {"name": "patient_death_data__manner_of_death_description", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__manner_of_death_description", "block_contents": "If an external cause occurred, a text description on how and if applicable, notes of poisoning agent."}, "doc.tamanu.patient_death_data__pregnancy_moment": {"name": "patient_death_data__pregnancy_moment", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__pregnancy_moment", "block_contents": "The status of the pregnancy of the deceased, if applicable."}, "doc.tamanu.patient_death_data__multiple_pregnancy": {"name": "patient_death_data__multiple_pregnancy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__multiple_pregnancy", "block_contents": "Whether the deceased infant happened in a multiple pregnancy."}, "doc.tamanu.patient_death_data__mother_condition_description": {"name": "patient_death_data__mother_condition_description", "resource_type": "doc", "package_name": "tamanu", "path": "patient_death_data.md", "original_file_path": "../../database/model/public/patient_death_data.md", "unique_id": "doc.tamanu.patient_death_data__mother_condition_description", "block_contents": "A text description stating the conditions of mother that affected the fetus/newborn, if the death was perinatal."}, "doc.tamanu.table__patient_care_plans": {"name": "table__patient_care_plans", "resource_type": "doc", "package_name": "tamanu", "path": "patient_care_plans.md", "original_file_path": "../../database/model/public/patient_care_plans.md", "unique_id": "doc.tamanu.table__patient_care_plans", "block_contents": "List of current care plans the patient is on.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Care plans\".\n\nSee also: `public.patient_allergies`, `public.patient_conditions`, `public.patient_family_histories`,\n`public.patient_issues`."}, "doc.tamanu.patient_care_plans__patient_id": {"name": "patient_care_plans__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_care_plans.md", "original_file_path": "../../database/model/public/patient_care_plans.md", "unique_id": "doc.tamanu.patient_care_plans__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_care_plans__examiner_id": {"name": "patient_care_plans__examiner_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_care_plans.md", "original_file_path": "../../database/model/public/patient_care_plans.md", "unique_id": "doc.tamanu.patient_care_plans__examiner_id", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) who prescribed this care plan."}, "doc.tamanu.patient_care_plans__care_plan_id": {"name": "patient_care_plans__care_plan_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_care_plans.md", "original_file_path": "../../database/model/public/patient_care_plans.md", "unique_id": "doc.tamanu.patient_care_plans__care_plan_id", "block_contents": "Reference to the care plan ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.table__invoice_item_finalised_insurances": {"name": "table__invoice_item_finalised_insurances", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_finalised_insurances.md", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.md", "unique_id": "doc.tamanu.table__invoice_item_finalised_insurances", "block_contents": "Finalised insurance coverage values for invoice items.\n\nThis table stores the insurance coverage amounts that were locked in when an invoice item is finalised, \npreserving the coverage percentage at that point in time even if the insurance plan's coverage changes later."}, "doc.tamanu.invoice_item_finalised_insurances__invoice_item_id": {"name": "invoice_item_finalised_insurances__invoice_item_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_finalised_insurances.md", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.md", "unique_id": "doc.tamanu.invoice_item_finalised_insurances__invoice_item_id", "block_contents": "The [invoice item](#!/source/source.tamanu.tamanu.invoice_items) this insurance coverage applies to."}, "doc.tamanu.invoice_item_finalised_insurances__coverage_value_final": {"name": "invoice_item_finalised_insurances__coverage_value_final", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_finalised_insurances.md", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.md", "unique_id": "doc.tamanu.invoice_item_finalised_insurances__coverage_value_final", "block_contents": "The finalised coverage percentage for this invoice item.\n\nThis value is copied from the insurance plan's coverage at the time the invoice item is finalised,\npreserving it for the record even if the insurance plan's coverage percentage changes later."}, "doc.tamanu.invoice_item_finalised_insurances__invoice_insurance_plan_id": {"name": "invoice_item_finalised_insurances__invoice_insurance_plan_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_finalised_insurances.md", "original_file_path": "../../database/model/public/invoice_item_finalised_insurances.md", "unique_id": "doc.tamanu.invoice_item_finalised_insurances__invoice_insurance_plan_id", "block_contents": "The [insurance plan](#!/source/source.tamanu.tamanu.invoice_insurance_plans) providing the coverage."}, "doc.tamanu.table__user_recently_viewed_patients": {"name": "table__user_recently_viewed_patients", "resource_type": "doc", "package_name": "tamanu", "path": "user_recently_viewed_patients.md", "original_file_path": "../../database/model/public/user_recently_viewed_patients.md", "unique_id": "doc.tamanu.table__user_recently_viewed_patients", "block_contents": "A list of patients that a user has viewed recently.\n\nThis powers the \"quick access\" list in Tamanu to get back to patients that a user was last\ninteracting with."}, "doc.tamanu.user_recently_viewed_patients__user_id": {"name": "user_recently_viewed_patients__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_recently_viewed_patients.md", "original_file_path": "../../database/model/public/user_recently_viewed_patients.md", "unique_id": "doc.tamanu.user_recently_viewed_patients__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.user_recently_viewed_patients__patient_id": {"name": "user_recently_viewed_patients__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_recently_viewed_patients.md", "original_file_path": "../../database/model/public/user_recently_viewed_patients.md", "unique_id": "doc.tamanu.user_recently_viewed_patients__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients) that was viewed."}, "doc.tamanu.table__notes": {"name": "table__notes", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.table__notes", "block_contents": "Notes recorded by clinicians or system generated.\n\nAlso see the deprecated [`note_items`](#!/source/source.tamanu.tamanu.note_items),\n[`note_pages`](#!/source/source.tamanu.tamanu.note_pages), and the even older\n[`notes_legacy`](#!/source/source.tamanu.tamanu.notes_legacy).\n\nThis is the current version (3) of the notes system."}, "doc.tamanu.notes__record_id": {"name": "notes__record_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__record_id", "block_contents": "Polymorphic relationship to the record to which the note is attached (id)."}, "doc.tamanu.notes__record_type": {"name": "notes__record_type", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__record_type", "block_contents": "Polymorphic relationship to the record to which the note is attached (type)."}, "doc.tamanu.notes__content": {"name": "notes__content", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__content", "block_contents": "The content of the note recorded."}, "doc.tamanu.notes__author_id": {"name": "notes__author_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__author_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who published this note."}, "doc.tamanu.notes__on_behalf_of_id": {"name": "notes__on_behalf_of_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__on_behalf_of_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who wrote this note, if it wasn't the user who published it."}, "doc.tamanu.notes__revised_by_id": {"name": "notes__revised_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__revised_by_id", "block_contents": "Reference to the [note](#!/source/source.tamanu.tamanu.notes) that is being revised."}, "doc.tamanu.notes__note_type_id": {"name": "notes__note_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "notes.md", "original_file_path": "../../database/model/public/notes.md", "unique_id": "doc.tamanu.notes__note_type_id", "block_contents": "Reference to the note type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = noteType`)."}, "doc.tamanu.table__patient_allergies": {"name": "table__patient_allergies", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.table__patient_allergies", "block_contents": "List of allergies known of the patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Allergies\".\n\nSee also: `public.patient_care_plans`, `public.patient_conditions`,\n`public.patient_family_histories`, `public.patient_issues`."}, "doc.tamanu.patient_allergies__note": {"name": "patient_allergies__note", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__note", "block_contents": "Free-form description of this allergy."}, "doc.tamanu.patient_allergies__recorded_date": {"name": "patient_allergies__recorded_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__recorded_date", "block_contents": "Datetime at which this allergy was recorded."}, "doc.tamanu.patient_allergies__patient_id": {"name": "patient_allergies__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_allergies__practitioner_id": {"name": "patient_allergies__practitioner_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__practitioner_id", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) recording this allergy."}, "doc.tamanu.patient_allergies__allergy_id": {"name": "patient_allergies__allergy_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__allergy_id", "block_contents": "Reference to an allergy ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_allergies__recorded_date_legacy": {"name": "patient_allergies__recorded_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__recorded_date_legacy", "block_contents": "[Deprecated] Timestamp at which this allergy was recorded."}, "doc.tamanu.patient_allergies__reaction_id": {"name": "patient_allergies__reaction_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_allergies.md", "original_file_path": "../../database/model/public/patient_allergies.md", "unique_id": "doc.tamanu.patient_allergies__reaction_id", "block_contents": "Reference to an allergic reaction ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.table__patient_facilities": {"name": "table__patient_facilities", "resource_type": "doc", "package_name": "tamanu", "path": "patient_facilities.md", "original_file_path": "../../database/model/public/patient_facilities.md", "unique_id": "doc.tamanu.table__patient_facilities", "block_contents": "Tracks which patients are of interest to which facilities.\n\nThis is used to refine sync data: only patient data related to these patients is synced to a\nfacility (plus general data, and some exceptions apply like vaccine data under some conditions).\n\nIn Tamanu, this can be set manually on the facility server (via the \"mark for sync\" button), or\ncentrally (via some labs / vaccine programs, or via bulk-imports).\n\n_(\"Joe Patient attends X Clinic\" is clinical info; even though an entry in patient facilities\ndoesn't necessarily imply this, it often does.)_"}, "doc.tamanu.patient_facilities__facility_id": {"name": "patient_facilities__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_facilities.md", "original_file_path": "../../database/model/public/patient_facilities.md", "unique_id": "doc.tamanu.patient_facilities__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities)."}, "doc.tamanu.patient_facilities__patient_id": {"name": "patient_facilities__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_facilities.md", "original_file_path": "../../database/model/public/patient_facilities.md", "unique_id": "doc.tamanu.patient_facilities__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.table__program_registry_conditions": {"name": "table__program_registry_conditions", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_conditions.md", "original_file_path": "../../database/model/public/program_registry_conditions.md", "unique_id": "doc.tamanu.table__program_registry_conditions", "block_contents": "Table of program registry conditions."}, "doc.tamanu.program_registry_conditions__code": {"name": "program_registry_conditions__code", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_conditions.md", "original_file_path": "../../database/model/public/program_registry_conditions.md", "unique_id": "doc.tamanu.program_registry_conditions__code", "block_contents": "Code (identifier) for the condition."}, "doc.tamanu.program_registry_conditions__name": {"name": "program_registry_conditions__name", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_conditions.md", "original_file_path": "../../database/model/public/program_registry_conditions.md", "unique_id": "doc.tamanu.program_registry_conditions__name", "block_contents": "The name of the condition."}, "doc.tamanu.program_registry_conditions__program_registry_id": {"name": "program_registry_conditions__program_registry_id", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_conditions.md", "original_file_path": "../../database/model/public/program_registry_conditions.md", "unique_id": "doc.tamanu.program_registry_conditions__program_registry_id", "block_contents": "Reference to the [Program Registry](#!/source/source.tamanu.tamanu.program_registries)\nthe condition is a part of."}, "doc.tamanu.table__ips_requests": {"name": "table__ips_requests", "resource_type": "doc", "package_name": "tamanu", "path": "ips_requests.md", "original_file_path": "../../database/model/public/ips_requests.md", "unique_id": "doc.tamanu.table__ips_requests", "block_contents": "Queue of requests to generate [International Patient Summaries](https://international-patient-summary.net/) (IPS)."}, "doc.tamanu.ips_requests__patient_id": {"name": "ips_requests__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "ips_requests.md", "original_file_path": "../../database/model/public/ips_requests.md", "unique_id": "doc.tamanu.ips_requests__patient_id", "block_contents": "The [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.ips_requests__created_by": {"name": "ips_requests__created_by", "resource_type": "doc", "package_name": "tamanu", "path": "ips_requests.md", "original_file_path": "../../database/model/public/ips_requests.md", "unique_id": "doc.tamanu.ips_requests__created_by", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who created this request."}, "doc.tamanu.ips_requests__status": {"name": "ips_requests__status", "resource_type": "doc", "package_name": "tamanu", "path": "ips_requests.md", "original_file_path": "../../database/model/public/ips_requests.md", "unique_id": "doc.tamanu.ips_requests__status", "block_contents": "Processing status."}, "doc.tamanu.ips_requests__email": {"name": "ips_requests__email", "resource_type": "doc", "package_name": "tamanu", "path": "ips_requests.md", "original_file_path": "../../database/model/public/ips_requests.md", "unique_id": "doc.tamanu.ips_requests__email", "block_contents": "Email to send the generated IPS to."}, "doc.tamanu.ips_requests__error": {"name": "ips_requests__error", "resource_type": "doc", "package_name": "tamanu", "path": "ips_requests.md", "original_file_path": "../../database/model/public/ips_requests.md", "unique_id": "doc.tamanu.ips_requests__error", "block_contents": "If processing fails, the error."}, "doc.tamanu.table__appointment_procedure_types": {"name": "table__appointment_procedure_types", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_procedure_types.md", "original_file_path": "../../database/model/public/appointment_procedure_types.md", "unique_id": "doc.tamanu.table__appointment_procedure_types", "block_contents": "Junction table linking appointments to procedure types, allowing multiple procedure types to be associated with a single appointment."}, "doc.tamanu.appointment_procedure_types__appointment_id": {"name": "appointment_procedure_types__appointment_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_procedure_types.md", "original_file_path": "../../database/model/public/appointment_procedure_types.md", "unique_id": "doc.tamanu.appointment_procedure_types__appointment_id", "block_contents": "Reference to the [appointment](#!/source/source.tamanu.tamanu.appointments) this procedure type is associated with."}, "doc.tamanu.appointment_procedure_types__procedure_type_id": {"name": "appointment_procedure_types__procedure_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_procedure_types.md", "original_file_path": "../../database/model/public/appointment_procedure_types.md", "unique_id": "doc.tamanu.appointment_procedure_types__procedure_type_id", "block_contents": "Reference to the procedure type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = procedureType`) associated with this appointment."}, "doc.tamanu.table__survey_responses": {"name": "table__survey_responses", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.table__survey_responses", "block_contents": "A response to a survey (as recorded by a practitioner).\n\nTypically surveys are filled on behalf of patients as part of an encounter.\n\nBecause there are multiple distinct kinds of dates at play here:\n- `created_at`, `updated_at`, `deleted_at` are system data for syncing and cannot be relied on for realtime\n- `start_time`, `end_time` are real datetimes automatically recorded when starting and submitting a survey response\n- in survey response answers, there could be a data element for targeting the date of when exactly the data is recorded in real time."}, "doc.tamanu.survey_responses__start_time": {"name": "survey_responses__start_time", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__start_time", "block_contents": "When the survey was started."}, "doc.tamanu.survey_responses__end_time": {"name": "survey_responses__end_time", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__end_time", "block_contents": "When the survey was completed."}, "doc.tamanu.survey_responses__result": {"name": "survey_responses__result", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__result", "block_contents": "The numeric value that is the summary of the survey response."}, "doc.tamanu.survey_responses__survey_id": {"name": "survey_responses__survey_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__survey_id", "block_contents": "The [survey](#!/source/source.tamanu.tamanu.surveys) being responded to."}, "doc.tamanu.survey_responses__encounter_id": {"name": "survey_responses__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this survey response is a part of."}, "doc.tamanu.survey_responses__result_text": {"name": "survey_responses__result_text", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__result_text", "block_contents": "The textual value that is the summary of the survey response."}, "doc.tamanu.survey_responses__user_id": {"name": "survey_responses__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) recording this survey response."}, "doc.tamanu.survey_responses__start_time_legacy": {"name": "survey_responses__start_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__start_time_legacy", "block_contents": "[Deprecated] When the survey was started."}, "doc.tamanu.survey_responses__end_time_legacy": {"name": "survey_responses__end_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__end_time_legacy", "block_contents": "[Deprecated] When the survey was completed."}, "doc.tamanu.survey_responses__notified": {"name": "survey_responses__notified", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__notified", "block_contents": "If the [survey](#!/source/source.tamanu.tamanu.surveys) is `notifiable`, whether this response's\nnotification has been sent."}, "doc.tamanu.survey_responses__metadata": {"name": "survey_responses__metadata", "resource_type": "doc", "package_name": "tamanu", "path": "survey_responses.md", "original_file_path": "../../database/model/public/survey_responses.md", "unique_id": "doc.tamanu.survey_responses__metadata", "block_contents": "Metadata for a survey response, (eg: if a survey response is linked to another survey response)"}, "doc.tamanu.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "tamanu", "path": "overview.md", "original_file_path": "../../database/model/public/overview.md", "unique_id": "doc.tamanu.__overview__", "block_contents": "# Database schemas\n\n> [!NOTE]\n> If you're looking at this in Slab, go instead here:\n> <https://data.bes.au/tamanu/main/>\n\n## Types of data\n\n### \ud83d\udcda Reference data (tag: `reference`)\n\nSystem-wide configuration, lists (eg diagnoses, facilities, locations).\nAlso includes surveys and their questions, vaccination schedules, etc.\n\nPopulated centrally, synced down to all facilities and mobile devices.\n\nNever considered sensitive/restricted.\n\n### \ud83d\udccb Clinical data (tag: `clinical`)\n\nPatient medical records. \n\nAlways attached to a Patient, often via an Encounter (almost all records with a patientId or an encounterId will be clinical data).\n\nAlways considered sensitive.\n\n### \ud83d\udcc1 Administration data (tag: `administration`)\n\nThematically pretty close to reference data, but distinct in that administration data is expected to change as part of normal day-to-day system operation (eg a user can change their password or email address outside of a project manager or admin reconfiguring the system).\n\n### \ud83d\udd27 System data (tag: `system`)\n\nData that is internal to Tamanu operation.\n\nLocal configuration, sync status, task queues etc.\n\nUsually invisible to clinicians and PMs.\n\nSometimes sensitive (eg a queued email to a patient notifying them of a test result).\n\n### \ud83d\udeae Deprecated/legacy data (tag: `deprecated`)\n\nEntire tables that are deprecated.\n\nThis is an additional tag and should be accompanied by one of the above tags.\n\n## Masking\n\nSome columns have a `config.meta.masking` entry.\nThis indicates that the contents of the column should be masked for data anonymisation purposes, and how that should be done.\nThis masking definition is custom to Tamanu, to avoid locking ourselves into any particular masking software implementation.\nThe descriptions below are kept deliberately vague as to expected behaviour, so that implementations are able to vary.\n\nThe value of the entry is either a string (short form) or a map (extended form):\n\n```yaml\nconfig:\n  meta:\n    masking: something\n```\n\nis equivalent to:\n\n```yaml\nconfig:\n  meta:\n    masking:\n      kind: something\n```\n\nThe map (extended form) of the value _must_ have the `kind:` key, and may optionally have additional parameters to control masked data generation.\n\nWhen masking, nulls are preserved.\n\n### `truncate` table mask\n\nApplies only at the table level instead of the column level.\n\nThe entire table is truncated.\n\n### `date` and `datetime` masks\n\nThese can be applied to native postgres date(time) types like `timestamptz`, or to text-representation fields like `character(10)` and `character(19)`.\n\nThe difference between `date` and `datetime` is one of content, not data format: `date` masks will anonymise by varying across different dates, while `datetime` will try to preserve the date component but vary the time of day.\n\n### `text` and `string` mask\n\nThis can be applied to `text`, `character varying`, and so on.\n\nThe generated content should be approximately the same length as the original.\n\nFor `string`, the content is random printable (ascii) characters without spaces.\nFor `text`, the content is random words and/or sentences.\n\n### `email`, `name`, `phone`, `place`, `url` masks\n\nThese can be applied to `text`, `character varying`, and so on.\n\nThese are like the `text` mask, but should generate fake data in a particular shape.\n\nFor `name` masks, wherever possible the generator should detect whether the original has a space within, and if so generate a \"full name\", otherwise go for a single (first/middle/last) name.\n\n### `zero` mask\n\nThis is a special mask that will keep the length of the data identical but replace it entirely with zeroes.\n\nThis is useful for `bytea` data.\n\n### `empty` mask\n\nThis can be applied to almost every field type.\n\nIt deletes the value, without setting it to null.\nFor example, numbers become zero, strings become zero-sized, json(b)s become empty objects, etc.\n\n### `nil` mask\n\nThis can be applied to columns that don't have a `not null` constraint.\n\nIt nulls the field.\n\n### `default` mask\n\nThis can be applied to columns that have a default value.\n\nIt applies that value.\n\n### `integer`, `float`, `money` masks\n\nThese can be applied to native number types and to `text` representations.\n\nA `range` parameter can be provided as a pair of numbers to constrain the generated value:\n\n```yaml\nconfig:\n  meta:\n    masking:\n      kind: integer\n      range: 0-10.5\n```\n\nIn the case of `money`, the value is generated as a float (for `numeric` columns) with two decimals."}, "doc.tamanu.table__appointment_schedules": {"name": "table__appointment_schedules", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.table__appointment_schedules", "block_contents": "Defines recurrence rules for appointments."}, "doc.tamanu.appointment_schedules__until_date": {"name": "appointment_schedules__until_date", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__until_date", "block_contents": "The end date for the recurrence. No occurrences will be generated beyond this date. \nBoth `until_date` and `occurrence_count` cannot be null at the same time to ensure the recurrence has an end condition."}, "doc.tamanu.appointment_schedules__interval": {"name": "appointment_schedules__interval", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__interval", "block_contents": "The recurrence interval. For example:\n- For a `frequency` of `WEEKLY`, an `interval` of 1 means \"Once a week.\"\n- For a `frequency` of `MONTHLY`, an `interval` of 3 means \"Every 3 months.\""}, "doc.tamanu.appointment_schedules__frequency": {"name": "appointment_schedules__frequency", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__frequency", "block_contents": "How often the the recurrence occurs.\n\nOne of:\n- `WEEKLY`\n- `MONTHLY`"}, "doc.tamanu.appointment_schedules__days_of_week": {"name": "appointment_schedules__days_of_week", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__days_of_week", "block_contents": "Stores an array of ISO weekday abbreviations. \nGiven `WEEKLY` frequency `days_of_week` determines the weekday that the repeated appointment occurs on. \nGiven `MONTHLY` frequency `days_of_week` is combined with `nth_weekday` to determine the date in each month that the repeated appointment occurs on.\n\nOne of: \n- `MO`\n- `TU`\n- `WE`\n- `TH`\n- `FR`\n- `SA`\n- `SU`"}, "doc.tamanu.appointment_schedules__nth_weekday": {"name": "appointment_schedules__nth_weekday", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__nth_weekday", "block_contents": "Ordinal weekday for monthly recurrence interpreted with `days_of_week` for example:\n- `1` with `days_of_week = ['MO']` =  First Monday of the month\n- `2` with `days_of_week = ['TU']` =  Second Tuesday of the month\n- `-1` with `days_of_week = ['FR']` = Last Friday of the month"}, "doc.tamanu.appointment_schedules__occurrence_count": {"name": "appointment_schedules__occurrence_count", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__occurrence_count", "block_contents": "When this value is set, the recurrence ends after generating the specified number of occurrences\nAt least one of `occurrence_count` or `until_date` must be set."}, "doc.tamanu.appointment_schedules__is_fully_generated": {"name": "appointment_schedules__is_fully_generated", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__is_fully_generated", "block_contents": "Whether or not all repeating appointments have been created for a schedule"}, "doc.tamanu.appointment_schedules__generated_until_date": {"name": "appointment_schedules__generated_until_date", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__generated_until_date", "block_contents": "The date of the most recent appointment in a schedule, this is set after generation of the repeated appointment and then updated if it is necessary to generate further appointments."}, "doc.tamanu.appointment_schedules__cancelled_at_date": {"name": "appointment_schedules__cancelled_at_date", "resource_type": "doc", "package_name": "tamanu", "path": "appointment_schedules.md", "original_file_path": "../../database/model/public/appointment_schedules.md", "unique_id": "doc.tamanu.appointment_schedules__cancelled_at_date", "block_contents": "The date from which appointments in a schedule have been cancelled, this is set when cancelling 'this and all future appointments'."}, "doc.tamanu.table__pharmacy_orders": {"name": "table__pharmacy_orders", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_orders.md", "original_file_path": "../../database/model/public/pharmacy_orders.md", "unique_id": "doc.tamanu.table__pharmacy_orders", "block_contents": "An order for prescriptions placed by Tamanu to a Pharmacy"}, "doc.tamanu.pharmacy_orders__ordering_clinician_id": {"name": "pharmacy_orders__ordering_clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_orders.md", "original_file_path": "../../database/model/public/pharmacy_orders.md", "unique_id": "doc.tamanu.pharmacy_orders__ordering_clinician_id", "block_contents": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) who placed the order."}, "doc.tamanu.pharmacy_orders__encounter_id": {"name": "pharmacy_orders__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_orders.md", "original_file_path": "../../database/model/public/pharmacy_orders.md", "unique_id": "doc.tamanu.pharmacy_orders__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) for the order."}, "doc.tamanu.pharmacy_orders__comments": {"name": "pharmacy_orders__comments", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_orders.md", "original_file_path": "../../database/model/public/pharmacy_orders.md", "unique_id": "doc.tamanu.pharmacy_orders__comments", "block_contents": "Comments provided by the clinician when placing the order."}, "doc.tamanu.pharmacy_orders__is_discharge_prescription": {"name": "pharmacy_orders__is_discharge_prescription", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_orders.md", "original_file_path": "../../database/model/public/pharmacy_orders.md", "unique_id": "doc.tamanu.pharmacy_orders__is_discharge_prescription", "block_contents": "If the patient is being discharged with this prescription."}, "doc.tamanu.pharmacy_orders__facility_id": {"name": "pharmacy_orders__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "pharmacy_orders.md", "original_file_path": "../../database/model/public/pharmacy_orders.md", "unique_id": "doc.tamanu.pharmacy_orders__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) where the pharmacy order was placed."}, "doc.tamanu.table__procedure_type_surveys": {"name": "table__procedure_type_surveys", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_type_surveys.md", "original_file_path": "../../database/model/public/procedure_type_surveys.md", "unique_id": "doc.tamanu.table__procedure_type_surveys", "block_contents": "Association between procedure types and surveys\n\nThis link is used to populate an embedded survey in the procedure modal"}, "doc.tamanu.procedure_type_surveys__procedure_type_id": {"name": "procedure_type_surveys__procedure_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_type_surveys.md", "original_file_path": "../../database/model/public/procedure_type_surveys.md", "unique_id": "doc.tamanu.procedure_type_surveys__procedure_type_id", "block_contents": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data) (`type=procedureType`)"}, "doc.tamanu.procedure_type_surveys__survey_id": {"name": "procedure_type_surveys__survey_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_type_surveys.md", "original_file_path": "../../database/model/public/procedure_type_surveys.md", "unique_id": "doc.tamanu.procedure_type_surveys__survey_id", "block_contents": "Reference to a [survey](#!/source/source.tamanu.tamanu.surveys)."}, "doc.tamanu.table__patient_secondary_ids": {"name": "table__patient_secondary_ids", "resource_type": "doc", "package_name": "tamanu", "path": "patient_secondary_ids.md", "original_file_path": "../../database/model/public/patient_secondary_ids.md", "unique_id": "doc.tamanu.table__patient_secondary_ids", "block_contents": "Alternative IDs to be checked for when searching for patient by ID.\n\nFor example, driver licence or passport numbers, or other national or local health numbers, if there\nare disparate systems or the country is in a transitional period."}, "doc.tamanu.patient_secondary_ids__value": {"name": "patient_secondary_ids__value", "resource_type": "doc", "package_name": "tamanu", "path": "patient_secondary_ids.md", "original_file_path": "../../database/model/public/patient_secondary_ids.md", "unique_id": "doc.tamanu.patient_secondary_ids__value", "block_contents": "Value of the identifier."}, "doc.tamanu.patient_secondary_ids__type_id": {"name": "patient_secondary_ids__type_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_secondary_ids.md", "original_file_path": "../../database/model/public/patient_secondary_ids.md", "unique_id": "doc.tamanu.patient_secondary_ids__type_id", "block_contents": "Reference to [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\nwith `type=secondaryIdType`."}, "doc.tamanu.patient_secondary_ids__patient_id": {"name": "patient_secondary_ids__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_secondary_ids.md", "original_file_path": "../../database/model/public/patient_secondary_ids.md", "unique_id": "doc.tamanu.patient_secondary_ids__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).\n\nThere may be zero or more `patient_secondary_ids` per patient."}, "doc.tamanu.table__program_registry_condition_categories": {"name": "table__program_registry_condition_categories", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_condition_categories.md", "original_file_path": "../../database/model/public/program_registry_condition_categories.md", "unique_id": "doc.tamanu.table__program_registry_condition_categories", "block_contents": "Categories to be set against patient program registry conditions. The categories are configured through the program importer for each program registry. There is a hard-loaded list that is seeded by default in the database for each program registry."}, "doc.tamanu.program_registry_condition_categories__code": {"name": "program_registry_condition_categories__code", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_condition_categories.md", "original_file_path": "../../database/model/public/program_registry_condition_categories.md", "unique_id": "doc.tamanu.program_registry_condition_categories__code", "block_contents": "The code for the category."}, "doc.tamanu.program_registry_condition_categories__name": {"name": "program_registry_condition_categories__name", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_condition_categories.md", "original_file_path": "../../database/model/public/program_registry_condition_categories.md", "unique_id": "doc.tamanu.program_registry_condition_categories__name", "block_contents": "The name for the category."}, "doc.tamanu.program_registry_condition_categories__program_registry_id": {"name": "program_registry_condition_categories__program_registry_id", "resource_type": "doc", "package_name": "tamanu", "path": "program_registry_condition_categories.md", "original_file_path": "../../database/model/public/program_registry_condition_categories.md", "unique_id": "doc.tamanu.program_registry_condition_categories__program_registry_id", "block_contents": "The id of the program registry."}, "doc.tamanu.table__prescriptions": {"name": "table__prescriptions", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.table__prescriptions", "block_contents": "Records prescriptions for medications."}, "doc.tamanu.prescriptions__end_date": {"name": "prescriptions__end_date", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__end_date", "block_contents": "When the prescription ends."}, "doc.tamanu.prescriptions__indication": {"name": "prescriptions__indication", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__indication", "block_contents": "The [indication of use](https://en.wikipedia.org/wiki/Indication_(medicine)) for the medicine."}, "doc.tamanu.prescriptions__route": {"name": "prescriptions__route", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__route", "block_contents": "Administration route for the medication."}, "doc.tamanu.prescriptions__medication_id": {"name": "prescriptions__medication_id", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__medication_id", "block_contents": "The medication ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = drug`)."}, "doc.tamanu.prescriptions__prescriber_id": {"name": "prescriptions__prescriber_id", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__prescriber_id", "block_contents": "[Who](#!/source/source.tamanu.tamanu.users) prescribed the medication."}, "doc.tamanu.prescriptions__notes": {"name": "prescriptions__notes", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__notes", "block_contents": "Free-form note about the prescription."}, "doc.tamanu.prescriptions__quantity": {"name": "prescriptions__quantity", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__quantity", "block_contents": "Quantity of medicine to dispense."}, "doc.tamanu.prescriptions__discontinued": {"name": "prescriptions__discontinued", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__discontinued", "block_contents": "Whether the prescription was discontinued."}, "doc.tamanu.prescriptions__discontinuing_clinician_id": {"name": "prescriptions__discontinuing_clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__discontinuing_clinician_id", "block_contents": "If the prescription was discontinued, who did it."}, "doc.tamanu.prescriptions__discontinuing_reason": {"name": "prescriptions__discontinuing_reason", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__discontinuing_reason", "block_contents": "If the prescription was discontinued, why that happened."}, "doc.tamanu.prescriptions__repeats": {"name": "prescriptions__repeats", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__repeats", "block_contents": "How many times this prescription can be repeatedly dispensed without a new prescription."}, "doc.tamanu.prescriptions__discontinued_date": {"name": "prescriptions__discontinued_date", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__discontinued_date", "block_contents": "If the prescription was discontinued, when that happened."}, "doc.tamanu.prescriptions__end_date_legacy": {"name": "prescriptions__end_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__end_date_legacy", "block_contents": "[Deprecated] When the prescription ends."}, "doc.tamanu.prescriptions__is_ongoing": {"name": "prescriptions__is_ongoing", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__is_ongoing", "block_contents": "A flag to determine whether or not the current prescription is ongoing"}, "doc.tamanu.prescriptions__is_prn": {"name": "prescriptions__is_prn", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__is_prn", "block_contents": "A flag to determine whether or not the current prescription is prn"}, "doc.tamanu.prescriptions__is_variable_dose": {"name": "prescriptions__is_variable_dose", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__is_variable_dose", "block_contents": "A flag to determine whether or not the current prescription is variable does"}, "doc.tamanu.prescriptions__dose_amount": {"name": "prescriptions__dose_amount", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__dose_amount", "block_contents": "Numeric field to record dose amount"}, "doc.tamanu.prescriptions__units": {"name": "prescriptions__units", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__units", "block_contents": "The units of the prescription"}, "doc.tamanu.prescriptions__frequency": {"name": "prescriptions__frequency", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__frequency", "block_contents": "The frequency of the prescription"}, "doc.tamanu.prescriptions__start_date": {"name": "prescriptions__start_date", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__start_date", "block_contents": "The start date of the prescription"}, "doc.tamanu.prescriptions__duration_value": {"name": "prescriptions__duration_value", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__duration_value", "block_contents": "The duration value of the prescription"}, "doc.tamanu.prescriptions__duration_unit": {"name": "prescriptions__duration_unit", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__duration_unit", "block_contents": "The duration unit of the prescription"}, "doc.tamanu.prescriptions__is_phone_order": {"name": "prescriptions__is_phone_order", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__is_phone_order", "block_contents": "A flag to determine whether or not the current prescription is phone order"}, "doc.tamanu.prescriptions__ideal_times": {"name": "prescriptions__ideal_times", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__ideal_times", "block_contents": "Ideal times which are specified by prescriber"}, "doc.tamanu.prescriptions__pharmacy_notes": {"name": "prescriptions__pharmacy_notes", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__pharmacy_notes", "block_contents": "Free-form pharmacy note of the prescription."}, "doc.tamanu.prescriptions__display_pharmacy_notes_in_mar": {"name": "prescriptions__display_pharmacy_notes_in_mar", "resource_type": "doc", "package_name": "tamanu", "path": "prescriptions.md", "original_file_path": "../../database/model/public/prescriptions.md", "unique_id": "doc.tamanu.prescriptions__display_pharmacy_notes_in_mar", "block_contents": "A flag to determine whether to display 'Pharmacy notes' on the medication administration record"}, "doc.tamanu.table__invoice_insurer_payments": {"name": "table__invoice_insurer_payments", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurer_payments.md", "original_file_path": "../../database/model/public/invoice_insurer_payments.md", "unique_id": "doc.tamanu.table__invoice_insurer_payments", "block_contents": "Extra metadata about a payment when it was done by a patient."}, "doc.tamanu.invoice_insurer_payments__invoice_payment_id": {"name": "invoice_insurer_payments__invoice_payment_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurer_payments.md", "original_file_path": "../../database/model/public/invoice_insurer_payments.md", "unique_id": "doc.tamanu.invoice_insurer_payments__invoice_payment_id", "block_contents": "The [payment](#!/source/source.tamanu.tamanu.invoice_payments)."}, "doc.tamanu.invoice_insurer_payments__insurer_id": {"name": "invoice_insurer_payments__insurer_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurer_payments.md", "original_file_path": "../../database/model/public/invoice_insurer_payments.md", "unique_id": "doc.tamanu.invoice_insurer_payments__insurer_id", "block_contents": "The insurer ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.invoice_insurer_payments__status": {"name": "invoice_insurer_payments__status", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurer_payments.md", "original_file_path": "../../database/model/public/invoice_insurer_payments.md", "unique_id": "doc.tamanu.invoice_insurer_payments__status", "block_contents": "The status of this payment.\n\nOne of:\n- `unpaid`\n- `paid`\n- `partial`\n- `rejected`"}, "doc.tamanu.invoice_insurer_payments__reason": {"name": "invoice_insurer_payments__reason", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurer_payments.md", "original_file_path": "../../database/model/public/invoice_insurer_payments.md", "unique_id": "doc.tamanu.invoice_insurer_payments__reason", "block_contents": "The reason for the payment. Generally this is used for rejections."}, "doc.tamanu.table__imaging_type_external_codes": {"name": "table__imaging_type_external_codes", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_type_external_codes.md", "original_file_path": "../../database/model/public/imaging_type_external_codes.md", "unique_id": "doc.tamanu.table__imaging_type_external_codes", "block_contents": "Mapping table for imaging types to external codes."}, "doc.tamanu.imaging_type_external_codes__imaging_type_code": {"name": "imaging_type_external_codes__imaging_type_code", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_type_external_codes.md", "original_file_path": "../../database/model/public/imaging_type_external_codes.md", "unique_id": "doc.tamanu.imaging_type_external_codes__imaging_type_code", "block_contents": "Tamanu's imaging type code."}, "doc.tamanu.imaging_type_external_codes__code": {"name": "imaging_type_external_codes__code", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_type_external_codes.md", "original_file_path": "../../database/model/public/imaging_type_external_codes.md", "unique_id": "doc.tamanu.imaging_type_external_codes__code", "block_contents": "External code."}, "doc.tamanu.imaging_type_external_codes__description": {"name": "imaging_type_external_codes__description", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_type_external_codes.md", "original_file_path": "../../database/model/public/imaging_type_external_codes.md", "unique_id": "doc.tamanu.imaging_type_external_codes__description", "block_contents": "Description of code."}, "doc.tamanu.table__assets": {"name": "table__assets", "resource_type": "doc", "package_name": "tamanu", "path": "assets.md", "original_file_path": "../../database/model/public/assets.md", "unique_id": "doc.tamanu.table__assets", "block_contents": "Table of assets used in the tamanu app ui and patient letters."}, "doc.tamanu.assets__id": {"name": "assets__id", "resource_type": "doc", "package_name": "tamanu", "path": "assets.md", "original_file_path": "../../database/model/public/assets.md", "unique_id": "doc.tamanu.assets__id", "block_contents": "Tamanu identifier for the asset."}, "doc.tamanu.assets__name": {"name": "assets__name", "resource_type": "doc", "package_name": "tamanu", "path": "assets.md", "original_file_path": "../../database/model/public/assets.md", "unique_id": "doc.tamanu.assets__name", "block_contents": "Name of the asset set by the user on upload."}, "doc.tamanu.assets__type": {"name": "assets__type", "resource_type": "doc", "package_name": "tamanu", "path": "assets.md", "original_file_path": "../../database/model/public/assets.md", "unique_id": "doc.tamanu.assets__type", "block_contents": "This is the type of asset stored."}, "doc.tamanu.assets__data": {"name": "assets__data", "resource_type": "doc", "package_name": "tamanu", "path": "assets.md", "original_file_path": "../../database/model/public/assets.md", "unique_id": "doc.tamanu.assets__data", "block_contents": "Contains a binary version of image data uploaded by user."}, "doc.tamanu.assets__facility_id": {"name": "assets__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "assets.md", "original_file_path": "../../database/model/public/assets.md", "unique_id": "doc.tamanu.assets__facility_id", "block_contents": "Reference to the [facilities](#!/source/source.tamanu.tamanu.facilities) this asset is associated with."}, "doc.tamanu.table__lab_test_panels": {"name": "table__lab_test_panels", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panels.md", "original_file_path": "../../database/model/public/lab_test_panels.md", "unique_id": "doc.tamanu.table__lab_test_panels", "block_contents": "A panel is a collection of lab test types, usually standardised.\n\nFor example the BMP (basic metabolic panel) is a panel of 8 blood tests. Instead of ordering all 8\ntests individually, a clinician can order the panel all at once. This may also used to more\nefficiently use samples.\n\nThis table defines the available test panels, and\n[`lab_test_panel_lab_test_types`](#!/source/source.tamanu.tamanu.lab_test_panel_lab_test_types)\ncontains the actual test types that are part of each panel. See\n[`lab_test_panel_requests`](#!/source/source.tamanu.tamanu.lab_test_panel_requests) for requesting\npanels specifically, and [`lab_test_requests`](#!/source/source.tamanu.tamanu.lab_test_requests) for\nrequesting lab tests in general."}, "doc.tamanu.lab_test_panels__name": {"name": "lab_test_panels__name", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panels.md", "original_file_path": "../../database/model/public/lab_test_panels.md", "unique_id": "doc.tamanu.lab_test_panels__name", "block_contents": "Name of the test panel."}, "doc.tamanu.lab_test_panels__code": {"name": "lab_test_panels__code", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panels.md", "original_file_path": "../../database/model/public/lab_test_panels.md", "unique_id": "doc.tamanu.lab_test_panels__code", "block_contents": "Internal Tamanu code of the panel."}, "doc.tamanu.lab_test_panels__external_code": {"name": "lab_test_panels__external_code", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panels.md", "original_file_path": "../../database/model/public/lab_test_panels.md", "unique_id": "doc.tamanu.lab_test_panels__external_code", "block_contents": "External code, such as for interfacing with LIMS."}, "doc.tamanu.lab_test_panels__category_id": {"name": "lab_test_panels__category_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panels.md", "original_file_path": "../../database/model/public/lab_test_panels.md", "unique_id": "doc.tamanu.lab_test_panels__category_id", "block_contents": "Reference to the category ([Reference Data](#!/source/source.tamanu.tamanu.reference_data)) of this test panel."}, "doc.tamanu.table__patient_conditions": {"name": "table__patient_conditions", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.table__patient_conditions", "block_contents": "List of ongoing conditions known about a patient.\n\nIn Tamanu this is displayed and entered in the patient view sidebar, under \"Ongoing conditions\".\n\nSee also: `public.patient_allergies`, `public.patient_care_plans`,\n`public.patient_family_histories`, `public.patient_issues`."}, "doc.tamanu.patient_conditions__note": {"name": "patient_conditions__note", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__note", "block_contents": "Free-form description of this condition."}, "doc.tamanu.patient_conditions__recorded_date": {"name": "patient_conditions__recorded_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__recorded_date", "block_contents": "Datetime at which this issue was recorded."}, "doc.tamanu.patient_conditions__resolved": {"name": "patient_conditions__resolved", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__resolved", "block_contents": "Whether the condition has resolved."}, "doc.tamanu.patient_conditions__patient_id": {"name": "patient_conditions__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_conditions__examiner_id": {"name": "patient_conditions__examiner_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__examiner_id", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) diagnosing/recording this\ncondition."}, "doc.tamanu.patient_conditions__condition_id": {"name": "patient_conditions__condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__condition_id", "block_contents": "Reference to a diagnosis describing this issue ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.patient_conditions__recorded_date_legacy": {"name": "patient_conditions__recorded_date_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__recorded_date_legacy", "block_contents": "[Deprecated] Timestamp at which this issue was recorded."}, "doc.tamanu.patient_conditions__resolution_date": {"name": "patient_conditions__resolution_date", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__resolution_date", "block_contents": "Datetime at which this issue was resolved."}, "doc.tamanu.patient_conditions__resolution_practitioner_id": {"name": "patient_conditions__resolution_practitioner_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__resolution_practitioner_id", "block_contents": "Reference to the [practitioner](#!/source/source.tamanu.tamanu.users) diagnosing/recording the\nresolution of this condition."}, "doc.tamanu.patient_conditions__resolution_note": {"name": "patient_conditions__resolution_note", "resource_type": "doc", "package_name": "tamanu", "path": "patient_conditions.md", "original_file_path": "../../database/model/public/patient_conditions.md", "unique_id": "doc.tamanu.patient_conditions__resolution_note", "block_contents": "Free-form description or notes about the resolution of this condition."}, "doc.tamanu.table__user_facilities": {"name": "table__user_facilities", "resource_type": "doc", "package_name": "tamanu", "path": "user_facilities.md", "original_file_path": "../../database/model/public/user_facilities.md", "unique_id": "doc.tamanu.table__user_facilities", "block_contents": "Association of users to facilities.\n\nThis can be used to assign users to certain facilities, for authorisation purposes or for staff convenience."}, "doc.tamanu.user_facilities__facility_id": {"name": "user_facilities__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_facilities.md", "original_file_path": "../../database/model/public/user_facilities.md", "unique_id": "doc.tamanu.user_facilities__facility_id", "block_contents": "The [facility](#!/source/source.tamanu.tamanu.facilities)."}, "doc.tamanu.user_facilities__user_id": {"name": "user_facilities__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_facilities.md", "original_file_path": "../../database/model/public/user_facilities.md", "unique_id": "doc.tamanu.user_facilities__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.table__procedure_survey_responses": {"name": "table__procedure_survey_responses", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_survey_responses.md", "original_file_path": "../../database/model/public/procedure_survey_responses.md", "unique_id": "doc.tamanu.table__procedure_survey_responses", "block_contents": "Junction table linking procedures to their associated survey responses."}, "doc.tamanu.procedure_survey_responses__procedure_id": {"name": "procedure_survey_responses__procedure_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_survey_responses.md", "original_file_path": "../../database/model/public/procedure_survey_responses.md", "unique_id": "doc.tamanu.procedure_survey_responses__procedure_id", "block_contents": "Reference to the [procedure](#!/source/source.tamanu.tamanu.procedures) this survey response is associated with."}, "doc.tamanu.procedure_survey_responses__survey_response_id": {"name": "procedure_survey_responses__survey_response_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_survey_responses.md", "original_file_path": "../../database/model/public/procedure_survey_responses.md", "unique_id": "doc.tamanu.procedure_survey_responses__survey_response_id", "block_contents": "Reference to the [survey response](#!/source/source.tamanu.tamanu.survey_responses) linked to the procedure."}, "doc.tamanu.table__invoice_item_discounts": {"name": "table__invoice_item_discounts", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_discounts.md", "original_file_path": "../../database/model/public/invoice_item_discounts.md", "unique_id": "doc.tamanu.table__invoice_item_discounts", "block_contents": "Discounts applied to invoice items."}, "doc.tamanu.invoice_item_discounts__invoice_item_id": {"name": "invoice_item_discounts__invoice_item_id", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_discounts.md", "original_file_path": "../../database/model/public/invoice_item_discounts.md", "unique_id": "doc.tamanu.invoice_item_discounts__invoice_item_id", "block_contents": "The [invoice item](#!/source/source.tamanu.tamanu.invoice_items)."}, "doc.tamanu.invoice_item_discounts__reason": {"name": "invoice_item_discounts__reason", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_discounts.md", "original_file_path": "../../database/model/public/invoice_item_discounts.md", "unique_id": "doc.tamanu.invoice_item_discounts__reason", "block_contents": "Free-form reason for the discount."}, "doc.tamanu.invoice_item_discounts__amount": {"name": "invoice_item_discounts__amount", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_discounts.md", "original_file_path": "../../database/model/public/invoice_item_discounts.md", "unique_id": "doc.tamanu.invoice_item_discounts__amount", "block_contents": "Discount amount of invoice items (can be percentage or a whole number)"}, "doc.tamanu.invoice_item_discounts__type": {"name": "invoice_item_discounts__type", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_item_discounts.md", "original_file_path": "../../database/model/public/invoice_item_discounts.md", "unique_id": "doc.tamanu.invoice_item_discounts__type", "block_contents": "Discount type of invoice items"}, "doc.tamanu.table__encounter_diets": {"name": "table__encounter_diets", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diets.md", "original_file_path": "../../database/model/public/encounter_diets.md", "unique_id": "doc.tamanu.table__encounter_diets", "block_contents": "A diet associated with an encounter.\n\nA patient can be placed on a diet for various medical purposes.\nDiets are specified in reference data."}, "doc.tamanu.encounter_diets__encounter_id": {"name": "encounter_diets__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diets.md", "original_file_path": "../../database/model/public/encounter_diets.md", "unique_id": "doc.tamanu.encounter_diets__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this diet is for."}, "doc.tamanu.encounter_diets__diet_id": {"name": "encounter_diets__diet_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diets.md", "original_file_path": "../../database/model/public/encounter_diets.md", "unique_id": "doc.tamanu.encounter_diets__diet_id", "block_contents": "The diet ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = diet`)."}, "doc.tamanu.table__socket_io_attachments": {"name": "table__socket_io_attachments", "resource_type": "doc", "package_name": "tamanu", "path": "socket_io_attachments.md", "original_file_path": "../../database/model/public/socket_io_attachments.md", "unique_id": "doc.tamanu.table__socket_io_attachments", "block_contents": "Table used by Socket.IO to synchronise WebSocket sessions across server replicas."}, "doc.tamanu.socket_io_attachments__payload": {"name": "socket_io_attachments__payload", "resource_type": "doc", "package_name": "tamanu", "path": "socket_io_attachments.md", "original_file_path": "../../database/model/public/socket_io_attachments.md", "unique_id": "doc.tamanu.socket_io_attachments__payload", "block_contents": "Payload."}, "doc.tamanu.table__patient_ongoing_prescriptions": {"name": "table__patient_ongoing_prescriptions", "resource_type": "doc", "package_name": "tamanu", "path": "patient_ongoing_prescriptions.md", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.md", "unique_id": "doc.tamanu.table__patient_ongoing_prescriptions", "block_contents": "Association of patient to prescription"}, "doc.tamanu.patient_ongoing_prescriptions__patient_id": {"name": "patient_ongoing_prescriptions__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_ongoing_prescriptions.md", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.md", "unique_id": "doc.tamanu.patient_ongoing_prescriptions__patient_id", "block_contents": "The [patient](#!/source/source.tamanu.tamanu.patients)"}, "doc.tamanu.patient_ongoing_prescriptions__prescription_id": {"name": "patient_ongoing_prescriptions__prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_ongoing_prescriptions.md", "original_file_path": "../../database/model/public/patient_ongoing_prescriptions.md", "unique_id": "doc.tamanu.patient_ongoing_prescriptions__prescription_id", "block_contents": "The [prescription](#!/source/source.tamanu.tamanu.prescriptions)"}, "doc.tamanu.table__location_assignment_templates": {"name": "table__location_assignment_templates", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.table__location_assignment_templates", "block_contents": "Templates for recurring location assignments that define when healthcare staff are scheduled to work at specific locations."}, "doc.tamanu.location_assignment_templates__user_id": {"name": "location_assignment_templates__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) assigned to this location."}, "doc.tamanu.location_assignment_templates__location_id": {"name": "location_assignment_templates__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__location_id", "block_contents": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) where the user is assigned."}, "doc.tamanu.location_assignment_templates__start_time": {"name": "location_assignment_templates__start_time", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__start_time", "block_contents": "Start time of the daily assignment period."}, "doc.tamanu.location_assignment_templates__end_time": {"name": "location_assignment_templates__end_time", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__end_time", "block_contents": "End time of the daily assignment period."}, "doc.tamanu.location_assignment_templates__repeat_end_date": {"name": "location_assignment_templates__repeat_end_date", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__repeat_end_date", "block_contents": "Date when the repeating assignments should stop being generated."}, "doc.tamanu.location_assignment_templates__repeat_frequency": {"name": "location_assignment_templates__repeat_frequency", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__repeat_frequency", "block_contents": "Number of frequency units between each assignment (e.g., every 2 weeks)."}, "doc.tamanu.location_assignment_templates__repeat_unit": {"name": "location_assignment_templates__repeat_unit", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignment_templates.md", "original_file_path": "../../database/model/public/location_assignment_templates.md", "unique_id": "doc.tamanu.location_assignment_templates__repeat_unit", "block_contents": "Frequency unit for repeating assignments.\n\nOne of:\n- `WEEKLY`\n- `MONTHLY`"}, "doc.tamanu.table__program_data_elements": {"name": "table__program_data_elements", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.table__program_data_elements", "block_contents": "Describes how a survey question gets stored.\n\nSee [survey screen components](#!/source/source.tamanu.tamanu.survey_screen_components), which\ndescribes how the question is displayed."}, "doc.tamanu.program_data_elements__code": {"name": "program_data_elements__code", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__code", "block_contents": "Machine-friendly short name for the question.\n\nThis is also used to refer to questions within criteria and such."}, "doc.tamanu.program_data_elements__name": {"name": "program_data_elements__name", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__name", "block_contents": "Human-friendly name"}, "doc.tamanu.program_data_elements__indicator": {"name": "program_data_elements__indicator", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__indicator", "block_contents": "Another name for the data element.\n\nIt's named `indicator` from mimicry of Tupaia."}, "doc.tamanu.program_data_elements__default_text": {"name": "program_data_elements__default_text", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__default_text", "block_contents": "Default value."}, "doc.tamanu.program_data_elements__default_options": {"name": "program_data_elements__default_options", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__default_options", "block_contents": "Default options if this is a dropdown."}, "doc.tamanu.program_data_elements__type": {"name": "program_data_elements__type", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__type", "block_contents": "Type of the field.\n\nTypes are here: <https://github.com/beyondessential/tamanu/blob/main/packages/constants/src/surveys.ts>"}, "doc.tamanu.program_data_elements__visualisation_config": {"name": "program_data_elements__visualisation_config", "resource_type": "doc", "package_name": "tamanu", "path": "program_data_elements.md", "original_file_path": "../../database/model/public/program_data_elements.md", "unique_id": "doc.tamanu.program_data_elements__visualisation_config", "block_contents": "JSON visualisation configuration."}, "doc.tamanu.table__vital_logs": {"name": "table__vital_logs", "resource_type": "doc", "package_name": "tamanu", "path": "vital_logs.md", "original_file_path": "../../database/model/public/vital_logs.md", "unique_id": "doc.tamanu.table__vital_logs", "block_contents": "Change logs for vitals survey responses."}, "doc.tamanu.vital_logs__previous_value": {"name": "vital_logs__previous_value", "resource_type": "doc", "package_name": "tamanu", "path": "vital_logs.md", "original_file_path": "../../database/model/public/vital_logs.md", "unique_id": "doc.tamanu.vital_logs__previous_value", "block_contents": "Previous value before the logged change in vitals survey response."}, "doc.tamanu.vital_logs__new_value": {"name": "vital_logs__new_value", "resource_type": "doc", "package_name": "tamanu", "path": "vital_logs.md", "original_file_path": "../../database/model/public/vital_logs.md", "unique_id": "doc.tamanu.vital_logs__new_value", "block_contents": "New value after the logged change in vitals survey response."}, "doc.tamanu.vital_logs__reason_for_change": {"name": "vital_logs__reason_for_change", "resource_type": "doc", "package_name": "tamanu", "path": "vital_logs.md", "original_file_path": "../../database/model/public/vital_logs.md", "unique_id": "doc.tamanu.vital_logs__reason_for_change", "block_contents": "Reason for the logged change in the vitals survey response."}, "doc.tamanu.vital_logs__recorded_by_id": {"name": "vital_logs__recorded_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "vital_logs.md", "original_file_path": "../../database/model/public/vital_logs.md", "unique_id": "doc.tamanu.vital_logs__recorded_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who made this change."}, "doc.tamanu.vital_logs__answer_id": {"name": "vital_logs__answer_id", "resource_type": "doc", "package_name": "tamanu", "path": "vital_logs.md", "original_file_path": "../../database/model/public/vital_logs.md", "unique_id": "doc.tamanu.vital_logs__answer_id", "block_contents": "The [survey answer](#!/source/source.tamanu.tamanu.survey_response_answers) being changed."}, "doc.tamanu.table__appointments": {"name": "table__appointments", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.table__appointments", "block_contents": "Table of appointments."}, "doc.tamanu.appointments__id": {"name": "appointments__id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__id", "block_contents": "Tamanu identifier for appointment."}, "doc.tamanu.appointments__start_datetime": {"name": "appointments__start_datetime", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__start_datetime", "block_contents": "Start date and time of the appointment."}, "doc.tamanu.appointments__end_datetime": {"name": "appointments__end_datetime", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__end_datetime", "block_contents": "End date and time of the appointment."}, "doc.tamanu.appointments__start_time": {"name": "appointments__start_time", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__start_time", "block_contents": "When the appointment starts."}, "doc.tamanu.appointments__end_time": {"name": "appointments__end_time", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__end_time", "block_contents": "When the appointment ends."}, "doc.tamanu.appointments__patient_id": {"name": "appointments__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.appointments__clinician_id": {"name": "appointments__clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__clinician_id", "block_contents": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) recording that appointment."}, "doc.tamanu.appointments__location_id": {"name": "appointments__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__location_id", "block_contents": "The [location](#!/source/source.tamanu.tamanu.locations) where the appointment will take place."}, "doc.tamanu.appointments__schedule_id": {"name": "appointments__schedule_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__schedule_id", "block_contents": "Reference to the [appointment schedule](#!/source/source.tamanu.tamanu.appointment_schedules) in the case of repeating appointments."}, "doc.tamanu.appointments__status": {"name": "appointments__status", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__status", "block_contents": "The current status of the appointment record.\n\nOne of:\n- `Confirmed`\n- `Arrived`\n- `No-show`\n- `Cancelled`"}, "doc.tamanu.appointments__type_legacy": {"name": "appointments__type_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__type_legacy", "block_contents": "The legacy type of appointment.\n\nOne of:\n- `Standard`\n- `Emergency`\n- `Specialist`\n- `Other`"}, "doc.tamanu.appointments__start_time_legacy": {"name": "appointments__start_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__start_time_legacy", "block_contents": "[Deprecated] Start time."}, "doc.tamanu.appointments__end_time_legacy": {"name": "appointments__end_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__end_time_legacy", "block_contents": "[Deprecated] End time."}, "doc.tamanu.appointments__location_group_id": {"name": "appointments__location_group_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__location_group_id", "block_contents": "The [location group](#!/source/source.tamanu.tamanu.location_groups) where the appointment will take place."}, "doc.tamanu.appointments__booking_type_id": {"name": "appointments__booking_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__booking_type_id", "block_contents": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=bookingType`)."}, "doc.tamanu.appointments__appointment_type_id": {"name": "appointments__appointment_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__appointment_type_id", "block_contents": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=appointmentType`)."}, "doc.tamanu.appointments__is_high_priority": {"name": "appointments__is_high_priority", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__is_high_priority", "block_contents": "Boolean specify if the appointment is high priority."}, "doc.tamanu.appointments__encounter_id": {"name": "appointments__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) linked to this appointment"}, "doc.tamanu.appointments__additional_clinician_id": {"name": "appointments__additional_clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__additional_clinician_id", "block_contents": "Reference to an additional [clinician](#!/source/source.tamanu.tamanu.users)"}, "doc.tamanu.appointments__link_encounter_id": {"name": "appointments__link_encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "appointments.md", "original_file_path": "../../database/model/public/appointments.md", "unique_id": "doc.tamanu.appointments__link_encounter_id", "block_contents": "Reference to the related [encounter](#!/source/source.tamanu.tamanu.encounters) of the appointment"}, "doc.tamanu.table__medication_administration_record_doses": {"name": "table__medication_administration_record_doses", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.table__medication_administration_record_doses", "block_contents": "Stores details about individual doses given as part of a medication administration record. A single administration event may involve multiple distinct doses (e.g., taking two tablets)."}, "doc.tamanu.medication_administration_record_doses__dose_amount": {"name": "medication_administration_record_doses__dose_amount", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__dose_amount", "block_contents": "The amount or quantity of the medication administered in this specific dose entry."}, "doc.tamanu.medication_administration_record_doses__given_time": {"name": "medication_administration_record_doses__given_time", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__given_time", "block_contents": "The precise date and time when this specific dose was administered to the patient. This may differ slightly from the overall `administered_at` time in the parent record if multiple doses were given sequentially."}, "doc.tamanu.medication_administration_record_doses__given_by_user_id": {"name": "medication_administration_record_doses__given_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__given_by_user_id", "block_contents": "Reference to the [user](#!/model/model.public.users) who physically administered this dose to the patient."}, "doc.tamanu.medication_administration_record_doses__mar_id": {"name": "medication_administration_record_doses__mar_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__mar_id", "block_contents": "Reference to the MAR [medication administration record](#!/model/model.public.medication_administration_records) to which this dose belongs."}, "doc.tamanu.medication_administration_record_doses__recorded_by_user_id": {"name": "medication_administration_record_doses__recorded_by_user_id", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__recorded_by_user_id", "block_contents": "Reference to the [user](#!/model/model.public.users) who recorded the details of this specific dose administration in the system. This may or may not be the same user who physically administered the dose (`given_by_user_id`)."}, "doc.tamanu.medication_administration_record_doses__is_removed": {"name": "medication_administration_record_doses__is_removed", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__is_removed", "block_contents": "Indicates whether this dose record has been removed or voided."}, "doc.tamanu.medication_administration_record_doses__reason_for_removal": {"name": "medication_administration_record_doses__reason_for_removal", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__reason_for_removal", "block_contents": "A text field explaining why this dose record was removed or voided."}, "doc.tamanu.medication_administration_record_doses__dose_index": {"name": "medication_administration_record_doses__dose_index", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__dose_index", "block_contents": "A sequential number indicating the order of this dose within a multi-dose administration. Helps track the sequence when multiple doses are given in a single administration event."}, "doc.tamanu.medication_administration_record_doses__reason_for_change": {"name": "medication_administration_record_doses__reason_for_change", "resource_type": "doc", "package_name": "tamanu", "path": "medication_administration_record_doses.md", "original_file_path": "../../database/model/public/medication_administration_record_doses.md", "unique_id": "doc.tamanu.medication_administration_record_doses__reason_for_change", "block_contents": "A text field documenting the reason for any modifications made to this dose record after it was initially recorded. This helps maintain an audit trail of changes and ensures proper documentation of why dose details were updated."}, "doc.tamanu.table__administered_vaccines": {"name": "table__administered_vaccines", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.table__administered_vaccines", "block_contents": "Table of vaccines administered to patients.\n\nVaccinations are recorded via the Vaccinations modal; they are selected\nfrom a list of Scheduled Vaccines and linked to a Patient via an Encounter."}, "doc.tamanu.administered_vaccines__id": {"name": "administered_vaccines__id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__id", "block_contents": "Tamanu identifier for vaccine administrations recorded"}, "doc.tamanu.administered_vaccines__batch": {"name": "administered_vaccines__batch", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__batch", "block_contents": "Batch identifier of vaccine administrations recorded"}, "doc.tamanu.administered_vaccines__status": {"name": "administered_vaccines__status", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__status", "block_contents": "Status of vaccine administrations recorded. \n\nThe `RECORDED_IN_ERROR` status is assigned to vaccines initially recorded\nas `GIVEN` that are then deleted.\n\nThe `HISTORICAL` status is assigned to vaccines initially recorded as \n`NOT_GIVEN` that are then recorded as `GIVEN`. This `HISTORICAL` status \nkeeps a record that the vaccine was marked as `NOT_GIVEN` but hides this\nrecord from the frontend to avoid confusion or conflict with the `GIVEN`\nrecord."}, "doc.tamanu.administered_vaccines__reason": {"name": "administered_vaccines__reason", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__reason", "block_contents": "Reason for vaccine administrations `NOT_GIVEN` status. This is a free text field"}, "doc.tamanu.administered_vaccines__injection_site": {"name": "administered_vaccines__injection_site", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__injection_site", "block_contents": "Injection site of the vaccine administrations recorded"}, "doc.tamanu.administered_vaccines__consent": {"name": "administered_vaccines__consent", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__consent", "block_contents": "Consent of the vaccine administrations recorded"}, "doc.tamanu.administered_vaccines__given_elsewhere": {"name": "administered_vaccines__given_elsewhere", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__given_elsewhere", "block_contents": "Checks if the vaccine was given elsewhere"}, "doc.tamanu.administered_vaccines__vaccine_name": {"name": "administered_vaccines__vaccine_name", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__vaccine_name", "block_contents": "Vaccine name of the vaccine administration recorded"}, "doc.tamanu.administered_vaccines__scheduled_vaccine_id": {"name": "administered_vaccines__scheduled_vaccine_id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__scheduled_vaccine_id", "block_contents": "Reference to the [Scheduled Vaccine](#!/source/source.tamanu.tamanu.scheduled_vaccines) that was\nadministered."}, "doc.tamanu.administered_vaccines__encounter_id": {"name": "administered_vaccines__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__encounter_id", "block_contents": "Reference to the [Encounter](#!/source/source.tamanu.tamanu.encounters) this vaccine was given in."}, "doc.tamanu.administered_vaccines__vaccine_brand": {"name": "administered_vaccines__vaccine_brand", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__vaccine_brand", "block_contents": "Vaccine brand of the vaccine administration recorded"}, "doc.tamanu.administered_vaccines__disease": {"name": "administered_vaccines__disease", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__disease", "block_contents": "Disease the vaccine addresses of the vaccine administration recorded"}, "doc.tamanu.administered_vaccines__recorder_id": {"name": "administered_vaccines__recorder_id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__recorder_id", "block_contents": "Reference to the [User](#!/source/source.tamanu.tamanu.users) who recorded this vaccination.\nThis may differ from the User or person who administered the vaccine."}, "doc.tamanu.administered_vaccines__location_id": {"name": "administered_vaccines__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__location_id", "block_contents": "Reference to the [Location](#!/source/source.tamanu.tamanu.locations) at which the vaccine was\ngiven."}, "doc.tamanu.administered_vaccines__department_id": {"name": "administered_vaccines__department_id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__department_id", "block_contents": "Reference to the [Department](#!/source/source.tamanu.tamanu.departments) at which the vaccine was\ngiven."}, "doc.tamanu.administered_vaccines__given_by": {"name": "administered_vaccines__given_by", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__given_by", "block_contents": "Free text field for the name of the health practitioner who administered the\nvaccine. This is defaulted to the `display_name` of the logged-in User, but can\nbe changed. It is not a requirement that the administerer is a Tamanu User."}, "doc.tamanu.administered_vaccines__consent_given_by": {"name": "administered_vaccines__consent_given_by", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__consent_given_by", "block_contents": "Free text field recording who gave consent for the vaccination.\nThis is usually the patient themselves, but may differ for children or dependent\npersons or other cases."}, "doc.tamanu.administered_vaccines__not_given_reason_id": {"name": "administered_vaccines__not_given_reason_id", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__not_given_reason_id", "block_contents": "Reference to a [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=vaccineNotGivenReason`).\n\nThese are presented as a dropdown for ease of recording and reporting, alongside the free-text field."}, "doc.tamanu.administered_vaccines__circumstance_ids": {"name": "administered_vaccines__circumstance_ids", "resource_type": "doc", "package_name": "tamanu", "path": "administered_vaccines.md", "original_file_path": "../../database/model/public/administered_vaccines.md", "unique_id": "doc.tamanu.administered_vaccines__circumstance_ids", "block_contents": "Array of references to [Reference Data](#!/source/source.tamanu.tamanu.reference_data)\n(`type=vaccineCircumstance`)."}, "doc.tamanu.table__lab_test_panel_requests": {"name": "table__lab_test_panel_requests", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_requests.md", "original_file_path": "../../database/model/public/lab_test_panel_requests.md", "unique_id": "doc.tamanu.table__lab_test_panel_requests", "block_contents": "A request for a lab test panel.\n\nSee [`lab_test_panels`](#!/source/source.tamanu.tamanu.lab_test_panels) for more about those."}, "doc.tamanu.lab_test_panel_requests__lab_test_panel_id": {"name": "lab_test_panel_requests__lab_test_panel_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_requests.md", "original_file_path": "../../database/model/public/lab_test_panel_requests.md", "unique_id": "doc.tamanu.lab_test_panel_requests__lab_test_panel_id", "block_contents": "The [test panel](#!/source/source.tamanu.tamanu.lab_test_panels)."}, "doc.tamanu.lab_test_panel_requests__encounter_id": {"name": "lab_test_panel_requests__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_test_panel_requests.md", "original_file_path": "../../database/model/public/lab_test_panel_requests.md", "unique_id": "doc.tamanu.lab_test_panel_requests__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this lab test panel request is a part of."}, "doc.tamanu.table__sync_sessions": {"name": "table__sync_sessions", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.table__sync_sessions", "block_contents": "Records of each user that can login to the site"}, "doc.tamanu.sync_sessions__id": {"name": "sync_sessions__id", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__id", "block_contents": "Tamanu identifier for the sync session"}, "doc.tamanu.sync_sessions__start_time": {"name": "sync_sessions__start_time", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__start_time", "block_contents": "Timestamp when sync session started"}, "doc.tamanu.sync_sessions__last_connection_time": {"name": "sync_sessions__last_connection_time", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__last_connection_time", "block_contents": "Timestamp when sync session made last connection"}, "doc.tamanu.sync_sessions__snapshot_completed_at": {"name": "sync_sessions__snapshot_completed_at", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__snapshot_completed_at", "block_contents": "Timestamp when sync session snapshot was completed"}, "doc.tamanu.sync_sessions__debug_info": {"name": "sync_sessions__debug_info", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__debug_info", "block_contents": "Debug information for the sync session"}, "doc.tamanu.sync_sessions__parameters": {"name": "sync_sessions__parameters", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__parameters", "block_contents": "Parameters for the sync session"}, "doc.tamanu.sync_sessions__completed_at": {"name": "sync_sessions__completed_at", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__completed_at", "block_contents": "Timestamp when sync session was completed"}, "doc.tamanu.sync_sessions__persist_completed_at": {"name": "sync_sessions__persist_completed_at", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__persist_completed_at", "block_contents": "Timestamp when sync session completion record is persisted"}, "doc.tamanu.sync_sessions__pull_since": {"name": "sync_sessions__pull_since", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__pull_since", "block_contents": "Sync tick that the sync session pulled since"}, "doc.tamanu.sync_sessions__pull_until": {"name": "sync_sessions__pull_until", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__pull_until", "block_contents": "Sync tick that the sync session pulled until"}, "doc.tamanu.sync_sessions__started_at_tick": {"name": "sync_sessions__started_at_tick", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__started_at_tick", "block_contents": "Sync tick that the sync session started at"}, "doc.tamanu.sync_sessions__snapshot_started_at": {"name": "sync_sessions__snapshot_started_at", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__snapshot_started_at", "block_contents": "Timestamp the sync session snapshot started at"}, "doc.tamanu.sync_sessions__errors": {"name": "sync_sessions__errors", "resource_type": "doc", "package_name": "tamanu", "path": "sync_sessions.md", "original_file_path": "../../database/model/public/sync_sessions.md", "unique_id": "doc.tamanu.sync_sessions__errors", "block_contents": "If a sync fails, the error(s)."}, "doc.tamanu.table__contributing_death_causes": {"name": "table__contributing_death_causes", "resource_type": "doc", "package_name": "tamanu", "path": "contributing_death_causes.md", "original_file_path": "../../database/model/public/contributing_death_causes.md", "unique_id": "doc.tamanu.table__contributing_death_causes", "block_contents": "Contributing causes recorded with the patient's death data."}, "doc.tamanu.contributing_death_causes__time_after_onset": {"name": "contributing_death_causes__time_after_onset", "resource_type": "doc", "package_name": "tamanu", "path": "contributing_death_causes.md", "original_file_path": "../../database/model/public/contributing_death_causes.md", "unique_id": "doc.tamanu.contributing_death_causes__time_after_onset", "block_contents": "Time between onset of recorded cause and death in minutes."}, "doc.tamanu.contributing_death_causes__patient_death_data_id": {"name": "contributing_death_causes__patient_death_data_id", "resource_type": "doc", "package_name": "tamanu", "path": "contributing_death_causes.md", "original_file_path": "../../database/model/public/contributing_death_causes.md", "unique_id": "doc.tamanu.contributing_death_causes__patient_death_data_id", "block_contents": "The [`patient_death_data`](#!/source/source.tamanu.tamanu.patient_death_data) record."}, "doc.tamanu.contributing_death_causes__condition_id": {"name": "contributing_death_causes__condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "contributing_death_causes.md", "original_file_path": "../../database/model/public/contributing_death_causes.md", "unique_id": "doc.tamanu.contributing_death_causes__condition_id", "block_contents": "Reference to the condition ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = diagnosis`)."}, "doc.tamanu.table__encounter_prescriptions": {"name": "table__encounter_prescriptions", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_prescriptions.md", "original_file_path": "../../database/model/public/encounter_prescriptions.md", "unique_id": "doc.tamanu.table__encounter_prescriptions", "block_contents": "Association of encounter to prescription"}, "doc.tamanu.encounter_prescriptions__encounter_id": {"name": "encounter_prescriptions__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_prescriptions.md", "original_file_path": "../../database/model/public/encounter_prescriptions.md", "unique_id": "doc.tamanu.encounter_prescriptions__encounter_id", "block_contents": "The [encounter](#!/source/source.tamanu.tamanu.encounters)"}, "doc.tamanu.encounter_prescriptions__prescription_id": {"name": "encounter_prescriptions__prescription_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_prescriptions.md", "original_file_path": "../../database/model/public/encounter_prescriptions.md", "unique_id": "doc.tamanu.encounter_prescriptions__prescription_id", "block_contents": "The [prescription](#!/source/source.tamanu.tamanu.prescriptions)"}, "doc.tamanu.encounter_prescriptions__is_selected_for_discharge": {"name": "encounter_prescriptions__is_selected_for_discharge", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_prescriptions.md", "original_file_path": "../../database/model/public/encounter_prescriptions.md", "unique_id": "doc.tamanu.encounter_prescriptions__is_selected_for_discharge", "block_contents": "Whether the prescription is for when the patient is discharged."}, "doc.tamanu.table__survey_screen_components": {"name": "table__survey_screen_components", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.table__survey_screen_components", "block_contents": "Describes how a survey question gets displayed.\n\nSee [program data element](#!/source/source.tamanu.tamanu.program_data_elements), which describes\nhow the data from the question is stored."}, "doc.tamanu.survey_screen_components__screen_index": {"name": "survey_screen_components__screen_index", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__screen_index", "block_contents": "Screen this component should appear on.\n\nSurveys can have multiple \"screens\" or pages, this index sets where this particular question sits."}, "doc.tamanu.survey_screen_components__component_index": {"name": "survey_screen_components__component_index", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__component_index", "block_contents": "The absolute index (order) of the component in the survey."}, "doc.tamanu.survey_screen_components__text": {"name": "survey_screen_components__text", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__text", "block_contents": "Description or question of this component."}, "doc.tamanu.survey_screen_components__validation_criteria": {"name": "survey_screen_components__validation_criteria", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__validation_criteria", "block_contents": "JSON criteria that determines whether the value entered in this component is accepted."}, "doc.tamanu.survey_screen_components__detail": {"name": "survey_screen_components__detail", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__detail", "block_contents": "Longer description or explanatory text of this component."}, "doc.tamanu.survey_screen_components__config": {"name": "survey_screen_components__config", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__config", "block_contents": "JSON additional config of the component."}, "doc.tamanu.survey_screen_components__options": {"name": "survey_screen_components__options", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__options", "block_contents": "JSON array of strings of options to be selected."}, "doc.tamanu.survey_screen_components__visibility_criteria": {"name": "survey_screen_components__visibility_criteria", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__visibility_criteria", "block_contents": "JSON criteria that determines when this component is visible.\n\nA criteria is a list of other components' codes and the value that will make this question show up:\n\n```json\n{\n  \"otherQuestion\": \"Yes\"\n}\n```\n\nThere can also be the special criterium `{\"hidden\": true}` which always hides the question, and the\nspecial key `\"_conjunction\": \"or\"` which makes it so _any one_ item in the list is sufficient to\nshow the question, instead of the default where _all_ items must match."}, "doc.tamanu.survey_screen_components__calculation": {"name": "survey_screen_components__calculation", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__calculation", "block_contents": "Math expression to do calculations on the entered value before it's saved.\n\nFor example `questionCode + 3`."}, "doc.tamanu.survey_screen_components__survey_id": {"name": "survey_screen_components__survey_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__survey_id", "block_contents": "The [survey](#!/source/source.tamanu.tamanu.surveys)."}, "doc.tamanu.survey_screen_components__data_element_id": {"name": "survey_screen_components__data_element_id", "resource_type": "doc", "package_name": "tamanu", "path": "survey_screen_components.md", "original_file_path": "../../database/model/public/survey_screen_components.md", "unique_id": "doc.tamanu.survey_screen_components__data_element_id", "block_contents": "Reference to the [data element](#!/source/source.tamanu.tamanu.program_data_elements) configuring\nhow the data from the question is stored."}, "doc.tamanu.table__imaging_request_areas": {"name": "table__imaging_request_areas", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_request_areas.md", "original_file_path": "../../database/model/public/imaging_request_areas.md", "unique_id": "doc.tamanu.table__imaging_request_areas", "block_contents": "Areas to be imaged as part of an [imaging request](#!/source/source.tamanu.tamanu.imaging_requests)."}, "doc.tamanu.imaging_request_areas__imaging_request_id": {"name": "imaging_request_areas__imaging_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_request_areas.md", "original_file_path": "../../database/model/public/imaging_request_areas.md", "unique_id": "doc.tamanu.imaging_request_areas__imaging_request_id", "block_contents": "The [imaging request](#!/source/source.tamanu.tamanu.imaging_requests)."}, "doc.tamanu.imaging_request_areas__area_id": {"name": "imaging_request_areas__area_id", "resource_type": "doc", "package_name": "tamanu", "path": "imaging_request_areas.md", "original_file_path": "../../database/model/public/imaging_request_areas.md", "unique_id": "doc.tamanu.imaging_request_areas__area_id", "block_contents": "The imaging area ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.table__reference_data": {"name": "table__reference_data", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data.md", "original_file_path": "../../database/model/public/reference_data.md", "unique_id": "doc.tamanu.table__reference_data", "block_contents": "User imported reference data for the environment grouped by type.\n\n- Catch-all for simple reference data types - there are a LOT of kinds of reference data that exist as just an ID, a \nstring label, and occasionally a code; these are all grouped into this table to avoid overcomplicating the schema.\n- Occasionally a type of simple reference data will gain some complexity, at which point it will be refactored/migrated \nout to use its own table.\n- Simple reference data types include a code, type, name and visibility status.\n- Example types include `diagnosis`, `procedures`"}, "doc.tamanu.reference_data__code": {"name": "reference_data__code", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data.md", "original_file_path": "../../database/model/public/reference_data.md", "unique_id": "doc.tamanu.reference_data__code", "block_contents": "Code of the data item (short value, alphanumerics and hyphens)."}, "doc.tamanu.reference_data__type": {"name": "reference_data__type", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data.md", "original_file_path": "../../database/model/public/reference_data.md", "unique_id": "doc.tamanu.reference_data__type", "block_contents": "Class of the data (referred to in code).\n\nWhenever this table is referred to in a relationship, it's to a specific `type` here. For example a\ntable might have a `diagnosis_id`, which is a reference to this table, for specifically only the\nrows with `type = diagnosis`."}, "doc.tamanu.reference_data__name": {"name": "reference_data__name", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data.md", "original_file_path": "../../database/model/public/reference_data.md", "unique_id": "doc.tamanu.reference_data__name", "block_contents": "Actual data"}, "doc.tamanu.reference_data__system_required": {"name": "reference_data__system_required", "resource_type": "doc", "package_name": "tamanu", "path": "reference_data.md", "original_file_path": "../../database/model/public/reference_data.md", "unique_id": "doc.tamanu.reference_data__system_required", "block_contents": "Indicates if this record is system-managed and cannot be modified by users"}, "doc.tamanu.table__facilities": {"name": "table__facilities", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.table__facilities", "block_contents": "Table of facilities.\n\nFacilities may be either or both of:\n\n- Any healthcare facility, like hospitals, clinics, mobile vaccination vans, laboratories, etc\n- A Tamanu Facility deployment.\n\nWhen syncing, patient and related records are scoped to a facility, according to the\n[`patient_facilities`](#!/source/source.tamanu.tamanu.patient_facilities) table."}, "doc.tamanu.facilities__code": {"name": "facilities__code", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__code", "block_contents": "Code (identifier) for the facility."}, "doc.tamanu.facilities__name": {"name": "facilities__name", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__name", "block_contents": "Full readable name."}, "doc.tamanu.facilities__division": {"name": "facilities__division", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__division", "block_contents": "Administrative division this facility lives in."}, "doc.tamanu.facilities__type": {"name": "facilities__type", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__type", "block_contents": "Type of the facility."}, "doc.tamanu.facilities__email": {"name": "facilities__email", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__email", "block_contents": "Administrative email address of the facility."}, "doc.tamanu.facilities__contact_number": {"name": "facilities__contact_number", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__contact_number", "block_contents": "Administrative contact number of the facility."}, "doc.tamanu.facilities__city_town": {"name": "facilities__city_town", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__city_town", "block_contents": "City or town of the facility."}, "doc.tamanu.facilities__street_address": {"name": "facilities__street_address", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__street_address", "block_contents": "Street address of the facility."}, "doc.tamanu.facilities__catchment_id": {"name": "facilities__catchment_id", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__catchment_id", "block_contents": "Catchment area ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.facilities__is_sensitive": {"name": "facilities__is_sensitive", "resource_type": "doc", "package_name": "tamanu", "path": "facilities.md", "original_file_path": "../../database/model/public/facilities.md", "unique_id": "doc.tamanu.facilities__is_sensitive", "block_contents": "If set to `true`, encounters created on this facility will only be viewable when logged into this facility"}, "doc.tamanu.table__procedure_assistant_clinicians": {"name": "table__procedure_assistant_clinicians", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_assistant_clinicians.md", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.md", "unique_id": "doc.tamanu.table__procedure_assistant_clinicians", "block_contents": "Junction table that links procedures to their assistant clinicians. Records which users served as assistant clinicians for specific procedures."}, "doc.tamanu.procedure_assistant_clinicians__procedure_id": {"name": "procedure_assistant_clinicians__procedure_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_assistant_clinicians.md", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.md", "unique_id": "doc.tamanu.procedure_assistant_clinicians__procedure_id", "block_contents": "Reference to the [procedure](#!/source/source.tamanu.tamanu.procedures) this assistant clinician is associated with."}, "doc.tamanu.procedure_assistant_clinicians__user_id": {"name": "procedure_assistant_clinicians__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedure_assistant_clinicians.md", "original_file_path": "../../database/model/public/procedure_assistant_clinicians.md", "unique_id": "doc.tamanu.procedure_assistant_clinicians__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who served as an assistant clinician for the procedure."}, "doc.tamanu.table__note_pages": {"name": "table__note_pages", "resource_type": "doc", "package_name": "tamanu", "path": "note_pages.md", "original_file_path": "../../database/model/public/note_pages.md", "unique_id": "doc.tamanu.table__note_pages", "block_contents": "Version 2 of note management.\n\nIn this version, notes were split between note pages and actual note (item) content.\n\nDeprecated.\n\nSee also [`note_items`](#!/source/source.tamanu.tamanu.note_items)."}, "doc.tamanu.note_pages__note_type": {"name": "note_pages__note_type", "resource_type": "doc", "package_name": "tamanu", "path": "note_pages.md", "original_file_path": "../../database/model/public/note_pages.md", "unique_id": "doc.tamanu.note_pages__note_type", "block_contents": "Type of the note page."}, "doc.tamanu.note_pages__record_id": {"name": "note_pages__record_id", "resource_type": "doc", "package_name": "tamanu", "path": "note_pages.md", "original_file_path": "../../database/model/public/note_pages.md", "unique_id": "doc.tamanu.note_pages__record_id", "block_contents": "Polymorphic relationship to the record to which the note is attached (id)."}, "doc.tamanu.note_pages__record_type": {"name": "note_pages__record_type", "resource_type": "doc", "package_name": "tamanu", "path": "note_pages.md", "original_file_path": "../../database/model/public/note_pages.md", "unique_id": "doc.tamanu.note_pages__record_type", "block_contents": "Polymorphic relationship to the record to which the note is attached (type)."}, "doc.tamanu.table__reference_drug_facilities": {"name": "table__reference_drug_facilities", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drug_facilities.md", "original_file_path": "../../database/model/public/reference_drug_facilities.md", "unique_id": "doc.tamanu.table__reference_drug_facilities", "block_contents": "Tracks the availability status of drugs at specific facilities.\n\n- Links reference drugs to facilities with their availability status\n- Allows facilities to manage which drugs are available, unavailable, or have limited stock\n- Used for medication dispensing workflows to determine drug availability at a facility"}, "doc.tamanu.reference_drug_facilities__reference_drug_id": {"name": "reference_drug_facilities__reference_drug_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drug_facilities.md", "original_file_path": "../../database/model/public/reference_drug_facilities.md", "unique_id": "doc.tamanu.reference_drug_facilities__reference_drug_id", "block_contents": "Foreign key reference to the associated drug in the reference_drugs table"}, "doc.tamanu.reference_drug_facilities__facility_id": {"name": "reference_drug_facilities__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drug_facilities.md", "original_file_path": "../../database/model/public/reference_drug_facilities.md", "unique_id": "doc.tamanu.reference_drug_facilities__facility_id", "block_contents": "Foreign key reference to the facility where this drug availability applies"}, "doc.tamanu.reference_drug_facilities__quantity": {"name": "reference_drug_facilities__quantity", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drug_facilities.md", "original_file_path": "../../database/model/public/reference_drug_facilities.md", "unique_id": "doc.tamanu.reference_drug_facilities__quantity", "block_contents": "The numeric quantity of the drug available at this facility. Stored as an INTEGER:\n- Positive integer: Number of units available (e.g., 10, 50, 100)\n- 0: Drug is out of stock\n- NULL: Quantity is not tracked or unknown (used when stock_status is 'unknown' or 'unavailable')"}, "doc.tamanu.reference_drug_facilities__stock_status": {"name": "reference_drug_facilities__stock_status", "resource_type": "doc", "package_name": "tamanu", "path": "reference_drug_facilities.md", "original_file_path": "../../database/model/public/reference_drug_facilities.md", "unique_id": "doc.tamanu.reference_drug_facilities__stock_status", "block_contents": "Indicates the stock availability status of the drug at this facility. Stored as a STRING with the following valid values:\n- 'in_stock': Drug is available (quantity > 0)\n- 'out_of_stock': Drug is not available but tracked (quantity = 0)\n- 'unavailable': Drug is not available at this facility (quantity IS NULL)\n- 'unknown': Stock status is unknown or not tracked (quantity IS NULL)\n\nThis column is stored separately from quantity and is enforced by database constraints to maintain consistency:\n- 'in_stock' requires quantity > 0\n- 'out_of_stock' requires quantity = 0\n- 'unknown' or 'unavailable' require quantity IS NULL"}, "doc.tamanu.table__lab_request_logs": {"name": "table__lab_request_logs", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_logs.md", "original_file_path": "../../database/model/public/lab_request_logs.md", "unique_id": "doc.tamanu.table__lab_request_logs", "block_contents": "This is a log of who changed the status of a lab request when."}, "doc.tamanu.lab_request_logs__status": {"name": "lab_request_logs__status", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_logs.md", "original_file_path": "../../database/model/public/lab_request_logs.md", "unique_id": "doc.tamanu.lab_request_logs__status", "block_contents": "The status the lab request was updated to."}, "doc.tamanu.lab_request_logs__lab_request_id": {"name": "lab_request_logs__lab_request_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_logs.md", "original_file_path": "../../database/model/public/lab_request_logs.md", "unique_id": "doc.tamanu.lab_request_logs__lab_request_id", "block_contents": "Reference to the [lab request](#!/source/source.tamanu.tamanu.lab_requests)."}, "doc.tamanu.lab_request_logs__updated_by_id": {"name": "lab_request_logs__updated_by_id", "resource_type": "doc", "package_name": "tamanu", "path": "lab_request_logs.md", "original_file_path": "../../database/model/public/lab_request_logs.md", "unique_id": "doc.tamanu.lab_request_logs__updated_by_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who updated this lab request."}, "doc.tamanu.table__portal_users": {"name": "table__portal_users", "resource_type": "doc", "package_name": "tamanu", "path": "portal_users.md", "original_file_path": "../../database/model/public/portal_users.md", "unique_id": "doc.tamanu.table__portal_users", "block_contents": "This table manages user accounts for patients who can access the patient portal. It establishes the relationship between patients and their portal login credentials, tracking their registration status and access permissions. Each record represents a patient's portal account with authentication and role information."}, "doc.tamanu.portal_users__patient_id": {"name": "portal_users__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "portal_users.md", "original_file_path": "../../database/model/public/portal_users.md", "unique_id": "doc.tamanu.portal_users__patient_id", "block_contents": "Foreign key reference to the patients table. Links the portal user account to a specific patient record in the system. This field is required and establishes the one-to-one relationship between a patient and their portal access."}, "doc.tamanu.portal_users__email": {"name": "portal_users__email", "resource_type": "doc", "package_name": "tamanu", "path": "portal_users.md", "original_file_path": "../../database/model/public/portal_users.md", "unique_id": "doc.tamanu.portal_users__email", "block_contents": "Unique email address used for patient portal authentication and communication. This serves as the primary identifier for login purposes and must be unique across all patient portal accounts. The field is optional to allow for patients who may not have email addresses, or who have not yet completed the\nregistration flow."}, "doc.tamanu.portal_users__status": {"name": "portal_users__status", "resource_type": "doc", "package_name": "tamanu", "path": "portal_users.md", "original_file_path": "../../database/model/public/portal_users.md", "unique_id": "doc.tamanu.portal_users__status", "block_contents": "Current registration status of the patient portal account. Possible values are 'pending' (default, when account is first created) and 'registered' (when patient has completed the registration process). This field tracks the progression of patient portal onboarding and account activation."}, "doc.tamanu.table__patient_program_registration_conditions": {"name": "table__patient_program_registration_conditions", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.table__patient_program_registration_conditions", "block_contents": "Table of conditions related to patients in a program registration."}, "doc.tamanu.patient_program_registration_conditions__program_registry_condition_id": {"name": "patient_program_registration_conditions__program_registry_condition_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__program_registry_condition_id", "block_contents": "Reference to the [Program Registry Condition](#!/source/source.tamanu.tamanu.program_registry_conditions)."}, "doc.tamanu.patient_program_registration_conditions__clinician_id": {"name": "patient_program_registration_conditions__clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__clinician_id", "block_contents": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) recording that condition."}, "doc.tamanu.patient_program_registration_conditions__deletion_clinician_id": {"name": "patient_program_registration_conditions__deletion_clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__deletion_clinician_id", "block_contents": "Reference to the [Clinician](#!/source/source.tamanu.tamanu.users) that removed the condition."}, "doc.tamanu.patient_program_registration_conditions__reason_for_change": {"name": "patient_program_registration_conditions__reason_for_change", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__reason_for_change", "block_contents": "Optional field for recording the reason for changing the condition."}, "doc.tamanu.patient_program_registration_conditions__condition": {"name": "patient_program_registration_conditions__condition", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__condition", "block_contents": ""}, "doc.tamanu.patient_program_registration_conditions__patient_program_registration_id": {"name": "patient_program_registration_conditions__patient_program_registration_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__patient_program_registration_id", "block_contents": "Reference to the [Patient Program Registry](#!/source/source.tamanu.tamanu.patient_program_registrations)\nof the condition."}, "doc.tamanu.patient_program_registration_conditions__program_registry_condition_category_id": {"name": "patient_program_registration_conditions__program_registry_condition_category_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_program_registration_conditions.md", "original_file_path": "../../database/model/public/patient_program_registration_conditions.md", "unique_id": "doc.tamanu.patient_program_registration_conditions__program_registry_condition_category_id", "block_contents": "Reference to the [Program Registry Condition Category](#!/source/source.tamanu.tamanu.program_registry_condition_categories)\nof the condition."}, "doc.tamanu.table__task_designations": {"name": "table__task_designations", "resource_type": "doc", "package_name": "tamanu", "path": "task_designations.md", "original_file_path": "../../database/model/public/task_designations.md", "unique_id": "doc.tamanu.table__task_designations", "block_contents": "Association of designation to task."}, "doc.tamanu.task_designations__task_id": {"name": "task_designations__task_id", "resource_type": "doc", "package_name": "tamanu", "path": "task_designations.md", "original_file_path": "../../database/model/public/task_designations.md", "unique_id": "doc.tamanu.task_designations__task_id", "block_contents": "The designation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.task_designations__designation_id": {"name": "task_designations__designation_id", "resource_type": "doc", "package_name": "tamanu", "path": "task_designations.md", "original_file_path": "../../database/model/public/task_designations.md", "unique_id": "doc.tamanu.task_designations__designation_id", "block_contents": "The task [task](#!/source/source.tamanu.tamanu.tasks)"}, "doc.tamanu.table__programs": {"name": "table__programs", "resource_type": "doc", "package_name": "tamanu", "path": "programs.md", "original_file_path": "../../database/model/public/programs.md", "unique_id": "doc.tamanu.table__programs", "block_contents": "Groups of [surveys](#!/source/source.tamanu.tamanu.surveys) or [program registries](#!/source/source.tamanu.tamanu.program_registries)."}, "doc.tamanu.programs__code": {"name": "programs__code", "resource_type": "doc", "package_name": "tamanu", "path": "programs.md", "original_file_path": "../../database/model/public/programs.md", "unique_id": "doc.tamanu.programs__code", "block_contents": "Machine-friendly code."}, "doc.tamanu.programs__name": {"name": "programs__name", "resource_type": "doc", "package_name": "tamanu", "path": "programs.md", "original_file_path": "../../database/model/public/programs.md", "unique_id": "doc.tamanu.programs__name", "block_contents": "Human-friendly name."}, "doc.tamanu.table__procedures": {"name": "table__procedures", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.table__procedures", "block_contents": "Record of each procedure in progress or completed."}, "doc.tamanu.procedures__completed": {"name": "procedures__completed", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__completed", "block_contents": "Whether the procedure has completed."}, "doc.tamanu.procedures__end_time": {"name": "procedures__end_time", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__end_time", "block_contents": "When the procedure ended, if it's completed."}, "doc.tamanu.procedures__note": {"name": "procedures__note", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__note", "block_contents": "Free-form description of the procedure."}, "doc.tamanu.procedures__completed_note": {"name": "procedures__completed_note", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__completed_note", "block_contents": "Free-form notes at completion of the procedure."}, "doc.tamanu.procedures__encounter_id": {"name": "procedures__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__encounter_id", "block_contents": "The [encounter](#!/source/source.tamanu.tamanu.encounters) this procedure is a part of."}, "doc.tamanu.procedures__location_id": {"name": "procedures__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__location_id", "block_contents": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) the procedure happens in."}, "doc.tamanu.procedures__procedure_type_id": {"name": "procedures__procedure_type_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__procedure_type_id", "block_contents": "Reference to the procedure type ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = procedureType`)."}, "doc.tamanu.procedures__anaesthetic_id": {"name": "procedures__anaesthetic_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__anaesthetic_id", "block_contents": "Reference to the anaesthetic ([Reference Data](#!/source/source.tamanu.tamanu.reference_data), `type = drug`)."}, "doc.tamanu.procedures__physician_id": {"name": "procedures__physician_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__physician_id", "block_contents": "Reference to the [physician](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.procedures__anaesthetist_id": {"name": "procedures__anaesthetist_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__anaesthetist_id", "block_contents": "Reference to the [anaesthetist](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.procedures__start_time": {"name": "procedures__start_time", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__start_time", "block_contents": "When the procedure started."}, "doc.tamanu.procedures__start_time_legacy": {"name": "procedures__start_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__start_time_legacy", "block_contents": "[Deprecated] When the procedure started."}, "doc.tamanu.procedures__end_time_legacy": {"name": "procedures__end_time_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__end_time_legacy", "block_contents": "[Deprecated] When the procedure ended."}, "doc.tamanu.procedures__department_id": {"name": "procedures__department_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__department_id", "block_contents": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) where the procedure is performed."}, "doc.tamanu.procedures__assistant_anaesthetist_id": {"name": "procedures__assistant_anaesthetist_id", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__assistant_anaesthetist_id", "block_contents": "Reference to the assistant [anaesthetist](#!/source/source.tamanu.tamanu.users)."}, "doc.tamanu.procedures__time_in": {"name": "procedures__time_in", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__time_in", "block_contents": "The time when the patient entered the procedure room or when the procedure setup began."}, "doc.tamanu.procedures__time_out": {"name": "procedures__time_out", "resource_type": "doc", "package_name": "tamanu", "path": "procedures.md", "original_file_path": "../../database/model/public/procedures.md", "unique_id": "doc.tamanu.procedures__time_out", "block_contents": "The time when the patient left the procedure room or when the procedure cleanup was completed."}, "doc.tamanu.table__location_groups": {"name": "table__location_groups", "resource_type": "doc", "package_name": "tamanu", "path": "location_groups.md", "original_file_path": "../../database/model/public/location_groups.md", "unique_id": "doc.tamanu.table__location_groups", "block_contents": "A group of locations managed as a single unit (e.g. a ward in hospital)"}, "doc.tamanu.location_groups__name": {"name": "location_groups__name", "resource_type": "doc", "package_name": "tamanu", "path": "location_groups.md", "original_file_path": "../../database/model/public/location_groups.md", "unique_id": "doc.tamanu.location_groups__name", "block_contents": "Full readable name for location group"}, "doc.tamanu.location_groups__code": {"name": "location_groups__code", "resource_type": "doc", "package_name": "tamanu", "path": "location_groups.md", "original_file_path": "../../database/model/public/location_groups.md", "unique_id": "doc.tamanu.location_groups__code", "block_contents": "Code for location group"}, "doc.tamanu.location_groups__facility_id": {"name": "location_groups__facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "location_groups.md", "original_file_path": "../../database/model/public/location_groups.md", "unique_id": "doc.tamanu.location_groups__facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) this location group is in."}, "doc.tamanu.location_groups__is_bookable": {"name": "location_groups__is_bookable", "resource_type": "doc", "package_name": "tamanu", "path": "location_groups.md", "original_file_path": "../../database/model/public/location_groups.md", "unique_id": "doc.tamanu.location_groups__is_bookable", "block_contents": "Controls whether and where this location group appears in the booking calendar:  \n- `all`: shown on both views  \n- `weekly`: shown only on weekly view\n- `daily`: shown only on daily view\n- `no`: hidden from calendar (default)"}, "doc.tamanu.table__encounter_diagnoses": {"name": "table__encounter_diagnoses", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diagnoses.md", "original_file_path": "../../database/model/public/encounter_diagnoses.md", "unique_id": "doc.tamanu.table__encounter_diagnoses", "block_contents": "Records diagnoses made during an encounter"}, "doc.tamanu.encounter_diagnoses__certainty": {"name": "encounter_diagnoses__certainty", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diagnoses.md", "original_file_path": "../../database/model/public/encounter_diagnoses.md", "unique_id": "doc.tamanu.encounter_diagnoses__certainty", "block_contents": "The level of certainty of the recorded diagnosis.\n\nOne of:\n- `confirmed`\n- `disproven`\n- `emergency`\n- `error`\n- `suspected`\n\n`disproven` and `error` are excluded for reporting"}, "doc.tamanu.encounter_diagnoses__is_primary": {"name": "encounter_diagnoses__is_primary", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diagnoses.md", "original_file_path": "../../database/model/public/encounter_diagnoses.md", "unique_id": "doc.tamanu.encounter_diagnoses__is_primary", "block_contents": "A boolean indicating if this is a primary diagnosis"}, "doc.tamanu.encounter_diagnoses__encounter_id": {"name": "encounter_diagnoses__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diagnoses.md", "original_file_path": "../../database/model/public/encounter_diagnoses.md", "unique_id": "doc.tamanu.encounter_diagnoses__encounter_id", "block_contents": "Reference to the [encounter](#!/source/source.tamanu.tamanu.encounters) this diagnosis is for."}, "doc.tamanu.encounter_diagnoses__diagnosis_id": {"name": "encounter_diagnoses__diagnosis_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diagnoses.md", "original_file_path": "../../database/model/public/encounter_diagnoses.md", "unique_id": "doc.tamanu.encounter_diagnoses__diagnosis_id", "block_contents": "The diagnosis ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.encounter_diagnoses__clinician_id": {"name": "encounter_diagnoses__clinician_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_diagnoses.md", "original_file_path": "../../database/model/public/encounter_diagnoses.md", "unique_id": "doc.tamanu.encounter_diagnoses__clinician_id", "block_contents": "Reference to the [clinician](#!/source/source.tamanu.tamanu.users) recording that diagnosis."}, "doc.tamanu.table__report_definition_versions": {"name": "table__report_definition_versions", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.table__report_definition_versions", "block_contents": "A report definition containing the actual executable SQL query.\n\nReport versions are immutable and changes to a report create a new version."}, "doc.tamanu.report_definition_versions__version_number": {"name": "report_definition_versions__version_number", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__version_number", "block_contents": "The version number.\n\nVersion numbers are incrementing integers i.e 1,2,3,4.\n\nThe active version is determined by the highest `status = 'published'` version number"}, "doc.tamanu.report_definition_versions__notes": {"name": "report_definition_versions__notes", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__notes", "block_contents": "Free-form description or usage notes."}, "doc.tamanu.report_definition_versions__status": {"name": "report_definition_versions__status", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__status", "block_contents": "Status of this version of the report.\n\nOne of:\n- `draft`\n- `published`"}, "doc.tamanu.report_definition_versions__query": {"name": "report_definition_versions__query", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__query", "block_contents": "The SQL query."}, "doc.tamanu.report_definition_versions__query_options": {"name": "report_definition_versions__query_options", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__query_options", "block_contents": "JSON config containing additional options for the query.\n\n- Form fields to allow customisation of the query when generating reports (query replacements)\n- Default date range e.g. last 30 days\n- Context for executing query e.g. this facility or all facilities (facility or central server)"}, "doc.tamanu.report_definition_versions__report_definition_id": {"name": "report_definition_versions__report_definition_id", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__report_definition_id", "block_contents": "The [report definition](#!/source/source.tamanu.tamanu.report_definitions)."}, "doc.tamanu.report_definition_versions__user_id": {"name": "report_definition_versions__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "report_definition_versions.md", "original_file_path": "../../database/model/public/report_definition_versions.md", "unique_id": "doc.tamanu.report_definition_versions__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) who saved this report version."}, "doc.tamanu.table__encounter_history": {"name": "table__encounter_history", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.table__encounter_history", "block_contents": "Records changes to an encounter's basic details."}, "doc.tamanu.encounter_history__encounter_id": {"name": "encounter_history__encounter_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__encounter_id", "block_contents": "Reference to the original [encounter](#!/source/source.tamanu.tamanu.encounters) this history is for."}, "doc.tamanu.encounter_history__department_id": {"name": "encounter_history__department_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__department_id", "block_contents": "Reference to the [department](#!/source/source.tamanu.tamanu.departments) the encounter was in."}, "doc.tamanu.encounter_history__location_id": {"name": "encounter_history__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__location_id", "block_contents": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) the encounter was in."}, "doc.tamanu.encounter_history__examiner_id": {"name": "encounter_history__examiner_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__examiner_id", "block_contents": "Reference to the [examiner](#!/source/source.tamanu.tamanu.users) for the encounter."}, "doc.tamanu.encounter_history__encounter_type": {"name": "encounter_history__encounter_type", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__encounter_type", "block_contents": "The type of the encounter.\n\nOne of:\n- `admission`\n- `clinic`\n- `imaging`\n- `emergency`\n- `observation`\n- `triage`\n- `surveyResponse`\n- `vaccination`"}, "doc.tamanu.encounter_history__actor_id": {"name": "encounter_history__actor_id", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__actor_id", "block_contents": "[Who](#!/source/source.tamanu.tamanu.users) made the change."}, "doc.tamanu.encounter_history__change_type": {"name": "encounter_history__change_type", "resource_type": "doc", "package_name": "tamanu", "path": "encounter_history.md", "original_file_path": "../../database/model/public/encounter_history.md", "unique_id": "doc.tamanu.encounter_history__change_type", "block_contents": "The field which was changed.\n\nOne of:\n- `encounter_type`\n- `location`\n- `department`\n- `examiner`"}, "doc.tamanu.table__location_assignments": {"name": "table__location_assignments", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignments.md", "original_file_path": "../../database/model/public/location_assignments.md", "unique_id": "doc.tamanu.table__location_assignments", "block_contents": "Individual location assignment records representing specific time periods when healthcare staff are scheduled to work at particular locations."}, "doc.tamanu.location_assignments__user_id": {"name": "location_assignments__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignments.md", "original_file_path": "../../database/model/public/location_assignments.md", "unique_id": "doc.tamanu.location_assignments__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) assigned to this location."}, "doc.tamanu.location_assignments__location_id": {"name": "location_assignments__location_id", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignments.md", "original_file_path": "../../database/model/public/location_assignments.md", "unique_id": "doc.tamanu.location_assignments__location_id", "block_contents": "Reference to the [location](#!/source/source.tamanu.tamanu.locations) where the user is assigned."}, "doc.tamanu.location_assignments__start_time": {"name": "location_assignments__start_time", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignments.md", "original_file_path": "../../database/model/public/location_assignments.md", "unique_id": "doc.tamanu.location_assignments__start_time", "block_contents": "Start time of the assignment period."}, "doc.tamanu.location_assignments__end_time": {"name": "location_assignments__end_time", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignments.md", "original_file_path": "../../database/model/public/location_assignments.md", "unique_id": "doc.tamanu.location_assignments__end_time", "block_contents": "End time of the assignment period."}, "doc.tamanu.location_assignments__template_id": {"name": "location_assignments__template_id", "resource_type": "doc", "package_name": "tamanu", "path": "location_assignments.md", "original_file_path": "../../database/model/public/location_assignments.md", "unique_id": "doc.tamanu.location_assignments__template_id", "block_contents": "Reference to the [location assignment template](#!/source/source.tamanu.tamanu.location_assignment_templates) that generated this assignment."}, "doc.tamanu.table__patient_birth_data": {"name": "table__patient_birth_data", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.table__patient_birth_data", "block_contents": "Information about the birth of the patient, if their birth was recorded into Tamanu.\n\nThis is specifically data about the newborn, and only the birth-relevant data.\nOther patient data is found in the normal tables i.e. `patients`, `patient_additional_data`, etc."}, "doc.tamanu.patient_birth_data__patient_id": {"name": "patient_birth_data__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients).\n\nThere is at most one `patient_birth_data` row per patient.\n\nNote that the `id` column is generated from this column to enforce this."}, "doc.tamanu.patient_birth_data__birth_weight": {"name": "patient_birth_data__birth_weight", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__birth_weight", "block_contents": "Weight in kg at birth."}, "doc.tamanu.patient_birth_data__birth_length": {"name": "patient_birth_data__birth_length", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__birth_length", "block_contents": "Length in cm at birth."}, "doc.tamanu.patient_birth_data__birth_delivery_type": {"name": "patient_birth_data__birth_delivery_type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__birth_delivery_type", "block_contents": "Type of delivery.\n\nOne of:\n- `normal_vaginal_delivery`\n- `breech`\n- `emergency_c_section`\n- `elective_c_section`\n- `vacuum_extraction`\n- `forceps`\n- `other`"}, "doc.tamanu.patient_birth_data__gestational_age_estimate": {"name": "patient_birth_data__gestational_age_estimate", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__gestational_age_estimate", "block_contents": "Gestational age estimate (weeks)."}, "doc.tamanu.patient_birth_data__apgar_score_one_minute": {"name": "patient_birth_data__apgar_score_one_minute", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__apgar_score_one_minute", "block_contents": "[Apgar score](https://en.wikipedia.org/wiki/Apgar_score) one minute after birth."}, "doc.tamanu.patient_birth_data__apgar_score_five_minutes": {"name": "patient_birth_data__apgar_score_five_minutes", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__apgar_score_five_minutes", "block_contents": "[Apgar score](https://en.wikipedia.org/wiki/Apgar_score) five minutes after birth."}, "doc.tamanu.patient_birth_data__apgar_score_ten_minutes": {"name": "patient_birth_data__apgar_score_ten_minutes", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__apgar_score_ten_minutes", "block_contents": "[Apgar score](https://en.wikipedia.org/wiki/Apgar_score) ten minutes after birth."}, "doc.tamanu.patient_birth_data__time_of_birth": {"name": "patient_birth_data__time_of_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__time_of_birth", "block_contents": "Datetime of birth."}, "doc.tamanu.patient_birth_data__birth_type": {"name": "patient_birth_data__birth_type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__birth_type", "block_contents": "`single` or `plural` birth."}, "doc.tamanu.patient_birth_data__attendant_at_birth": {"name": "patient_birth_data__attendant_at_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__attendant_at_birth", "block_contents": "The type of the attendant at birth.\n\nOne of:\n- `doctor`\n- `midwife`\n- `nurse`\n- `traditional_birth_attentdant`\n- `other`"}, "doc.tamanu.patient_birth_data__name_of_attendant_at_birth": {"name": "patient_birth_data__name_of_attendant_at_birth", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__name_of_attendant_at_birth", "block_contents": "Name of attendant at birth."}, "doc.tamanu.patient_birth_data__birth_facility_id": {"name": "patient_birth_data__birth_facility_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__birth_facility_id", "block_contents": "Reference to the [facility](#!/source/source.tamanu.tamanu.facilities) the birth was recorded at.\n\nThis is only required when `registered_birth_place` is `health_facility`."}, "doc.tamanu.patient_birth_data__registered_birth_place": {"name": "patient_birth_data__registered_birth_place", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__registered_birth_place", "block_contents": "Type of the actual birth place.\n\nOne of:\n- `health_facility`\n- `home`\n- `other`"}, "doc.tamanu.patient_birth_data__time_of_birth_legacy": {"name": "patient_birth_data__time_of_birth_legacy", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__time_of_birth_legacy", "block_contents": "[Deprecated] Time of birth."}, "doc.tamanu.patient_birth_data__birth_order": {"name": "patient_birth_data__birth_order", "resource_type": "doc", "package_name": "tamanu", "path": "patient_birth_data.md", "original_file_path": "../../database/model/public/patient_birth_data.md", "unique_id": "doc.tamanu.patient_birth_data__birth_order", "block_contents": "An integer that represents the birth order of the patient."}, "doc.tamanu.table__user_designations": {"name": "table__user_designations", "resource_type": "doc", "package_name": "tamanu", "path": "user_designations.md", "original_file_path": "../../database/model/public/user_designations.md", "unique_id": "doc.tamanu.table__user_designations", "block_contents": "Association of user to designation"}, "doc.tamanu.user_designations__user_id": {"name": "user_designations__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_designations.md", "original_file_path": "../../database/model/public/user_designations.md", "unique_id": "doc.tamanu.user_designations__user_id", "block_contents": "The [user](#!/source/source.tamanu.tamanu.users)"}, "doc.tamanu.user_designations__designation_id": {"name": "user_designations__designation_id", "resource_type": "doc", "package_name": "tamanu", "path": "user_designations.md", "original_file_path": "../../database/model/public/user_designations.md", "unique_id": "doc.tamanu.user_designations__designation_id", "block_contents": "The designation ([Reference Data](#!/source/source.tamanu.tamanu.reference_data))."}, "doc.tamanu.table__report_definitions": {"name": "table__report_definitions", "resource_type": "doc", "package_name": "tamanu", "path": "report_definitions.md", "original_file_path": "../../database/model/public/report_definitions.md", "unique_id": "doc.tamanu.table__report_definitions", "block_contents": "A name for a report.\n\nThis is what you see when selecting a report to generate in Tamanu.\n\nThe actual data is in [versions](#!/source/source.tamanu.tamanu.report_definition_versions)."}, "doc.tamanu.report_definitions__name": {"name": "report_definitions__name", "resource_type": "doc", "package_name": "tamanu", "path": "report_definitions.md", "original_file_path": "../../database/model/public/report_definitions.md", "unique_id": "doc.tamanu.report_definitions__name", "block_contents": "Human-friendly name of the report."}, "doc.tamanu.report_definitions__db_schema": {"name": "report_definitions__db_schema", "resource_type": "doc", "package_name": "tamanu", "path": "report_definitions.md", "original_file_path": "../../database/model/public/report_definitions.md", "unique_id": "doc.tamanu.report_definitions__db_schema", "block_contents": "The name of the database schema (namespace) which is queried.\n\nDefaults to `reporting`, which are standardised and normalised views designed specifically for\nreporting; sometimes this is set to `public` to query the raw database directly."}, "doc.tamanu.table__patient_contacts": {"name": "table__patient_contacts", "resource_type": "doc", "package_name": "tamanu", "path": "patient_contacts.md", "original_file_path": "../../database/model/public/patient_contacts.md", "unique_id": "doc.tamanu.table__patient_contacts", "block_contents": "Describes how a patient may be contacted, via email, SMS, or IM apps.\n\nAt present, this is used for:\n- display in the application (all methods)\n- emailing the patient (`method=Email`)\n- sending Telegram reminders for appointments (`method=Telegram`)"}, "doc.tamanu.patient_contacts__name": {"name": "patient_contacts__name", "resource_type": "doc", "package_name": "tamanu", "path": "patient_contacts.md", "original_file_path": "../../database/model/public/patient_contacts.md", "unique_id": "doc.tamanu.patient_contacts__name", "block_contents": "Free-form name of the contact method.\n\nThis could be the name of the patient, or a relationship if the contact method is via another person\n(e.g. `Spouse`, `Parent`, `Caregiver`), or a logical keyword if multiple contacts of the same method\nare provided (e.g. `Main`, `Primary`, `Work`, `Home`), etc."}, "doc.tamanu.patient_contacts__method": {"name": "patient_contacts__method", "resource_type": "doc", "package_name": "tamanu", "path": "patient_contacts.md", "original_file_path": "../../database/model/public/patient_contacts.md", "unique_id": "doc.tamanu.patient_contacts__method", "block_contents": "What application the contact uses:\n- `Email`\n- `Sms`\n- `WhatsApp`\n- `Telegram`"}, "doc.tamanu.patient_contacts__connection_details": {"name": "patient_contacts__connection_details", "resource_type": "doc", "package_name": "tamanu", "path": "patient_contacts.md", "original_file_path": "../../database/model/public/patient_contacts.md", "unique_id": "doc.tamanu.patient_contacts__connection_details", "block_contents": "JSON structure containing the details of the contact.\n\nIts schema varies based on the `method`."}, "doc.tamanu.patient_contacts__patient_id": {"name": "patient_contacts__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_contacts.md", "original_file_path": "../../database/model/public/patient_contacts.md", "unique_id": "doc.tamanu.patient_contacts__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_contacts__relationship_id": {"name": "patient_contacts__relationship_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_contacts.md", "original_file_path": "../../database/model/public/patient_contacts.md", "unique_id": "doc.tamanu.patient_contacts__relationship_id", "block_contents": "If the contact method is via another person."}, "doc.tamanu.table__notifications": {"name": "table__notifications", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.table__notifications", "block_contents": "Notifications for the clinician dashboard"}, "doc.tamanu.notifications__type": {"name": "notifications__type", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.notifications__type", "block_contents": "Type of the notification\n\nOne of:\n- `imaging_request`\n- `lab_request`"}, "doc.tamanu.notifications__status": {"name": "notifications__status", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.notifications__status", "block_contents": "Status of the notification\n\nOne of:\n- `unread`\n- `read`"}, "doc.tamanu.notifications__user_id": {"name": "notifications__user_id", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.notifications__user_id", "block_contents": "Reference to the [user](#!/source/source.tamanu.tamanu.users) that get the notification."}, "doc.tamanu.notifications__created_time": {"name": "notifications__created_time", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.notifications__created_time", "block_contents": "When the notification was created"}, "doc.tamanu.notifications__patient_id": {"name": "notifications__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.notifications__patient_id", "block_contents": "Related patient of the notification"}, "doc.tamanu.notifications__metadata": {"name": "notifications__metadata", "resource_type": "doc", "package_name": "tamanu", "path": "notifications.md", "original_file_path": "../../database/model/public/notifications.md", "unique_id": "doc.tamanu.notifications__metadata", "block_contents": "Metadata of the notification"}, "doc.tamanu.table__invoice_insurance_plans": {"name": "table__invoice_insurance_plans", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoice_insurance_plans.md", "unique_id": "doc.tamanu.table__invoice_insurance_plans", "block_contents": "Table for insurance contracts used for invoicing."}, "doc.tamanu.invoice_insurance_plans__code": {"name": "invoice_insurance_plans__code", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoice_insurance_plans.md", "unique_id": "doc.tamanu.invoice_insurance_plans__code", "block_contents": "Unique identifier code for the insurance contract."}, "doc.tamanu.invoice_insurance_plans__name": {"name": "invoice_insurance_plans__name", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoice_insurance_plans.md", "unique_id": "doc.tamanu.invoice_insurance_plans__name", "block_contents": "Human-readable name of the insurance contract."}, "doc.tamanu.invoice_insurance_plans__default_coverage": {"name": "invoice_insurance_plans__default_coverage", "resource_type": "doc", "package_name": "tamanu", "path": "invoice_insurance_plans.md", "original_file_path": "../../database/model/public/invoice_insurance_plans.md", "unique_id": "doc.tamanu.invoice_insurance_plans__default_coverage", "block_contents": "The default coverage (in percentage) of the insurance contract."}, "doc.tamanu.table__patient_vrs_data": {"name": "table__patient_vrs_data", "resource_type": "doc", "package_name": "tamanu", "path": "patient_vrs_data.md", "original_file_path": "../../database/model/public/patient_vrs_data.md", "unique_id": "doc.tamanu.table__patient_vrs_data", "block_contents": "Data for Fiji's VRS integration only."}, "doc.tamanu.patient_vrs_data__id_type": {"name": "patient_vrs_data__id_type", "resource_type": "doc", "package_name": "tamanu", "path": "patient_vrs_data.md", "original_file_path": "../../database/model/public/patient_vrs_data.md", "unique_id": "doc.tamanu.patient_vrs_data__id_type", "block_contents": "TBC"}, "doc.tamanu.patient_vrs_data__identifier": {"name": "patient_vrs_data__identifier", "resource_type": "doc", "package_name": "tamanu", "path": "patient_vrs_data.md", "original_file_path": "../../database/model/public/patient_vrs_data.md", "unique_id": "doc.tamanu.patient_vrs_data__identifier", "block_contents": "TBC"}, "doc.tamanu.patient_vrs_data__unmatched_village_name": {"name": "patient_vrs_data__unmatched_village_name", "resource_type": "doc", "package_name": "tamanu", "path": "patient_vrs_data.md", "original_file_path": "../../database/model/public/patient_vrs_data.md", "unique_id": "doc.tamanu.patient_vrs_data__unmatched_village_name", "block_contents": "if we don't have a matching village, persist the unmatched name here"}, "doc.tamanu.patient_vrs_data__patient_id": {"name": "patient_vrs_data__patient_id", "resource_type": "doc", "package_name": "tamanu", "path": "patient_vrs_data.md", "original_file_path": "../../database/model/public/patient_vrs_data.md", "unique_id": "doc.tamanu.patient_vrs_data__patient_id", "block_contents": "Reference to the [patient](#!/source/source.tamanu.tamanu.patients)."}, "doc.tamanu.patient_vrs_data__is_deleted_by_remote": {"name": "patient_vrs_data__is_deleted_by_remote", "resource_type": "doc", "package_name": "tamanu", "path": "patient_vrs_data.md", "original_file_path": "../../database/model/public/patient_vrs_data.md", "unique_id": "doc.tamanu.patient_vrs_data__is_deleted_by_remote", "block_contents": "TBC"}, "doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {}, "parent_map": {"test.tamanu.source_unique_fhir__tamanu_specimens_id.7d00fb0248": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_not_null_fhir__tamanu_specimens_id.7098c20560": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_not_null_fhir__tamanu_specimens_version_id.a13ea95e5c": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_not_null_fhir__tamanu_specimens_upstream_id.f9565a425c": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_not_null_fhir__tamanu_specimens_last_updated.6f9a98122d": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_not_null_fhir__tamanu_specimens_is_live.99d3cadd54": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_not_null_fhir__tamanu_specimens_resolved.80b78d06fe": ["source.tamanu.fhir__tamanu.specimens"], "test.tamanu.source_unique_fhir__tamanu_non_fhir_medici_report_id.0e2dad7c7b": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_id.ed54e5fea6": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.adc82d8370": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.68db39c9c1": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated.ab705926fd": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.3bb8a03bae": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.21865513be": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.cb5b40a829": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_sex.dfa61ee459": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id.5521fce097": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date.4142e92001": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.ee7f06020a": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.8f4e5b7426": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.592feba481": ["source.tamanu.fhir__tamanu.non_fhir_medici_report"], "test.tamanu.source_unique_fhir__tamanu_encounters_id.bdda44ec81": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_id.5459be3bbc": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_version_id.8f4dcb3a64": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_upstream_id.9257212a57": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_last_updated.199565a5e7": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_status.7255ffba7d": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged.ea2dd4dc2a": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_is_live.c401845261": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_not_null_fhir__tamanu_encounters_resolved.8217d372c8": ["source.tamanu.fhir__tamanu.encounters"], "test.tamanu.source_unique_fhir__tamanu_patients_id.85cfe6c3ea": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_id.0c43d4a03e": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_version_id.6f3ced7026": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_upstream_id.dc466caaf3": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_last_updated.65b7545398": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_identifier.96f86bad18": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_active.922409a478": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_name.0e7b5767d3": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_telecom.9515617b10": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_gender.a288fa3d46": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_address.1e80038399": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_extension.e3b05cb34a": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_is_live.f6662d2722": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_not_null_fhir__tamanu_patients_resolved.f5739ac9ca": ["source.tamanu.fhir__tamanu.patients"], "test.tamanu.source_unique_fhir__tamanu_medication_requests_id.538c5993b6": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_id.7fa1f94c15": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_version_id.21066cfc57": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_unique_fhir__tamanu_medication_requests_upstream_id.73906b5380": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_upstream_id.354715d4f3": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_last_updated.26ce392978": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_status.24aa06df0c": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_intent.063b6ce234": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_resolved.d4ecb04fda": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_is_live.d31095549d": ["source.tamanu.fhir__tamanu.medication_requests"], "test.tamanu.source_unique_fhir__tamanu_service_requests_id.e6a309054d": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_id.a59c3d7e06": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_version_id.136a4ee810": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_upstream_id.81cbc8acb4": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_last_updated.e3657976a4": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_identifier.73b3472574": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown.08fbf0e1e4": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_intent__order.a25886f00a": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_category.af95957557": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat.abe483e472": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_order_detail.be8e9124fc": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_location_code.c8c33ef722": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_is_live.0922cb4130": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_not_null_fhir__tamanu_service_requests_resolved.92e4b8bf48": ["source.tamanu.fhir__tamanu.service_requests"], "test.tamanu.source_unique_fhir__tamanu_jobs_id.96f908c26e": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_id.51acd6ac1e": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_created_at.6a7f288177": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_updated_at.90a980bdc8": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_priority.2313d9b744": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_status.efd7e342aa": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored.42189fdf8f": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_topic.98c2f9b4b2": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_unique_fhir__tamanu_jobs_discriminant.22b1361683": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_discriminant.5c7d80ea70": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_not_null_fhir__tamanu_jobs_payload.20e661456f": ["source.tamanu.fhir__tamanu.jobs"], "test.tamanu.source_unique_fhir__tamanu_job_workers_id.dee0269c4e": ["source.tamanu.fhir__tamanu.job_workers"], "test.tamanu.source_not_null_fhir__tamanu_job_workers_id.c3476b3eb9": ["source.tamanu.fhir__tamanu.job_workers"], "test.tamanu.source_not_null_fhir__tamanu_job_workers_created_at.860a644fd1": ["source.tamanu.fhir__tamanu.job_workers"], "test.tamanu.source_not_null_fhir__tamanu_job_workers_updated_at.0fe62e1558": ["source.tamanu.fhir__tamanu.job_workers"], "test.tamanu.source_not_null_fhir__tamanu_job_workers_metadata.e61a2ced27": ["source.tamanu.fhir__tamanu.job_workers"], "test.tamanu.source_unique_fhir__tamanu_immunizations_id.596d017734": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_id.7f90c3dd59": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_version_id.f3bbf1cc3b": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_upstream_id.5882d9e14e": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_last_updated.62a54529c6": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_status.4ce41d1f44": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done.38601d1fe7": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_vaccine_code.ed1ac8c537": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_patient.8dcba1e0e1": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_site.b1fa3dddbb": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_performer.29b3a99986": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_protocol_applied.563e648d14": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_is_live.f8992f894b": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_not_null_fhir__tamanu_immunizations_resolved.ff096f7b43": ["source.tamanu.fhir__tamanu.immunizations"], "test.tamanu.source_unique_fhir__tamanu_organizations_id.e211eaf17e": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_id.ac18b655d1": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_version_id.f0fa91055e": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_upstream_id.3c212df269": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_last_updated.c79b2ea09a": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_name.9dbf1f951c": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_is_live.edc801380a": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_not_null_fhir__tamanu_organizations_resolved.813365ad2b": ["source.tamanu.fhir__tamanu.organizations"], "test.tamanu.source_unique_fhir__tamanu_practitioners_id.a2b4a981a6": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_not_null_fhir__tamanu_practitioners_id.296f73c09b": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_not_null_fhir__tamanu_practitioners_version_id.42684fbfa8": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_not_null_fhir__tamanu_practitioners_upstream_id.3446e5bb3c": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_not_null_fhir__tamanu_practitioners_last_updated.324d60604b": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_not_null_fhir__tamanu_practitioners_is_live.f0077a943a": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_not_null_fhir__tamanu_practitioners_resolved.18050ffab2": ["source.tamanu.fhir__tamanu.practitioners"], "test.tamanu.source_unique_logs__tamanu_migrations_id.12ea87b61e": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_id.5638ece336": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_logged_at.9b591e2016": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_record_sync_tick.ddbd48d1c1": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_device_id.30a569c46c": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_version.ad4fd97571": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_direction.c83fad8f7e": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_migrations.bf597438c3": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_not_null_logs__tamanu_migrations_updated_at_sync_tick.2ee4244e54": ["source.tamanu.logs__tamanu.migrations"], "test.tamanu.source_unique_logs__tamanu_changes_id.dd0bf715d9": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_id.866e117189": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_table_oid.b9844b50e8": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_table_schema.3e59c96f61": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_table_name.0b42537bc6": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_logged_at.1def9d3088": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_created_at.3b82d26023": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_updated_by_user_id.82cb04062b": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_.7c9053d465": ["source.tamanu.logs__tamanu.changes", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_logs__tamanu_changes_device_id.e56e90ec9d": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_version.9d511c5658": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_record_id.782318322c": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_record_created_at.d09f0598ea": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_record_updated_at.7ba7742260": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_record_data.83bbd4bbf6": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_not_null_logs__tamanu_changes_updated_at_sync_tick.c1c5731de8": ["source.tamanu.logs__tamanu.changes"], "test.tamanu.source_unique_logs__tamanu_dhis2_pushes_id.0da5ddfd43": ["source.tamanu.logs__tamanu.dhis2_pushes"], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_id.5b06029985": ["source.tamanu.logs__tamanu.dhis2_pushes"], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_created_at.53c44d382b": ["source.tamanu.logs__tamanu.dhis2_pushes"], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_report_id.5a861460f0": ["source.tamanu.logs__tamanu.dhis2_pushes"], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_status.b440e65629": ["source.tamanu.logs__tamanu.dhis2_pushes"], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_updated_at.46346dc2f0": ["source.tamanu.logs__tamanu.dhis2_pushes"], "test.tamanu.source_unique_logs__tamanu_debug_logs_id.a03e8469cd": ["source.tamanu.logs__tamanu.debug_logs"], "test.tamanu.source_not_null_logs__tamanu_debug_logs_id.2cd56785d4": ["source.tamanu.logs__tamanu.debug_logs"], "test.tamanu.source_not_null_logs__tamanu_debug_logs_type.78622a3567": ["source.tamanu.logs__tamanu.debug_logs"], "test.tamanu.source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate.827ca373d0": ["source.tamanu.logs__tamanu.debug_logs"], "test.tamanu.source_not_null_logs__tamanu_debug_logs_info.5cb0ccb1a0": ["source.tamanu.logs__tamanu.debug_logs"], "test.tamanu.source_unique_logs__tamanu_accesses_id.58775d956a": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_id.47650015e9": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_created_at.c559af59c4": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at.d68343154e": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_user_id.4731fc507d": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_record_id.c49d0f4d84": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_record_type.b59437e552": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_session_id.3968767d39": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_device_id.277d95b364": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_logged_at.aee8df31c7": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_front_end_context.aeef6880f0": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_back_end_context.c461ef5b10": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_is_mobile.87cbc52937": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_version.92cc727c2e": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at_sync_tick.82731184f9": ["source.tamanu.logs__tamanu.accesses"], "test.tamanu.source_unique_logs__tamanu_fhir_writes_id.8353be29e8": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_id.82c7762d53": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_created_at.6a5dde6c84": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_verb.2b0319d883": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_url.1acf607faf": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_body.face3433a2": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_headers.d9c7e90be8": ["source.tamanu.logs__tamanu.fhir_writes"], "test.tamanu.source_unique_tamanu_patient_allergies_id.898e40bfbb": ["source.tamanu.tamanu.patient_allergies"], "test.tamanu.source_not_null_tamanu_patient_allergies_id.f1126d18a5": ["source.tamanu.tamanu.patient_allergies"], "test.tamanu.source_not_null_tamanu_patient_allergies_created_at.59905c68e2": ["source.tamanu.tamanu.patient_allergies"], "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at.048547273e": ["source.tamanu.tamanu.patient_allergies"], "test.tamanu.source_not_null_tamanu_patient_allergies_recorded_date.de31b171cd": ["source.tamanu.tamanu.patient_allergies"], "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at_sync_tick.14fb342ab8": ["source.tamanu.tamanu.patient_allergies"], "test.tamanu.source_unique_tamanu_triages_id.86b3cfdd35": ["source.tamanu.tamanu.triages"], "test.tamanu.source_not_null_tamanu_triages_id.8276269bfd": ["source.tamanu.tamanu.triages"], "test.tamanu.source_not_null_tamanu_triages_created_at.9d4e7381d6": ["source.tamanu.tamanu.triages"], "test.tamanu.source_not_null_tamanu_triages_updated_at.3cd54f2d9b": ["source.tamanu.tamanu.triages"], "test.tamanu.source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_.3903adeec0": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.triages"], "test.tamanu.source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_.9341ff1138": ["source.tamanu.tamanu.triages", "source.tamanu.tamanu.users"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_.3203451a40": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.triages"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_.8c9e664e44": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.triages"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_.26a3871e3a": ["source.tamanu.tamanu.reference_data", "source.tamanu.tamanu.triages"], "test.tamanu.source_not_null_tamanu_triages_updated_at_sync_tick.38a343c27f": ["source.tamanu.tamanu.triages"], "test.tamanu.source_unique_tamanu_imaging_area_external_codes_id.ac26885b2b": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_id.fe52d7eda4": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_created_at.5a8be2828e": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at.fde1da72e8": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_visibility_status.83963919d0": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_unique_tamanu_imaging_area_external_codes_area_id.050349fa98": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_area_id.b59576cea8": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_.32280d3e7c": ["source.tamanu.tamanu.imaging_area_external_codes", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_code.af72562338": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick.1bfbc765fb": ["source.tamanu.tamanu.imaging_area_external_codes"], "test.tamanu.source_unique_tamanu_socket_io_attachments_id.919f1a7156": ["source.tamanu.tamanu.socket_io_attachments"], "test.tamanu.source_not_null_tamanu_socket_io_attachments_id.acd275c6dc": ["source.tamanu.tamanu.socket_io_attachments"], "test.tamanu.source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick.8169c97d48": ["source.tamanu.tamanu.socket_io_attachments"], "test.tamanu.source_unique_tamanu_report_definitions_id.26898ce7eb": ["source.tamanu.tamanu.report_definitions"], "test.tamanu.source_not_null_tamanu_report_definitions_id.b8bb2a951d": ["source.tamanu.tamanu.report_definitions"], "test.tamanu.source_unique_tamanu_report_definitions_name.2f942767b6": ["source.tamanu.tamanu.report_definitions"], "test.tamanu.source_not_null_tamanu_report_definitions_name.a630c1f799": ["source.tamanu.tamanu.report_definitions"], "test.tamanu.source_not_null_tamanu_report_definitions_updated_at_sync_tick.3d8f13be51": ["source.tamanu.tamanu.report_definitions"], "test.tamanu.source_not_null_tamanu_report_definitions_db_schema.f939e6dfa3": ["source.tamanu.tamanu.report_definitions"], "test.tamanu.source_unique_tamanu_one_time_logins_id.b1d11d6c3f": ["source.tamanu.tamanu.one_time_logins"], "test.tamanu.source_not_null_tamanu_one_time_logins_id.6318f1fc0d": ["source.tamanu.tamanu.one_time_logins"], "test.tamanu.source_not_null_tamanu_one_time_logins_user_id.ebe1f826af": ["source.tamanu.tamanu.one_time_logins"], "test.tamanu.source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_.93741528ac": ["source.tamanu.tamanu.one_time_logins", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_one_time_logins_token.6b7dbabb08": ["source.tamanu.tamanu.one_time_logins"], "test.tamanu.source_not_null_tamanu_one_time_logins_expires_at.0051cd2e03": ["source.tamanu.tamanu.one_time_logins"], "test.tamanu.source_unique_tamanu_invoice_price_lists_id.92912c617f": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_not_null_tamanu_invoice_price_lists_id.dc8853229e": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_not_null_tamanu_invoice_price_lists_created_at.84fe51b659": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at.75781a813a": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.ff56fc27cb": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_not_null_tamanu_invoice_price_lists_code.741a3b08ab": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_not_null_tamanu_invoice_price_lists_visibility_status.a2ae9351b7": ["source.tamanu.tamanu.invoice_price_lists"], "test.tamanu.source_unique_tamanu_patient_contacts_id.3c41111688": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_not_null_tamanu_patient_contacts_id.9e63606ba7": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_not_null_tamanu_patient_contacts_created_at.29d447b596": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at.e81c827845": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_not_null_tamanu_patient_contacts_name.2a5f2c99f9": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_not_null_tamanu_patient_contacts_method.37c9585829": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram.8c6857119c": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_not_null_tamanu_patient_contacts_patient_id.58de0a1f28": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_.606993d615": ["source.tamanu.tamanu.patient_contacts", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_contacts_relationship_id.20abe6c3b2": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_.98d8247d27": ["source.tamanu.tamanu.patient_contacts", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at_sync_tick.3d648b4683": ["source.tamanu.tamanu.patient_contacts"], "test.tamanu.source_unique_tamanu_certificate_notifications_id.71e705665b": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_not_null_tamanu_certificate_notifications_id.7757b0046d": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_not_null_tamanu_certificate_notifications_type.a7491c4721": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc.ca722e42a5": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_.445dca3a7a": ["source.tamanu.tamanu.certificate_notifications", "source.tamanu.tamanu.patients"], "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_.7bacb605d5": ["source.tamanu.tamanu.certificate_notifications", "source.tamanu.tamanu.lab_tests"], "test.tamanu.source_not_null_tamanu_certificate_notifications_status.561750c1e5": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore.3450abc93a": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_.3cf536fdbe": ["source.tamanu.tamanu.certificate_notifications", "source.tamanu.tamanu.lab_requests"], "test.tamanu.source_not_null_tamanu_certificate_notifications_updated_at_sync_tick.7cb5b88cb7": ["source.tamanu.tamanu.certificate_notifications"], "test.tamanu.source_unique_tamanu_medication_administration_records_id.90c6de3c48": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_id.052d1d08f9": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN.5e232a0448": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_due_at.448f2c2000": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_is_auto_generated.092ff3874d": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_created_at.9f08841aa3": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at.f0bd0e1339": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at_sync_tick.59617cf32f": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_not_null_tamanu_medication_administration_records_is_edited.178286708a": ["source.tamanu.tamanu.medication_administration_records"], "test.tamanu.source_unique_tamanu_templates_id.2cf6e18998": ["source.tamanu.tamanu.templates"], "test.tamanu.source_not_null_tamanu_templates_id.4e582a2692": ["source.tamanu.tamanu.templates"], "test.tamanu.source_not_null_tamanu_templates_name.5251789780": ["source.tamanu.tamanu.templates"], "test.tamanu.source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_.e25012c12c": ["source.tamanu.tamanu.templates", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_templates_updated_at_sync_tick.68f02a36e6": ["source.tamanu.tamanu.templates"], "test.tamanu.source_not_null_tamanu_templates_type.6083b4eb5c": ["source.tamanu.tamanu.templates"], "test.tamanu.source_unique_tamanu_program_registry_condition_categories_id.18374f5f6e": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_id.a5fda78261": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_created_at.a0f967234b": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at.704b596025": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_code.a8f2bb54d7": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_name.e875bc9167": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_program_registry_id.bef6922940": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick.62ea28ae95": ["source.tamanu.tamanu.program_registry_condition_categories"], "test.tamanu.source_unique_tamanu_procedure_survey_responses_id.f04f0f3841": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_id.a4c8f21301": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_procedure_id.d49cf97456": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_survey_response_id.08df151a05": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_created_at.8143f338d9": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at.d9d19cd3aa": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick.7ee597b2e3": ["source.tamanu.tamanu.procedure_survey_responses"], "test.tamanu.source_unique_tamanu_pharmacy_order_prescriptions_id.03a99815d2": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_id.fd53b388c3": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id.00d2c5b906": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id.5a6d9c2855": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_quantity.02521782a2": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_created_at.f3e852be35": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.4e7669a584": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_is_completed.d0fc6c67a0": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick.eb82a5ba2b": ["source.tamanu.tamanu.pharmacy_order_prescriptions"], "test.tamanu.source_unique_tamanu_location_groups_id.92f4a5e856": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_id.00f301e9d3": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_created_at.b199e250ad": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_updated_at.4a9b84a719": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_accepted_values_tamanu_location_groups_visibility_status__current__historical.5756cd0b4b": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_name.983b6df532": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_code.c2bcc0bf4f": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_facility_id.d062db3ac7": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_.ecb02b7330": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_updated_at_sync_tick.b75e499255": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_location_groups_is_bookable.c3c0909cd0": ["source.tamanu.tamanu.location_groups"], "test.tamanu.source_unique_tamanu_invoice_products_id.abc4b55436": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_products_id.9b98c43ede": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_products_name.c01b81d553": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_products_insurable.94732ef307": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_products_created_at.815791ae0e": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_products_visibility_status.a7dd9ecfa0": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_products_updated_at_sync_tick.510c557616": ["source.tamanu.tamanu.invoice_products"], "test.tamanu.source_unique_tamanu_certifiable_vaccines_id.f0a184f1a0": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_id.b73eb6daff": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_created_at.ed08316054": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at.57aee6fafd": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_unique_tamanu_certifiable_vaccines_vaccine_id.ab754e124f": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_id.836f9ff4fb": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_.2a45c16791": ["source.tamanu.tamanu.certifiable_vaccines", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_.7fbca1adbc": ["source.tamanu.tamanu.certifiable_vaccines", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.e0022050d1": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.c672804493": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_code.6c9677a1ed": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_maximum_dosage.ab28eb0766": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick.ce5ff28250": ["source.tamanu.tamanu.certifiable_vaccines"], "test.tamanu.source_unique_tamanu_task_designations_id.adf46ec6db": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_not_null_tamanu_task_designations_id.2c04a11c88": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_not_null_tamanu_task_designations_task_id.d0e443e977": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_not_null_tamanu_task_designations_designation_id.dc0adb2396": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_not_null_tamanu_task_designations_created_at.60f756cdb6": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_not_null_tamanu_task_designations_updated_at.14c7cc7b2e": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_not_null_tamanu_task_designations_updated_at_sync_tick.6da15a7273": ["source.tamanu.tamanu.task_designations"], "test.tamanu.source_unique_tamanu_appointment_schedules_id.0a8d801e6f": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_id.61a1963563": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_interval.09395917c8": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_frequency.1a456b5d85": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_created_at.51ddaf1fe0": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at.ceb401c90c": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at_sync_tick.3902446442": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_not_null_tamanu_appointment_schedules_is_fully_generated.fd5b4e8ebf": ["source.tamanu.tamanu.appointment_schedules"], "test.tamanu.source_unique_tamanu_scheduled_vaccines_id.2034f06a45": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_id.5f527b2c7d": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_created_at.af5ea94ddb": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at.bbfa85d08b": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine.c38ebd4174": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.b312aecb83": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.69f1da7070": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_sort_index.b8dba8349e": ["source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_unique_tamanu_user_localisation_caches_id.32edbc1226": ["source.tamanu.tamanu.user_localisation_caches"], "test.tamanu.source_not_null_tamanu_user_localisation_caches_id.31e4c40fbd": ["source.tamanu.tamanu.user_localisation_caches"], "test.tamanu.source_not_null_tamanu_user_localisation_caches_localisation.6988ef3ae3": ["source.tamanu.tamanu.user_localisation_caches"], "test.tamanu.source_unique_tamanu_invoice_item_discounts_id.171e1a5e94": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_id.bcff96eb2f": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_invoice_item_id.3398752f5b": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_.18c0b3db45": ["source.tamanu.tamanu.invoice_item_discounts", "source.tamanu.tamanu.invoice_items"], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_amount.0e8480cee8": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_created_at.664f2faa45": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick.15b4636f1b": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_type.f759ed12f3": ["source.tamanu.tamanu.invoice_item_discounts"], "test.tamanu.source_unique_tamanu_portal_one_time_tokens_id.84f65f30bf": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_id.ab6f761724": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_created_at.1c1279979b": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_updated_at.b077921d8b": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_portal_user_id.5159527428": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_type.5c33a4037d": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_token.8afdc93478": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_expires_at.e45d1c82d9": ["source.tamanu.tamanu.portal_one_time_tokens"], "test.tamanu.source_unique_tamanu_invoice_discounts_id.90b9b4d8a6": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_not_null_tamanu_invoice_discounts_id.e5dd8872f8": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_not_null_tamanu_invoice_discounts_invoice_id.e692b8ae47": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_.93879e6aa1": ["source.tamanu.tamanu.invoice_discounts", "source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoice_discounts_percentage.eeb4864a35": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_not_null_tamanu_invoice_discounts_is_manual.e5a0d85a43": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_by_user_id.eacadbca1c": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_.4ec462b6c3": ["source.tamanu.tamanu.invoice_discounts", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_time.de2863c9b1": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_not_null_tamanu_invoice_discounts_created_at.2a4d9814f4": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.96efd53160": ["source.tamanu.tamanu.invoice_discounts"], "test.tamanu.source_unique_tamanu_program_registry_conditions_id.8aed9112e7": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_id.96669373a2": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_created_at.f1a67190af": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at.2f0d7717b7": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_unique_tamanu_program_registry_conditions_code.9e9e23890c": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_code.6e0f8d91fe": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_name.fb44ee2d53": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_program_registry_id.8b4085a6a4": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_.4b46b0e413": ["source.tamanu.tamanu.program_registries", "source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick.81caed205f": ["source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_unique_tamanu_invoice_payments_id.0aeb9e30d1": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_payments_id.3dad87d906": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_payments_invoice_id.f83a526a9f": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_.d07f617060": ["source.tamanu.tamanu.invoice_payments", "source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoice_payments_date.7761ae0a7d": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_payments_receipt_number.bd93ab85a8": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_payments_amount.ce266dd7a6": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_payments_created_at.a163e272e6": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_.11aa785c7b": ["source.tamanu.tamanu.invoice_payments", "source.tamanu.tamanu.users"], "test.tamanu.source_unique_tamanu_invoice_payments_original_payment_id.76c596c1fd": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_payments_updated_at_sync_tick.011299b145": ["source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown.663d1d9b1c": ["source.tamanu.tamanu.patient_additional_data"], "test.tamanu.source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_.d16028f9e4": ["source.tamanu.tamanu.patient_additional_data"], "test.tamanu.source_unique_tamanu_patient_additional_data_patient_id.765b349cc6": ["source.tamanu.tamanu.patient_additional_data"], "test.tamanu.source_not_null_tamanu_patient_additional_data_patient_id.9eb859e167": ["source.tamanu.tamanu.patient_additional_data"], "test.tamanu.source_not_null_tamanu_patient_additional_data_updated_at_sync_tick.d93ed515bf": ["source.tamanu.tamanu.patient_additional_data"], "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_.32e4981e6c": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.upcoming_vaccinations"], "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.37ba12bfdf": ["source.tamanu.tamanu.scheduled_vaccines", "source.tamanu.tamanu.upcoming_vaccinations"], "test.tamanu.source_unique_tamanu_user_preferences_id.ff8617d0af": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_id.0563337670": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_created_at.b4868da62e": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_updated_at.e3fb22ee58": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_user_id.de0ee34cbb": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_updated_at_sync_tick.68db073099": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_key.42f62cbf6e": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_user_preferences_value.05dc3d9f13": ["source.tamanu.tamanu.user_preferences"], "test.tamanu.source_not_null_tamanu_patient_field_values_created_at.acd6792845": ["source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at.dc8ebd5fcb": ["source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_not_null_tamanu_patient_field_values_value.20bfdc4dc5": ["source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_not_null_tamanu_patient_field_values_definition_id.afb3baa363": ["source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_.7942c868d5": ["source.tamanu.tamanu.patient_field_definitions", "source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_not_null_tamanu_patient_field_values_patient_id.d726e4e785": ["source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_.7e29294f59": ["source.tamanu.tamanu.patient_field_values", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at_sync_tick.37926ff0c2": ["source.tamanu.tamanu.patient_field_values"], "test.tamanu.source_unique_tamanu_referrals_id.724932b7f0": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_not_null_tamanu_referrals_id.b643c6e9cf": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_not_null_tamanu_referrals_created_at.7dc2e9f62e": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_not_null_tamanu_referrals_updated_at.319fc895ee": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_.e17964499c": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.referrals"], "test.tamanu.source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_.dc1e9922b6": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.referrals"], "test.tamanu.source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_.36148d215d": ["source.tamanu.tamanu.referrals", "source.tamanu.tamanu.survey_responses"], "test.tamanu.source_not_null_tamanu_referrals_status.b2da9beb55": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_accepted_values_tamanu_referrals_status__pending__cancelled__completed.86187bc5c9": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_not_null_tamanu_referrals_updated_at_sync_tick.475afc0dcb": ["source.tamanu.tamanu.referrals"], "test.tamanu.source_unique_tamanu_lab_request_logs_id.7acd19c7d3": ["source.tamanu.tamanu.lab_request_logs"], "test.tamanu.source_not_null_tamanu_lab_request_logs_id.fe608e09fd": ["source.tamanu.tamanu.lab_request_logs"], "test.tamanu.source_not_null_tamanu_lab_request_logs_status.8e024043da": ["source.tamanu.tamanu.lab_request_logs"], "test.tamanu.source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_.f8e2c6d82e": ["source.tamanu.tamanu.lab_request_logs", "source.tamanu.tamanu.lab_requests"], "test.tamanu.source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_.86e7966883": ["source.tamanu.tamanu.lab_request_logs", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.960428a44f": ["source.tamanu.tamanu.lab_request_logs"], "test.tamanu.source_unique_tamanu_user_leaves_id.f9fb006fa5": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_id.3c0b468b6b": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_start_date.a4376146d4": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_end_date.69c42bf7d9": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_user_id.df71d24528": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_created_at.638cb66e18": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_updated_at.045e6c9ad2": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_not_null_tamanu_user_leaves_updated_at_sync_tick.05dfeae565": ["source.tamanu.tamanu.user_leaves"], "test.tamanu.source_unique_tamanu_user_designations_id.85f719d07a": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_not_null_tamanu_user_designations_id.be521369b8": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_not_null_tamanu_user_designations_user_id.2b15af1d80": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_not_null_tamanu_user_designations_designation_id.f9b573eeb8": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_not_null_tamanu_user_designations_created_at.db3f67069a": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_not_null_tamanu_user_designations_updated_at.4bbf71e0b0": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_not_null_tamanu_user_designations_updated_at_sync_tick.934bc4ad06": ["source.tamanu.tamanu.user_designations"], "test.tamanu.source_unique_tamanu_patient_field_definitions_id.96d277b7c5": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_id.3b31aed01d": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_created_at.b7c144e251": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at.812399208c": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_name.a1fb4fbbdb": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_field_type.01dad44ce8": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select.8c8193f02d": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_visibility_status.353a97d1ea": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_category_id.5bb661f0af": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_.d67c1014d6": ["source.tamanu.tamanu.patient_field_definition_categories", "source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick.9334037106": ["source.tamanu.tamanu.patient_field_definitions"], "test.tamanu.source_unique_tamanu_lab_test_types_id.59d45fd4c8": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_id.0d085cde9d": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_created_at.6a4f074401": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at.34e9cce3fa": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_code.84b27e0faa": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_name.87dee5eabd": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_unit.953f194d89": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_result_type.a33f1d56c0": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select.e7c22c9eca": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.8034332af4": ["source.tamanu.tamanu.lab_test_types", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at_sync_tick.f5cbb064a4": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_types_is_sensitive.7905ffff94": ["source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_unique_tamanu_prescriptions_id.e43fe53647": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_id.acb2ebf90d": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_created_at.ce02db9537": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_updated_at.db8ce11745": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_date.a2e0f3a811": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_units.04b2e47d71": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_frequency.387650c017": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_start_date.6b47c62ca9": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_not_null_tamanu_prescriptions_updated_at_sync_tick.ccc1aacb8b": ["source.tamanu.tamanu.prescriptions"], "test.tamanu.source_unique_tamanu_medication_dispenses_id.3794f39031": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_id.4e57f1d462": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id.d4c0bafee8": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_quantity.362d1d5f50": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_by_user_id.afdbe34024": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_at.515dc80dcb": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_created_at.e8d7e87757": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at.76e722a377": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at_sync_tick.463ee92e91": ["source.tamanu.tamanu.medication_dispenses"], "test.tamanu.source_unique_tamanu_encounters_id.6da54b7f38": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounters_id.3d82b88759": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounters_created_at.5a9caa2a2b": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounters_updated_at.65ef63b763": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounters_encounter_type.169507cb50": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.6454543933": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounters_start_date.a5dec75857": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounters_patient_id.14f6d7e7fb": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_.86e006efba": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.patients"], "test.tamanu.source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_.1a33a59a12": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_.37f810a377": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.locations"], "test.tamanu.source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_.54b3d36175": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.encounters"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_.ecb4200032": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_.6759a4eea9": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_.b6110183f5": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_encounters_updated_at_sync_tick.1eb037d2f2": ["source.tamanu.tamanu.encounters"], "test.tamanu.source_unique_tamanu_encounter_diets_id.da8f18a027": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.source_not_null_tamanu_encounter_diets_id.d0805612f7": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.source_not_null_tamanu_encounter_diets_encounter_id.56ca3f2a1c": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_.90c10b0836": ["source.tamanu.tamanu.encounter_diets", "source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounter_diets_diet_id.f096ba53ad": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_.e71c59d77d": ["source.tamanu.tamanu.encounter_diets", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_encounter_diets_created_at.0f3c391127": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at.1a3c4fcb7f": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at_sync_tick.1e9301afae": ["source.tamanu.tamanu.encounter_diets"], "test.tamanu.source_unique_tamanu_encounter_diagnoses_id.d52ee9adc9": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_id.5010c4db2d": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_created_at.2e0c2e1d40": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at.e843942ea8": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected.9dcc845ca8": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_date.3cb9b9f92a": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_.16e875a59a": ["source.tamanu.tamanu.encounter_diagnoses", "source.tamanu.tamanu.encounters"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.6536f09069": ["source.tamanu.tamanu.encounter_diagnoses", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.82fe91df26": ["source.tamanu.tamanu.encounter_diagnoses"], "test.tamanu.source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_.98d7d9c464": ["source.tamanu.tamanu.encounter_diagnoses", "source.tamanu.tamanu.users"], "test.tamanu.source_unique_tamanu_program_data_elements_id.a75c7468d4": ["source.tamanu.tamanu.program_data_elements"], "test.tamanu.source_not_null_tamanu_program_data_elements_id.0e73c12f56": ["source.tamanu.tamanu.program_data_elements"], "test.tamanu.source_not_null_tamanu_program_data_elements_created_at.3a9a1d2f6d": ["source.tamanu.tamanu.program_data_elements"], "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at.3f3cecdcc3": ["source.tamanu.tamanu.program_data_elements"], "test.tamanu.source_not_null_tamanu_program_data_elements_type.5a4507db5e": ["source.tamanu.tamanu.program_data_elements"], "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at_sync_tick.d9577c2030": ["source.tamanu.tamanu.program_data_elements"], "test.tamanu.source_not_null_tamanu_patient_birth_data_created_at.ee3353eccc": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at.96f99396c0": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_unique_tamanu_patient_birth_data_patient_id.8e97708df0": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_not_null_tamanu_patient_birth_data_patient_id.7c9d7da294": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_.535a68dcb7": ["source.tamanu.tamanu.patient_birth_data", "source.tamanu.tamanu.patients"], "test.tamanu.source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other.cdd88bca26": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other.f7dbbb7dc8": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_.41f2b0a645": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other.68a09fae97": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.ad66b3a9e9": ["source.tamanu.tamanu.patient_birth_data"], "test.tamanu.source_unique_tamanu_program_registries_id.4591df7852": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_id.e8dd600ce7": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_created_at.ec096818cc": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_updated_at.b636966c96": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_unique_tamanu_program_registries_code.6aae9c851a": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_code.42a17fd859": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_name.7b40894126": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_currently_at_type.1181424fbc": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_accepted_values_tamanu_program_registries_currently_at_type__village__facility.878b7101a5": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_program_id.86ea68d449": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_not_null_tamanu_program_registries_updated_at_sync_tick.5bea147746": ["source.tamanu.tamanu.program_registries"], "test.tamanu.source_unique_tamanu_invoice_insurance_plans_id.c93eebe7c9": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_id.4c3a005a8c": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_created_at.6a73080b49": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at.1382c20539": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick.1671b13fb3": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_code.5691576988": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_visibility_status.3bdc27963d": ["source.tamanu.tamanu.invoice_insurance_plans"], "test.tamanu.source_unique_tamanu_note_items_id.6a3c41e3a8": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_not_null_tamanu_note_items_id.e102088706": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_not_null_tamanu_note_items_created_at.6c19cc76af": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_not_null_tamanu_note_items_updated_at.c552d1546c": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_not_null_tamanu_note_items_note_page_id.e6a2a1ff2b": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_.11dd57c56b": ["source.tamanu.tamanu.note_items", "source.tamanu.tamanu.note_pages"], "test.tamanu.source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_.1c2976179a": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_.1029ad90a3": ["source.tamanu.tamanu.note_items", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_.35728438ca": ["source.tamanu.tamanu.note_items", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_note_items_content.cdcdc58bd6": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_not_null_tamanu_note_items_date.b7ba7d298b": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_not_null_tamanu_note_items_updated_at_sync_tick.9c0561f44d": ["source.tamanu.tamanu.note_items"], "test.tamanu.source_unique_tamanu_encounter_pause_prescription_histories_id.242095e95a": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_id.9371741f30": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id.6431100b96": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action.36a50d92fd": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action_date.fff7387332": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_created_at.1766fe12bb": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at.bce04537f7": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick.1a62809ae2": ["source.tamanu.tamanu.encounter_pause_prescription_histories"], "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_id.6579ad9f9e": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_id.5152485ff1": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_created_at.db653414c9": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at.74ec57dc65": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_code.93a7de7fa7": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_code.b6dbb55eee": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_name.1483c9ad54": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id.51f24319f9": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_.5a69a4eefa": ["source.tamanu.tamanu.program_registries", "source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick.a28eb831c8": ["source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_unique_tamanu_local_system_facts_id.fec4c53d21": ["source.tamanu.tamanu.local_system_facts"], "test.tamanu.source_not_null_tamanu_local_system_facts_id.b86094ee5b": ["source.tamanu.tamanu.local_system_facts"], "test.tamanu.source_not_null_tamanu_local_system_facts_key.d313f0ba6d": ["source.tamanu.tamanu.local_system_facts"], "test.tamanu.source_unique_tamanu_invoices_invoice_insurance_plans_id.33a1630253": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_id.81fdb96190": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_created_at.3c4109e1f6": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at.23b9b151a0": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick.65d4601e80": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id.06e1c59b11": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id.b21c244f33": ["source.tamanu.tamanu.invoices_invoice_insurance_plans"], "test.tamanu.source_unique_tamanu_refresh_tokens_id.0c9c64d141": ["source.tamanu.tamanu.refresh_tokens"], "test.tamanu.source_not_null_tamanu_refresh_tokens_id.470a9a0ad1": ["source.tamanu.tamanu.refresh_tokens"], "test.tamanu.source_not_null_tamanu_refresh_tokens_refresh_id.1f1f3cc868": ["source.tamanu.tamanu.refresh_tokens"], "test.tamanu.source_not_null_tamanu_refresh_tokens_device_id.b6b31e60be": ["source.tamanu.tamanu.refresh_tokens"], "test.tamanu.source_not_null_tamanu_refresh_tokens_user_id.78eb836f95": ["source.tamanu.tamanu.refresh_tokens"], "test.tamanu.source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_.ba625319c2": ["source.tamanu.tamanu.refresh_tokens", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_refresh_tokens_expires_at.a515544921": ["source.tamanu.tamanu.refresh_tokens"], "test.tamanu.source_unique_tamanu_death_revert_logs_id.001d670317": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_not_null_tamanu_death_revert_logs_id.6df645dcf5": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_not_null_tamanu_death_revert_logs_created_at.c782214dc7": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at.844962c5a1": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_not_null_tamanu_death_revert_logs_revert_time.3e0bd39153": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_not_null_tamanu_death_revert_logs_death_data_id.4889452a8a": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_.a370a6342c": ["source.tamanu.tamanu.death_revert_logs", "source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_not_null_tamanu_death_revert_logs_patient_id.12123f0c05": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_.ab4f34cd7c": ["source.tamanu.tamanu.death_revert_logs", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_death_revert_logs_reverted_by_id.34e5a69137": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_.953c559e54": ["source.tamanu.tamanu.death_revert_logs", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.24982eacdf": ["source.tamanu.tamanu.death_revert_logs"], "test.tamanu.source_unique_tamanu_patient_program_registration_conditions_id.18c7acc7c5": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_id.148f05b382": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_created_at.ffd5ec434b": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at.ec3ed984e8": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_date.51631f2975": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_.bfef5107bf": ["source.tamanu.tamanu.patient_program_registration_conditions", "source.tamanu.tamanu.program_registry_conditions"], "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_.1928169432": ["source.tamanu.tamanu.patient_program_registration_conditions", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_.329bc7b403": ["source.tamanu.tamanu.patient_program_registration_conditions", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick.9a6307d740": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id.e4d2008618": ["source.tamanu.tamanu.patient_program_registration_conditions"], "test.tamanu.source_unique_tamanu_patients_id.aad3b90c9d": ["source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patients_id.275ed05302": ["source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patients_created_at.f10f4a4622": ["source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patients_updated_at.907998e8ed": ["source.tamanu.tamanu.patients"], "test.tamanu.source_unique_tamanu_patients_display_id.d601818f72": ["source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patients_display_id.faf4f13c00": ["source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patients_sex.107df8a545": ["source.tamanu.tamanu.patients"], "test.tamanu.source_accepted_values_tamanu_patients_sex__female__male__other.a3c5a2bdc7": ["source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patients_updated_at_sync_tick.937dfa8d54": ["source.tamanu.tamanu.patients"], "test.tamanu.source_unique_tamanu_departments_id.f24dde60cc": ["source.tamanu.tamanu.departments"], "test.tamanu.source_not_null_tamanu_departments_id.4f5628ebfb": ["source.tamanu.tamanu.departments"], "test.tamanu.source_not_null_tamanu_departments_code.196489124d": ["source.tamanu.tamanu.departments"], "test.tamanu.source_not_null_tamanu_departments_name.3448ffbf45": ["source.tamanu.tamanu.departments"], "test.tamanu.source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_.632d512530": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.facilities"], "test.tamanu.source_not_null_tamanu_departments_updated_at_sync_tick.3876957182": ["source.tamanu.tamanu.departments"], "test.tamanu.source_unique_tamanu_note_pages_id.589de9f269": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_id.ca251365f2": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_created_at.d12af0d7fa": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_updated_at.f4a3d0c174": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_note_type.ef33cb53cd": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_record_id.4fb443d5b8": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_record_type.3a45297bcc": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_date.73c5e4ff13": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_not_null_tamanu_note_pages_updated_at_sync_tick.92101dbbcc": ["source.tamanu.tamanu.note_pages"], "test.tamanu.source_unique_tamanu_invoice_insurance_plan_items_id.cbd4f88b8d": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_id.43701f0ea4": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_created_at.3f6d2aaeca": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at.31dd03f410": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick.1d01aecfe2": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id.22ae6631a9": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id.e10425ebc3": ["source.tamanu.tamanu.invoice_insurance_plan_items"], "test.tamanu.source_unique_tamanu_lab_tests_id.2135a2616a": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_not_null_tamanu_lab_tests_id.abec38f58a": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_not_null_tamanu_lab_tests_created_at.667f51451c": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_not_null_tamanu_lab_tests_updated_at.64be4fd140": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_not_null_tamanu_lab_tests_date.e00dab5c9e": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_not_null_tamanu_lab_tests_result.cac9a56686": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_.feba1f8faa": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.lab_tests"], "test.tamanu.source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_.1db3f2d26e": ["source.tamanu.tamanu.lab_test_types", "source.tamanu.tamanu.lab_tests"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_.be7e43137f": ["source.tamanu.tamanu.lab_tests", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_.b46161f1b5": ["source.tamanu.tamanu.lab_tests", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_lab_tests_updated_at_sync_tick.eeac5bc0de": ["source.tamanu.tamanu.lab_tests"], "test.tamanu.source_unique_tamanu_invoice_items_id.9cdffdcc59": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_not_null_tamanu_invoice_items_id.dc141da1a1": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_not_null_tamanu_invoice_items_invoice_id.3660f18c91": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_.1c28785b87": ["source.tamanu.tamanu.invoice_items", "source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoice_items_order_date.7be79d0261": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_.46ad5d1e2f": ["source.tamanu.tamanu.invoice_items", "source.tamanu.tamanu.invoice_products"], "test.tamanu.source_not_null_tamanu_invoice_items_quantity.3be1c84af8": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_not_null_tamanu_invoice_items_ordered_by_user_id.a2db62ee39": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_.a5aadc15a8": ["source.tamanu.tamanu.invoice_items", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_invoice_items_created_at.474e57c0bb": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_not_null_tamanu_invoice_items_updated_at_sync_tick.0d6baa054f": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_not_null_tamanu_invoice_items_approved.3e2ce00100": ["source.tamanu.tamanu.invoice_items"], "test.tamanu.source_unique_tamanu_lab_requests_id.4e5a6c8c2f": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_not_null_tamanu_lab_requests_id.e536409687": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_not_null_tamanu_lab_requests_created_at.1ee9713d63": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_not_null_tamanu_lab_requests_updated_at.fca847ad8c": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error.a405e0e600": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_.332337a1bd": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_.ead6a9d3f0": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.lab_requests"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.1161021af0": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_lab_requests_display_id.cbbdd33475": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_.15144cb13a": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_.4ae8635507": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_lab_requests_updated_at_sync_tick.ef00317737": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused.2cbc5618a7": ["source.tamanu.tamanu.lab_requests"], "test.tamanu.source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_.b8a500a3ec": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.lab_requests"], "test.tamanu.source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_.2905d1bd3a": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_.726d5f854e": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_.b37e5b8f30": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_.fa7e746896": ["source.tamanu.tamanu.lab_requests", "source.tamanu.tamanu.users"], "test.tamanu.source_unique_tamanu_SequelizeMeta_name.ed3437179c": ["source.tamanu.tamanu.SequelizeMeta"], "test.tamanu.source_not_null_tamanu_SequelizeMeta_name.8bbd44e2f6": ["source.tamanu.tamanu.SequelizeMeta"], "test.tamanu.source_unique_tamanu_invoices_id.5821fd311e": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_id.547f4c6b53": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_display_id.d7f24dffea": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_date.af363f73c1": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_status.3cc2fac683": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised.6e4b4a0157": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_encounter_id.165abf9a41": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_.5dd1ea3660": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_created_at.f79d3fee01": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_patient_payment_status.c489578d60": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial.fa024cba1f": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_insurer_payment_status.defe067d68": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected.3e0ad430bb": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_not_null_tamanu_invoices_updated_at_sync_tick.1157c94f1b": ["source.tamanu.tamanu.invoices"], "test.tamanu.source_unique_tamanu_patient_communications_id.b90ad76da2": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_not_null_tamanu_patient_communications_id.1fe956c44c": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_not_null_tamanu_patient_communications_created_at.33e1921e8e": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_not_null_tamanu_patient_communications_updated_at.871abd87ae": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_not_null_tamanu_patient_communications_type.4795985e7b": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_not_null_tamanu_patient_communications_channel.587842d7e0": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_not_null_tamanu_patient_communications_status.125dae34af": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_.f0401833ba": ["source.tamanu.tamanu.patient_communications", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_communications_updated_at_sync_tick.2b3912c278": ["source.tamanu.tamanu.patient_communications"], "test.tamanu.source_unique_tamanu_signers_historical_id.a3bfab8f1b": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_id.0d0aeac24d": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_created_at.42db3ab0e4": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_updated_at.1b5d6fc4e7": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_country_code.42c68d2696": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_public_key.d16df118c2": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_request.2959786f4d": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_not_null_tamanu_signers_historical_signatures_issued.da2dbdd26c": ["source.tamanu.tamanu.signers_historical"], "test.tamanu.source_unique_tamanu_invoice_price_list_items_id.0ce15b2467": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_id.5081c70d98": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_created_at.94f64a01f3": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at.3be1e8411f": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick.96a1770fd7": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id.98a95f7705": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_product_id.21d5cfd939": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_is_hidden.7422bf5f0a": ["source.tamanu.tamanu.invoice_price_list_items"], "test.tamanu.source_unique_tamanu_notes_id.a24a543e48": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_id.09c896ad4f": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_created_at.6995826036": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_updated_at.a1ee0f269e": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_record_id.cfea6af90a": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_record_type.95fdec276c": ["source.tamanu.tamanu.notes"], "test.tamanu.source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage.bec5c8fb7d": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_date.da7301eac5": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_updated_at_sync_tick.c817dbafe2": ["source.tamanu.tamanu.notes"], "test.tamanu.source_relationships_tamanu_notes_author_id__id__source_tamanu_users_.d295cc11d5": ["source.tamanu.tamanu.notes", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_.8b38421ee7": ["source.tamanu.tamanu.notes", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_notes_content.aaef9e6205": ["source.tamanu.tamanu.notes"], "test.tamanu.source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_.2e3d834e0e": ["source.tamanu.tamanu.notes"], "test.tamanu.source_not_null_tamanu_notes_note_type_id.149bd5c822": ["source.tamanu.tamanu.notes"], "test.tamanu.source_unique_tamanu_imaging_results_id.6830573d99": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_not_null_tamanu_imaging_results_id.bc45b4d2ee": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_not_null_tamanu_imaging_results_created_at.59c90956bf": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_not_null_tamanu_imaging_results_updated_at.6f4012c0e4": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_not_null_tamanu_imaging_results_updated_at_sync_tick.35b86ae623": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_not_null_tamanu_imaging_results_visibility_status.80dbc6bd58": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_not_null_tamanu_imaging_results_imaging_request_id.68d290fbfe": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_.2549bf4069": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.imaging_results"], "test.tamanu.source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_.cf92796113": ["source.tamanu.tamanu.imaging_results", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_imaging_results_completed_at.3e8e297046": ["source.tamanu.tamanu.imaging_results"], "test.tamanu.source_unique_tamanu_discharges_id.8b9c580a59": ["source.tamanu.tamanu.discharges"], "test.tamanu.source_not_null_tamanu_discharges_id.4a7ff5af7b": ["source.tamanu.tamanu.discharges"], "test.tamanu.source_not_null_tamanu_discharges_encounter_id.5299e31574": ["source.tamanu.tamanu.discharges"], "test.tamanu.source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_.43adeff312": ["source.tamanu.tamanu.discharges", "source.tamanu.tamanu.encounters"], "test.tamanu.source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_.1e9379ede1": ["source.tamanu.tamanu.discharges", "source.tamanu.tamanu.users"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_.2fff0e5fc5": ["source.tamanu.tamanu.discharges", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_discharges_updated_at_sync_tick.0b20bf424c": ["source.tamanu.tamanu.discharges"], "test.tamanu.source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_.1fe0fe6f7f": ["source.tamanu.tamanu.discharges", "source.tamanu.tamanu.facilities"], "test.tamanu.source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_.298b48d81f": ["source.tamanu.tamanu.discharges", "source.tamanu.tamanu.facilities"], "test.tamanu.source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_.68747350e4": ["source.tamanu.tamanu.discharges", "source.tamanu.tamanu.facilities"], "test.tamanu.source_unique_tamanu_patient_ongoing_prescriptions_id.acc37386e6": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_id.01386e7977": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.f41a0ed63a": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id.3409401d0e": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_created_at.0bf2c435a7": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.6af6ca8d00": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick.d9e250caae": ["source.tamanu.tamanu.patient_ongoing_prescriptions"], "test.tamanu.source_unique_tamanu_location_assignment_templates_id.2a2b122606": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_id.91706d5751": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_user_id.fc74c558b6": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_location_id.f01a2ba717": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_date.0265301d5d": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_start_time.aad4cea7dc": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_end_time.65aa617784": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_end_date.cfd6b45ace": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_frequency.c7157d2070": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_unit.2fca6b103d": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_created_at.a5e55e1095": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at.813872183e": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick.902f20bfe3": ["source.tamanu.tamanu.location_assignment_templates"], "test.tamanu.source_not_null_tamanu_patient_facilities_facility_id.2e4a51e2f6": ["source.tamanu.tamanu.patient_facilities"], "test.tamanu.source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_.8a454e3fea": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_facilities"], "test.tamanu.source_not_null_tamanu_patient_facilities_patient_id.a4d7ee14a4": ["source.tamanu.tamanu.patient_facilities"], "test.tamanu.source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_.62c931e062": ["source.tamanu.tamanu.patient_facilities", "source.tamanu.tamanu.patients"], "test.tamanu.source_unique_tamanu_patient_care_plans_id.a3a1194e99": ["source.tamanu.tamanu.patient_care_plans"], "test.tamanu.source_not_null_tamanu_patient_care_plans_id.56024c4140": ["source.tamanu.tamanu.patient_care_plans"], "test.tamanu.source_not_null_tamanu_patient_care_plans_created_at.dd6e82d0b1": ["source.tamanu.tamanu.patient_care_plans"], "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at.b6d6e4d022": ["source.tamanu.tamanu.patient_care_plans"], "test.tamanu.source_not_null_tamanu_patient_care_plans_date.34408a1445": ["source.tamanu.tamanu.patient_care_plans"], "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.310ae42450": ["source.tamanu.tamanu.patient_care_plans"], "test.tamanu.source_unique_tamanu_surveys_id.0e6c4290cc": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_id.232633415e": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_created_at.49abf4cc08": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_updated_at.88f3f24266": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_.fa85daf635": ["source.tamanu.tamanu.programs", "source.tamanu.tamanu.surveys"], "test.tamanu.source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals.fb3dae8522": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_is_sensitive.5f59558cfe": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_updated_at_sync_tick.27e79d3218": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_notifiable.fa289a592a": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_notify_email_addresses.6c0b996c80": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_not_null_tamanu_surveys_visibility_status.a50fde3a7b": ["source.tamanu.tamanu.surveys"], "test.tamanu.source_unique_tamanu_appointment_procedure_types_id.037055b61c": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_id.138766fc43": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_appointment_id.5ad9e548f4": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_procedure_type_id.14840677e5": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_created_at.2e4c1b17ce": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at.7d42fb36d3": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick.66fee65a6c": ["source.tamanu.tamanu.appointment_procedure_types"], "test.tamanu.source_unique_tamanu_report_requests_id.d871afb2cf": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_id.8374913dcd": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_created_at.5d76519d08": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_updated_at.60abf391b8": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_recipients.d49a8a2f72": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_status.4eafffa24a": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error.526b71b853": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_requested_by_user_id.10828a78a1": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_.11b6b8f5c4": ["source.tamanu.tamanu.report_requests", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_.ce7ace92aa": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_export_format.0e947a46a3": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_accepted_values_tamanu_report_requests_export_format__xlsx__csv.68903ce3f9": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_.c9440b513d": ["source.tamanu.tamanu.report_definition_versions", "source.tamanu.tamanu.report_requests"], "test.tamanu.source_not_null_tamanu_report_requests_updated_at_sync_tick.eef7d7f267": ["source.tamanu.tamanu.report_requests"], "test.tamanu.source_unique_tamanu_reference_drugs_id.b18d9ebb13": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_not_null_tamanu_reference_drugs_id.262b5ed3f6": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_unique_tamanu_reference_drugs_reference_data_id.ecedb99e2c": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_not_null_tamanu_reference_drugs_reference_data_id.69bff85f87": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_not_null_tamanu_reference_drugs_is_sensitive.e5bd778894": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_not_null_tamanu_reference_drugs_created_at.56d6a7bcc0": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at.573d9fdd62": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at_sync_tick.82d2c43485": ["source.tamanu.tamanu.reference_drugs"], "test.tamanu.source_unique_tamanu_invoice_insurer_payments_id.b447e82df0": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_id.e4847e6d62": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_unique_tamanu_invoice_insurer_payments_invoice_payment_id.7dc74551cc": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id.d5611881a3": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.bb3f5a2cf7": ["source.tamanu.tamanu.invoice_insurer_payments", "source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_insurer_id.d4af11cfdf": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_.04f39ad92a": ["source.tamanu.tamanu.invoice_insurer_payments", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_status.7ac01d0560": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected.b655cf463e": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_created_at.8b24ac848c": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick.4f3ee2ea02": ["source.tamanu.tamanu.invoice_insurer_payments"], "test.tamanu.source_unique_tamanu_procedures_id.ed36ede291": ["source.tamanu.tamanu.procedures"], "test.tamanu.source_not_null_tamanu_procedures_id.ba34e3de73": ["source.tamanu.tamanu.procedures"], "test.tamanu.source_not_null_tamanu_procedures_created_at.04e3942886": ["source.tamanu.tamanu.procedures"], "test.tamanu.source_not_null_tamanu_procedures_updated_at.25bc26ecf8": ["source.tamanu.tamanu.procedures"], "test.tamanu.source_not_null_tamanu_procedures_date.dcd844e127": ["source.tamanu.tamanu.procedures"], "test.tamanu.source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_.e6407dfa85": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.procedures"], "test.tamanu.source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_.679ed5aba8": ["source.tamanu.tamanu.locations", "source.tamanu.tamanu.procedures"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_.357cfc4070": ["source.tamanu.tamanu.procedures", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_.8b2aee60ac": ["source.tamanu.tamanu.procedures", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_.b1d682ce39": ["source.tamanu.tamanu.procedures", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_.5a3ee51b82": ["source.tamanu.tamanu.procedures", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_procedures_updated_at_sync_tick.2da29f5157": ["source.tamanu.tamanu.procedures"], "test.tamanu.source_unique_tamanu_roles_id.0ad588a58a": ["source.tamanu.tamanu.roles"], "test.tamanu.source_not_null_tamanu_roles_id.a534c5d463": ["source.tamanu.tamanu.roles"], "test.tamanu.source_not_null_tamanu_roles_name.cfc8ac49ef": ["source.tamanu.tamanu.roles"], "test.tamanu.source_not_null_tamanu_roles_updated_at_sync_tick.7e4ea46e3f": ["source.tamanu.tamanu.roles"], "test.tamanu.source_unique_tamanu_imaging_requests_id.189883862e": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_not_null_tamanu_imaging_requests_id.d663e704e6": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_not_null_tamanu_imaging_requests_created_at.d386c49d0f": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at.ea1a5d3b4f": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error.a9ecb8382a": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_not_null_tamanu_imaging_requests_requested_date.4fe72ce056": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_.6e73984503": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_.120db4235e": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_.d4627e3b55": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_.70fffaafa5": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.locations"], "test.tamanu.source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay.b2d7a7ce17": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_.5f80fa9caf": ["source.tamanu.tamanu.imaging_requests", "source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at_sync_tick.bde3718e92": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_not_null_tamanu_imaging_requests_display_id.7bf4017999": ["source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_unique_tamanu_reference_data_id.f40209ddee": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_id.558d36e056": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_created_at.929d48b0fb": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_updated_at.2d38750dde": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_code.45bb74a969": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_type.be10d4a572": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_name.92065a73ea": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_updated_at_sync_tick.c5ae94a272": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_reference_data_system_required.5345a25d20": ["source.tamanu.tamanu.reference_data"], "test.tamanu.source_unique_tamanu_patient_issues_id.cc84a334be": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_not_null_tamanu_patient_issues_id.90df660f7f": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_not_null_tamanu_patient_issues_created_at.e6b6b24d67": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_not_null_tamanu_patient_issues_updated_at.3d4ab948f0": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_not_null_tamanu_patient_issues_recorded_date.1adb9dcc27": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_not_null_tamanu_patient_issues_type.86926f7218": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_.d2d3f731fb": ["source.tamanu.tamanu.patient_issues", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_issues_updated_at_sync_tick.b613106397": ["source.tamanu.tamanu.patient_issues"], "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_source_start_tick.4b0254a181": ["source.tamanu.tamanu.sync_lookup_ticks"], "test.tamanu.source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.f4830d30b3": ["source.tamanu.tamanu.sync_lookup_ticks"], "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.2552341359": ["source.tamanu.tamanu.sync_lookup_ticks"], "test.tamanu.source_unique_tamanu_settings_id.6bf47c8849": ["source.tamanu.tamanu.settings"], "test.tamanu.source_not_null_tamanu_settings_id.5ec7f45b36": ["source.tamanu.tamanu.settings"], "test.tamanu.source_not_null_tamanu_settings_created_at.8ad3e239a6": ["source.tamanu.tamanu.settings"], "test.tamanu.source_not_null_tamanu_settings_updated_at.9dc40b301e": ["source.tamanu.tamanu.settings"], "test.tamanu.source_not_null_tamanu_settings_key.83ad9711e6": ["source.tamanu.tamanu.settings"], "test.tamanu.source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_.bf1a10aebe": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.settings"], "test.tamanu.source_not_null_tamanu_settings_updated_at_sync_tick.9e782f5b11": ["source.tamanu.tamanu.settings"], "test.tamanu.source_not_null_tamanu_settings_scope.64d1f26cf2": ["source.tamanu.tamanu.settings"], "test.tamanu.source_accepted_values_tamanu_settings_scope__global__central__facility.5ddc355de8": ["source.tamanu.tamanu.settings"], "test.tamanu.source_unique_tamanu_lab_test_panel_requests_id.fa501ddd2c": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_id.41fa505d02": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_created_at.8a393e3d79": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at.f165e4a05b": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id.e533aeba03": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_.1bf2e5a1ff": ["source.tamanu.tamanu.lab_test_panel_requests", "source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_encounter_id.ffb89736d8": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_.01f5be3602": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick.c176776d9d": ["source.tamanu.tamanu.lab_test_panel_requests"], "test.tamanu.source_unique_tamanu_vitals_id.fd030294af": ["source.tamanu.tamanu.vitals"], "test.tamanu.source_not_null_tamanu_vitals_id.18a9bbf45f": ["source.tamanu.tamanu.vitals"], "test.tamanu.source_not_null_tamanu_vitals_created_at.16b6f3a14f": ["source.tamanu.tamanu.vitals"], "test.tamanu.source_not_null_tamanu_vitals_updated_at.a07980dfdb": ["source.tamanu.tamanu.vitals"], "test.tamanu.source_not_null_tamanu_vitals_date_recorded.0d32b23c9f": ["source.tamanu.tamanu.vitals"], "test.tamanu.source_not_null_tamanu_vitals_updated_at_sync_tick.9962306ac1": ["source.tamanu.tamanu.vitals"], "test.tamanu.source_unique_tamanu_imaging_type_external_codes_id.99627516fd": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_id.ad31be3508": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_created_at.e2ccce310c": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at.f2a8814402": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_visibility_status.3ef76c80ff": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_imaging_type_code.6104c70b98": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_code.527d0ff6f5": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick.447d3995ee": ["source.tamanu.tamanu.imaging_type_external_codes"], "test.tamanu.source_unique_tamanu_contributing_death_causes_id.626611e2fa": ["source.tamanu.tamanu.contributing_death_causes"], "test.tamanu.source_not_null_tamanu_contributing_death_causes_id.0c8b2503cb": ["source.tamanu.tamanu.contributing_death_causes"], "test.tamanu.source_not_null_tamanu_contributing_death_causes_time_after_onset.aaabeca43d": ["source.tamanu.tamanu.contributing_death_causes"], "test.tamanu.source_not_null_tamanu_contributing_death_causes_patient_death_data_id.d0b021dec5": ["source.tamanu.tamanu.contributing_death_causes"], "test.tamanu.source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_.404540bf0a": ["source.tamanu.tamanu.contributing_death_causes", "source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_not_null_tamanu_contributing_death_causes_condition_id.7888faae6b": ["source.tamanu.tamanu.contributing_death_causes"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_.677e6eaf1b": ["source.tamanu.tamanu.contributing_death_causes", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick.082b545b7a": ["source.tamanu.tamanu.contributing_death_causes"], "test.tamanu.source_unique_tamanu_user_login_attempts_id.5f14bcd808": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_not_null_tamanu_user_login_attempts_id.41946400e6": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_not_null_tamanu_user_login_attempts_created_at.6e8a042c51": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at.d3d764c50c": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_not_null_tamanu_user_login_attempts_outcome.75b959648c": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_.caa8944999": ["source.tamanu.tamanu.devices", "source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_not_null_tamanu_user_login_attempts_user_id.51a52b5106": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_.e19bccc1a5": ["source.tamanu.tamanu.user_login_attempts", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.4f8f310f05": ["source.tamanu.tamanu.user_login_attempts"], "test.tamanu.source_unique_tamanu_notes_legacy_id.b36a7a24dd": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_id.0ca554e30e": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_created_at.1614bfff1e": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at.9cb08b5b1d": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_record_id.e04f2d4fd5": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_record_type.c368d7d085": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_date.ebfcb3c49c": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_content.88552a0676": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at_sync_tick.935e8256d0": ["source.tamanu.tamanu.notes_legacy"], "test.tamanu.source_unique_tamanu_users_id.b46294f196": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_id.7a4497a05a": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_created_at.7bde2fabde": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_updated_at.63853dad90": ["source.tamanu.tamanu.users"], "test.tamanu.source_unique_tamanu_users_email.e8d696ebe0": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_email.c9dd9cef8c": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_display_name.86d7ca2504": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_role.553b7aa11f": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_updated_at_sync_tick.ddaa25a636": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_visibility_status.48d8ce74c3": ["source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_users_device_registration_quota.06b86bd62e": ["source.tamanu.tamanu.users"], "test.tamanu.dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0.fdd0e2e704": ["source.tamanu.tamanu.users"], "test.tamanu.source_unique_tamanu_location_assignments_id.d7960bf1a5": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_id.f9c655fff8": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_user_id.49ff1e2e9a": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_location_id.4ec3093145": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_date.41611197a6": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_start_time.3eaa8dd9bd": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_end_time.1d084e0550": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_created_at.df3be173f2": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_updated_at.31f65e2832": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_not_null_tamanu_location_assignments_updated_at_sync_tick.b44f74a24f": ["source.tamanu.tamanu.location_assignments"], "test.tamanu.source_unique_tamanu_survey_screen_components_id.83c6daf387": ["source.tamanu.tamanu.survey_screen_components"], "test.tamanu.source_not_null_tamanu_survey_screen_components_id.f2559a7214": ["source.tamanu.tamanu.survey_screen_components"], "test.tamanu.source_not_null_tamanu_survey_screen_components_created_at.e0b4cb2d3f": ["source.tamanu.tamanu.survey_screen_components"], "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at.87177a4413": ["source.tamanu.tamanu.survey_screen_components"], "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at_sync_tick.ac240e6aaa": ["source.tamanu.tamanu.survey_screen_components"], "test.tamanu.source_unique_tamanu_tasks_id.78245a380c": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_id.5bf790bd4a": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_encounter_id.a10fb48922": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_name.2bd48eee09": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_due_time.786df1eb28": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_requested_by_user_id.952e010b84": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_request_time.23dfcbcfc2": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_status.bac3beba06": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_created_at.75a1e0c186": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_updated_at.6e16335296": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_updated_at_sync_tick.1b04cf33ee": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_not_null_tamanu_tasks_task_type.4d57fb7d6d": ["source.tamanu.tamanu.tasks"], "test.tamanu.source_unique_tamanu_imaging_request_areas_id.b9f4c605b2": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_not_null_tamanu_imaging_request_areas_id.3b96eae2fd": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_not_null_tamanu_imaging_request_areas_created_at.bbbd373fe1": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at.aab4a9c280": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_not_null_tamanu_imaging_request_areas_imaging_request_id.c75e5d81dd": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_.ea8a5a0600": ["source.tamanu.tamanu.imaging_request_areas", "source.tamanu.tamanu.imaging_requests"], "test.tamanu.source_not_null_tamanu_imaging_request_areas_area_id.e9e04e2311": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_.6afdf29a06": ["source.tamanu.tamanu.imaging_request_areas", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick.cdbd0a0462": ["source.tamanu.tamanu.imaging_request_areas"], "test.tamanu.source_unique_tamanu_assets_id.0b004e27a6": ["source.tamanu.tamanu.assets"], "test.tamanu.source_not_null_tamanu_assets_id.5903661f6e": ["source.tamanu.tamanu.assets"], "test.tamanu.source_not_null_tamanu_assets_name.9ccba2d3d2": ["source.tamanu.tamanu.assets"], "test.tamanu.source_not_null_tamanu_assets_type.a71e515992": ["source.tamanu.tamanu.assets"], "test.tamanu.source_accepted_values_tamanu_assets_type__image_png__image_svg.4ac901bedb": ["source.tamanu.tamanu.assets"], "test.tamanu.source_not_null_tamanu_assets_data.58f7384f54": ["source.tamanu.tamanu.assets"], "test.tamanu.source_not_null_tamanu_assets_updated_at_sync_tick.6baf11bd0b": ["source.tamanu.tamanu.assets"], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_reference_drug_id.358fa51efa": ["source.tamanu.tamanu.reference_drug_facilities"], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_facility_id.5012dd6aea": ["source.tamanu.tamanu.reference_drug_facilities"], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_created_at.8b63abec3a": ["source.tamanu.tamanu.reference_drug_facilities"], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at.978a5d4017": ["source.tamanu.tamanu.reference_drug_facilities"], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick.26b8e76f96": ["source.tamanu.tamanu.reference_drug_facilities"], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_stock_status.290bc96370": ["source.tamanu.tamanu.reference_drug_facilities"], "test.tamanu.source_unique_tamanu_patient_vrs_data_id.23cca07715": ["source.tamanu.tamanu.patient_vrs_data"], "test.tamanu.source_not_null_tamanu_patient_vrs_data_id.4cc64fcbe6": ["source.tamanu.tamanu.patient_vrs_data"], "test.tamanu.source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_.a8a8eb7561": ["source.tamanu.tamanu.patient_vrs_data", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.37fb7ca437": ["source.tamanu.tamanu.patient_vrs_data"], "test.tamanu.source_unique_tamanu_encounter_pause_prescriptions_id.41bdc9747d": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_id.e57a9fc1b3": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id.fbd245146d": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_duration.dbd59b4962": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit.d2004436c1": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date.e8ca98a8ab": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date.7bc8a722ce": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_created_at.ad1eb449bc": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at.b6f63cea98": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick.242bd8180f": ["source.tamanu.tamanu.encounter_pause_prescriptions"], "test.tamanu.source_unique_tamanu_pharmacy_orders_id.8a0e450c16": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_id.a04c130d73": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.51e116019a": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_encounter_id.5425699795": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_created_at.c5c0ae80b6": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at.5cbf7e3b7d": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.bc9433fa8e": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_is_discharge_prescription.3adc7ce103": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_date.d54f107a00": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_not_null_tamanu_pharmacy_orders_facility_id.9a63aff904": ["source.tamanu.tamanu.pharmacy_orders"], "test.tamanu.source_unique_tamanu_portal_survey_assignments_id.07592792ba": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_id.493854cb01": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_created_at.28c46a0f38": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at.fba08a91b8": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_patient_id.4d329cbe3d": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_survey_id.4c38bb901d": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_status.cbc3f2b455": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_by_id.0e7bb7620f": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick.71bac26d85": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_at.368a678108": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_facility_id.635b864bd0": ["source.tamanu.tamanu.portal_survey_assignments"], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.a16be69527": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.92a5a89a02": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id.35608ab0f8": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"], "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_.930e94d56c": ["source.tamanu.tamanu.lab_test_panel_lab_test_types", "source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id.69ea8c29b8": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"], "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_.ca4f2c354a": ["source.tamanu.tamanu.lab_test_panel_lab_test_types", "source.tamanu.tamanu.lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_order.d0f90d653c": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick.539440bb36": ["source.tamanu.tamanu.lab_test_panel_lab_test_types"], "test.tamanu.source_unique_tamanu_programs_id.62a81a7e37": ["source.tamanu.tamanu.programs"], "test.tamanu.source_not_null_tamanu_programs_id.30041338c4": ["source.tamanu.tamanu.programs"], "test.tamanu.source_not_null_tamanu_programs_created_at.9b5a061fef": ["source.tamanu.tamanu.programs"], "test.tamanu.source_not_null_tamanu_programs_updated_at.1fdd112a50": ["source.tamanu.tamanu.programs"], "test.tamanu.source_not_null_tamanu_programs_updated_at_sync_tick.b90cb49ae9": ["source.tamanu.tamanu.programs"], "test.tamanu.source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.fad79e2999": ["source.tamanu.tamanu.sync_device_ticks"], "test.tamanu.source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.70f0dcb68a": ["source.tamanu.tamanu.sync_device_ticks"], "test.tamanu.source_not_null_tamanu_sync_device_ticks_device_id.6e51235a41": ["source.tamanu.tamanu.sync_device_ticks"], "test.tamanu.source_unique_tamanu_sync_sessions_id.889d1d85c3": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_not_null_tamanu_sync_sessions_id.0f66f04bf1": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_not_null_tamanu_sync_sessions_created_at.0c852b71e6": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_not_null_tamanu_sync_sessions_updated_at.807ac1b19c": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_not_null_tamanu_sync_sessions_start_time.10e3f256db": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_not_null_tamanu_sync_sessions_last_connection_time.c7679203ab": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_not_null_tamanu_sync_sessions_parameters.f21c74e9cb": ["source.tamanu.tamanu.sync_sessions"], "test.tamanu.source_unique_tamanu_invoice_patient_payments_id.31f94704f5": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_id.a2e9c179c4": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.source_unique_tamanu_invoice_patient_payments_invoice_payment_id.6379289247": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_invoice_payment_id.b24d465eaf": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.e12c61546e": ["source.tamanu.tamanu.invoice_patient_payments", "source.tamanu.tamanu.invoice_payments"], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_method_id.49c2b4bb2d": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_.0c32c0d3e1": ["source.tamanu.tamanu.invoice_patient_payments", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_created_at.2612097232": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick.9cbc6365e6": ["source.tamanu.tamanu.invoice_patient_payments"], "test.tamanu.source_unique_tamanu_locations_id.09af17ade1": ["source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_locations_id.406e448574": ["source.tamanu.tamanu.locations"], "test.tamanu.source_unique_tamanu_locations_code.dffad8f5ce": ["source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_locations_code.5c9a7f01c2": ["source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_locations_name.b6c0a3d9c2": ["source.tamanu.tamanu.locations"], "test.tamanu.source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_.def8603286": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.locations"], "test.tamanu.source_accepted_values_tamanu_locations_visibility_status__current__historical.8ec0690204": ["source.tamanu.tamanu.locations"], "test.tamanu.source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_.351ebd459e": ["source.tamanu.tamanu.location_groups", "source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_locations_updated_at_sync_tick.3e72adcac5": ["source.tamanu.tamanu.locations"], "test.tamanu.source_unique_tamanu_portal_users_id.2af5302ce1": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_id.5d79991deb": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_created_at.dd512de83d": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_updated_at.5a6d07bf8a": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_patient_id.f2014094b2": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_unique_tamanu_portal_users_email.4ffb54b9ac": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_email.46b31ee79f": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_status.1904f1c6d7": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_not_null_tamanu_portal_users_updated_at_sync_tick.b6190d5108": ["source.tamanu.tamanu.portal_users"], "test.tamanu.source_unique_tamanu_invoice_item_finalised_insurances_id.7d268a7e0a": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_id.c00db5ebff": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_created_at.c2d663353d": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at.eaa471bbcf": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick.b75138b334": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id.705d63f383": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final.21d527ca7b": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id.61feb9231c": ["source.tamanu.tamanu.invoice_item_finalised_insurances"], "test.tamanu.source_unique_tamanu_task_templates_id.f452d2227f": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_not_null_tamanu_task_templates_id.0933c9bcea": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_unique_tamanu_task_templates_reference_data_id.7d4341b2a8": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_not_null_tamanu_task_templates_reference_data_id.7d5a72304e": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_not_null_tamanu_task_templates_created_at.dc5ea6d6ea": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_not_null_tamanu_task_templates_updated_at.4ff8103b44": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_not_null_tamanu_task_templates_updated_at_sync_tick.91bfaac2c6": ["source.tamanu.tamanu.task_templates"], "test.tamanu.source_unique_tamanu_attachments_id.58d67f1227": ["source.tamanu.tamanu.attachments"], "test.tamanu.source_not_null_tamanu_attachments_id.89138b8f9e": ["source.tamanu.tamanu.attachments"], "test.tamanu.source_not_null_tamanu_attachments_type.3fa788a0f1": ["source.tamanu.tamanu.attachments"], "test.tamanu.source_not_null_tamanu_attachments_data.d8f00c841e": ["source.tamanu.tamanu.attachments"], "test.tamanu.source_not_null_tamanu_attachments_updated_at_sync_tick.964e5f600d": ["source.tamanu.tamanu.attachments"], "test.tamanu.source_not_null_tamanu_translated_strings_string_id.7e37c8c4ad": ["source.tamanu.tamanu.translated_strings"], "test.tamanu.source_not_null_tamanu_translated_strings_language.5db2b5e2e8": ["source.tamanu.tamanu.translated_strings"], "test.tamanu.source_not_null_tamanu_translated_strings_created_at.07e267913e": ["source.tamanu.tamanu.translated_strings"], "test.tamanu.source_not_null_tamanu_translated_strings_updated_at.d1e4d3b582": ["source.tamanu.tamanu.translated_strings"], "test.tamanu.source_not_null_tamanu_translated_strings_updated_at_sync_tick.25a430f1e2": ["source.tamanu.tamanu.translated_strings"], "test.tamanu.source_unique_tamanu_survey_responses_id.7d37627ac3": ["source.tamanu.tamanu.survey_responses"], "test.tamanu.source_not_null_tamanu_survey_responses_id.89723bde14": ["source.tamanu.tamanu.survey_responses"], "test.tamanu.source_not_null_tamanu_survey_responses_created_at.49ae85efe6": ["source.tamanu.tamanu.survey_responses"], "test.tamanu.source_not_null_tamanu_survey_responses_updated_at.1ac4070914": ["source.tamanu.tamanu.survey_responses"], "test.tamanu.source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_.f0ce4a9c90": ["source.tamanu.tamanu.survey_responses", "source.tamanu.tamanu.surveys"], "test.tamanu.source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_.5fa54101ad": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.survey_responses"], "test.tamanu.source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_.2aef705f04": ["source.tamanu.tamanu.survey_responses", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_survey_responses_updated_at_sync_tick.d413782924": ["source.tamanu.tamanu.survey_responses"], "test.tamanu.source_unique_tamanu_devices_id.0507752158": ["source.tamanu.tamanu.devices"], "test.tamanu.source_not_null_tamanu_devices_id.5c11d14906": ["source.tamanu.tamanu.devices"], "test.tamanu.source_not_null_tamanu_devices_created_at.f353e449ee": ["source.tamanu.tamanu.devices"], "test.tamanu.source_not_null_tamanu_devices_updated_at.9667683ae2": ["source.tamanu.tamanu.devices"], "test.tamanu.source_not_null_tamanu_devices_last_seen_at.940293bbb4": ["source.tamanu.tamanu.devices"], "test.tamanu.source_not_null_tamanu_devices_registered_by_id.99c3580040": ["source.tamanu.tamanu.devices"], "test.tamanu.source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_.b7e1d90812": ["source.tamanu.tamanu.devices", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_devices_scopes.a34bba28b6": ["source.tamanu.tamanu.devices"], "test.tamanu.source_unique_tamanu_patient_invoice_insurance_plans_id.d4e0a2e211": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_id.67fd40be6c": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_created_at.558236cf0c": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at.46249b6ee1": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_patient_id.88ff695295": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id.2ce603fd96": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick.0c00fa1166": ["source.tamanu.tamanu.patient_invoice_insurance_plans"], "test.tamanu.source_unique_tamanu_patient_death_data_id.2155f2b6c6": ["source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_not_null_tamanu_patient_death_data_id.61b8d549ff": ["source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_not_null_tamanu_patient_death_data_patient_id.fa93535dcf": ["source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_.2640b3d741": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_death_data_clinician_id.419275886d": ["source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_.12e92239d7": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_.d81577e3c0": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_death_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_.f3a9b1a797": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_.27473a57dc": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_.7ace974f49": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_.1dea4f8138": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_patient_death_data_updated_at_sync_tick.74f83a5b18": ["source.tamanu.tamanu.patient_death_data"], "test.tamanu.source_not_null_tamanu_patient_death_data_is_final.f258620126": ["source.tamanu.tamanu.patient_death_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_.c7596dc8de": ["source.tamanu.tamanu.patient_death_data", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_unique_tamanu_procedure_assistant_clinicians_id.c47366f5e6": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_id.5e29573c0c": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_procedure_id.d372d78257": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_user_id.1c73aa9d80": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_created_at.6b6e8d8caf": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at.29771b97a5": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick.874770378e": ["source.tamanu.tamanu.procedure_assistant_clinicians"], "test.tamanu.source_unique_tamanu_user_facilities_id.30936aeb5a": ["source.tamanu.tamanu.user_facilities"], "test.tamanu.source_not_null_tamanu_user_facilities_id.b28d1c6ab3": ["source.tamanu.tamanu.user_facilities"], "test.tamanu.source_not_null_tamanu_user_facilities_updated_at_sync_tick.14851edb16": ["source.tamanu.tamanu.user_facilities"], "test.tamanu.source_unique_tamanu_document_metadata_id.25fbd602e6": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_not_null_tamanu_document_metadata_id.df7500e31c": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_not_null_tamanu_document_metadata_name.1e7e44b11e": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_not_null_tamanu_document_metadata_type.ad3c33203c": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_not_null_tamanu_document_metadata_document_uploaded_at.3e699cede3": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_.697577ed3b": ["source.tamanu.tamanu.document_metadata", "source.tamanu.tamanu.patients"], "test.tamanu.source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_.58f844c909": ["source.tamanu.tamanu.document_metadata", "source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_document_metadata_attachment_id.73279e3459": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_.422a5cdedd": ["source.tamanu.tamanu.attachments", "source.tamanu.tamanu.document_metadata"], "test.tamanu.source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_.5942352785": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.document_metadata"], "test.tamanu.source_not_null_tamanu_document_metadata_updated_at_sync_tick.818184c71a": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_not_null_tamanu_document_metadata_source.c7dde3dea4": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded.d562bb3947": ["source.tamanu.tamanu.document_metadata"], "test.tamanu.source_unique_tamanu_procedure_type_surveys_id.4813977d15": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_id.846fa7b74b": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_procedure_type_id.05c245e1bc": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_survey_id.8490b1ab3d": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_created_at.f34e2e523c": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at.b5a09d255c": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick.d37ec82a41": ["source.tamanu.tamanu.procedure_type_surveys"], "test.tamanu.source_unique_tamanu_administered_vaccines_id.1b16daae05": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_not_null_tamanu_administered_vaccines_id.71c049c95c": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_not_null_tamanu_administered_vaccines_created_at.311e25104e": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at.81a714c41e": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_not_null_tamanu_administered_vaccines_status.3bf7e20f14": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING.8b8a9d77fd": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.7bc6d9cb6e": ["source.tamanu.tamanu.administered_vaccines", "source.tamanu.tamanu.scheduled_vaccines"], "test.tamanu.source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_.1ab396ce2d": ["source.tamanu.tamanu.administered_vaccines", "source.tamanu.tamanu.encounters"], "test.tamanu.source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other.a34597923c": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at_sync_tick.1f4a79d8c1": ["source.tamanu.tamanu.administered_vaccines"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_.8bc715362f": ["source.tamanu.tamanu.administered_vaccines", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_unique_tamanu_report_definition_versions_id.fc34f6d49c": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_not_null_tamanu_report_definition_versions_id.aeefc85efc": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_not_null_tamanu_report_definition_versions_version_number.a1c7832d22": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_not_null_tamanu_report_definition_versions_status.b2ccf6ba31": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_accepted_values_tamanu_report_definition_versions_status__draft__published.7b945f9a74": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_.b208147bc2": ["source.tamanu.tamanu.report_definition_versions", "source.tamanu.tamanu.report_definitions"], "test.tamanu.source_not_null_tamanu_report_definition_versions_user_id.c3351f91fd": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_.53887ef192": ["source.tamanu.tamanu.report_definition_versions", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_report_definition_versions_updated_at_sync_tick.c11a1df762": ["source.tamanu.tamanu.report_definition_versions"], "test.tamanu.source_unique_tamanu_sync_lookup_id.dc05d15b43": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_id.e77326bde2": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_record_id.39e7bce4d2": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_record_type.f0bc60b21f": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_data.aadfed61f6": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_updated_at_sync_tick.902ae4ae9c": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_.07efccc886": ["source.tamanu.tamanu.patients", "source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_.f3141bec3e": ["source.tamanu.tamanu.encounters", "source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_.c67a117f63": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_is_lab_request.dbe4ce8b63": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_not_null_tamanu_sync_lookup_is_deleted.356b4fa211": ["source.tamanu.tamanu.sync_lookup"], "test.tamanu.source_unique_tamanu_encounter_prescriptions_id.6371d45cc1": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_id.3be49c8399": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_encounter_id.ea618fdd05": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_prescription_id.485995235b": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge.621eb1bc4b": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_created_at.777fb22523": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at.cc684b1350": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick.b07eb557ab": ["source.tamanu.tamanu.encounter_prescriptions"], "test.tamanu.source_unique_tamanu_notifications_id.51d3db417b": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_id.04c2f24f06": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_type.a007c8bb26": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_status.74f6b456fc": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_user_id.72a5473ae9": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_created_time.5a54e4d785": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_metadata.054778f4a5": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_created_at.8d2ded1ce7": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_updated_at.ae82c65f62": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_not_null_tamanu_notifications_updated_at_sync_tick.9098dc98f2": ["source.tamanu.tamanu.notifications"], "test.tamanu.source_unique_tamanu_reference_medication_templates_id.9c50848c51": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_id.f4e40f0746": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_reference_data_id.655683c6a0": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_medication_id.050df86e27": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_variable_dose.13556de3df": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_prn.6fb35e8eed": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_units.692f7068eb": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_frequency.af51280e00": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_route.a182c49081": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_created_at.f610fc9916": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at.b43c9d5e62": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick.cd13e259c4": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_ongoing.a2332da0d1": ["source.tamanu.tamanu.reference_medication_templates"], "test.tamanu.source_unique_tamanu_patient_conditions_id.1b1daf4d86": ["source.tamanu.tamanu.patient_conditions"], "test.tamanu.source_not_null_tamanu_patient_conditions_id.5d2e0fb3a9": ["source.tamanu.tamanu.patient_conditions"], "test.tamanu.source_not_null_tamanu_patient_conditions_created_at.deda3b580a": ["source.tamanu.tamanu.patient_conditions"], "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at.1dc42ed219": ["source.tamanu.tamanu.patient_conditions"], "test.tamanu.source_not_null_tamanu_patient_conditions_recorded_date.91d95abca2": ["source.tamanu.tamanu.patient_conditions"], "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at_sync_tick.2e7535fcbb": ["source.tamanu.tamanu.patient_conditions"], "test.tamanu.source_unique_tamanu_survey_response_answers_id.9ab12c2f4a": ["source.tamanu.tamanu.survey_response_answers"], "test.tamanu.source_not_null_tamanu_survey_response_answers_id.a1a5252fba": ["source.tamanu.tamanu.survey_response_answers"], "test.tamanu.source_not_null_tamanu_survey_response_answers_created_at.6a14b3247f": ["source.tamanu.tamanu.survey_response_answers"], "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at.e9d87e13d5": ["source.tamanu.tamanu.survey_response_answers"], "test.tamanu.source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_.f49aacfe3d": ["source.tamanu.tamanu.survey_response_answers", "source.tamanu.tamanu.survey_responses"], "test.tamanu.source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_.a34b366f2b": ["source.tamanu.tamanu.program_data_elements", "source.tamanu.tamanu.survey_response_answers"], "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at_sync_tick.23337bdabf": ["source.tamanu.tamanu.survey_response_answers"], "test.tamanu.source_unique_tamanu_reference_data_relations_id.0fd94d2b7e": ["source.tamanu.tamanu.reference_data_relations"], "test.tamanu.source_not_null_tamanu_reference_data_relations_id.6816cc32f5": ["source.tamanu.tamanu.reference_data_relations"], "test.tamanu.source_not_null_tamanu_reference_data_relations_created_at.c605cb5fd3": ["source.tamanu.tamanu.reference_data_relations"], "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at.1731c2aeb8": ["source.tamanu.tamanu.reference_data_relations"], "test.tamanu.source_not_null_tamanu_reference_data_relations_type.16a6b96610": ["source.tamanu.tamanu.reference_data_relations"], "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at_sync_tick.b7d71eb49b": ["source.tamanu.tamanu.reference_data_relations"], "test.tamanu.source_unique_tamanu_task_template_designations_id.d2b5b4576a": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_not_null_tamanu_task_template_designations_id.b21ed442a4": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_not_null_tamanu_task_template_designations_task_template_id.7cd91a06a9": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_not_null_tamanu_task_template_designations_designation_id.08e232161f": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_not_null_tamanu_task_template_designations_created_at.c02e7baa62": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at.8c60186f8d": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at_sync_tick.a7118edaf1": ["source.tamanu.tamanu.task_template_designations"], "test.tamanu.source_unique_tamanu_permissions_id.f42c77c5be": ["source.tamanu.tamanu.permissions"], "test.tamanu.source_not_null_tamanu_permissions_id.6ee02405bb": ["source.tamanu.tamanu.permissions"], "test.tamanu.source_not_null_tamanu_permissions_role_id.de3cb0b624": ["source.tamanu.tamanu.permissions"], "test.tamanu.source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_.5a5a1be407": ["source.tamanu.tamanu.permissions", "source.tamanu.tamanu.roles"], "test.tamanu.source_not_null_tamanu_permissions_noun.e00a302536": ["source.tamanu.tamanu.permissions"], "test.tamanu.source_not_null_tamanu_permissions_verb.7e7206e395": ["source.tamanu.tamanu.permissions"], "test.tamanu.source_not_null_tamanu_permissions_updated_at_sync_tick.cb90c585be": ["source.tamanu.tamanu.permissions"], "test.tamanu.source_unique_tamanu_patient_field_definition_categories_id.7b788d0c37": ["source.tamanu.tamanu.patient_field_definition_categories"], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_id.a80a45d121": ["source.tamanu.tamanu.patient_field_definition_categories"], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_created_at.aca434dbf3": ["source.tamanu.tamanu.patient_field_definition_categories"], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at.f6f9f3ee6a": ["source.tamanu.tamanu.patient_field_definition_categories"], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_name.a7913c1d45": ["source.tamanu.tamanu.patient_field_definition_categories"], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick.e345b399c6": ["source.tamanu.tamanu.patient_field_definition_categories"], "test.tamanu.source_unique_tamanu_medication_administration_record_doses_id.433dfbdead": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_id.a52e3aa0c8": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_amount.331e93abb3": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_time.1ccce1a649": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_by_user_id.65d6a1441b": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id.a78608d49f": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_mar_id.5c2f68633d": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_created_at.d2ae234e45": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at.3bad2c9822": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick.fc7397bf69": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_index.c22ff9799c": ["source.tamanu.tamanu.medication_administration_record_doses"], "test.tamanu.source_unique_tamanu_facilities_id.9e454badf4": ["source.tamanu.tamanu.facilities"], "test.tamanu.source_not_null_tamanu_facilities_id.ad186295b9": ["source.tamanu.tamanu.facilities"], "test.tamanu.source_not_null_tamanu_facilities_code.55fbf8c36c": ["source.tamanu.tamanu.facilities"], "test.tamanu.source_not_null_tamanu_facilities_name.9ac276f33d": ["source.tamanu.tamanu.facilities"], "test.tamanu.source_accepted_values_tamanu_facilities_visibility_status__current__historical.1f32aa4a9d": ["source.tamanu.tamanu.facilities"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_.0a191fc0e4": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_facilities_updated_at_sync_tick.5ebc0505a1": ["source.tamanu.tamanu.facilities"], "test.tamanu.source_not_null_tamanu_facilities_is_sensitive.83efc1299f": ["source.tamanu.tamanu.facilities"], "test.tamanu.source_unique_tamanu_encounter_history_id.b5104bb3a4": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_id.98f4907b32": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_created_at.d7d91fd2e8": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_updated_at.cafd8d5cb6": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_date.5840578e29": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_encounter_id.5d9223d72c": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_.98ae5b7d3b": ["source.tamanu.tamanu.encounter_history", "source.tamanu.tamanu.encounters"], "test.tamanu.source_not_null_tamanu_encounter_history_department_id.2bf94ddc1c": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_.cc3dcc54fd": ["source.tamanu.tamanu.departments", "source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_location_id.5b7796abc8": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_.c9d4f477fb": ["source.tamanu.tamanu.encounter_history", "source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_encounter_history_examiner_id.96fc96334d": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_.b2d555c7b6": ["source.tamanu.tamanu.encounter_history", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_encounter_history_encounter_type.a7b6e21a3c": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.af58070d62": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_not_null_tamanu_encounter_history_updated_at_sync_tick.6ea4b7b4cd": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_.fbf272ed47": ["source.tamanu.tamanu.encounter_history", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_encounter_history_change_type.53d3e33bca": ["source.tamanu.tamanu.encounter_history"], "test.tamanu.source_unique_tamanu_patient_program_registrations_id.82d7fead9b": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_id.3e27cbc953": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_created_at.b6bbcb66a6": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at.7b0cb3a4d3": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_date.ee77ca5f67": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_registration_status.f99db0e260": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_patient_id.21a8bab832": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_.edaef8726f": ["source.tamanu.tamanu.patient_program_registrations", "source.tamanu.tamanu.patients"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_program_registry_id.c9b21e72ac": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_.ca26255395": ["source.tamanu.tamanu.patient_program_registrations", "source.tamanu.tamanu.program_registries"], "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_.f60ae13805": ["source.tamanu.tamanu.patient_program_registrations", "source.tamanu.tamanu.program_registry_clinical_statuses"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_clinician_id.f5eec02863": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_.660ded928b": ["source.tamanu.tamanu.patient_program_registrations", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_.0915c99f9a": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_.e70f29b144": ["source.tamanu.tamanu.facilities", "source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_.db6437c554": ["source.tamanu.tamanu.patient_program_registrations", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick.6e539b8d2d": ["source.tamanu.tamanu.patient_program_registrations"], "test.tamanu.source_unique_tamanu_lab_test_panels_id.509550e62b": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panels_id.11a6b51e6b": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panels_created_at.da26e7a248": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at.b4f58197df": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panels_name.3fdd4c9c83": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panels_code.41611b6a55": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_not_null_tamanu_lab_test_panels_visibility_status.482b848a4d": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_.f5578be7c6": ["source.tamanu.tamanu.lab_test_panels", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.bd90caed16": ["source.tamanu.tamanu.lab_test_panels"], "test.tamanu.source_unique_tamanu_appointments_id.5632c4fc60": ["source.tamanu.tamanu.appointments"], "test.tamanu.source_not_null_tamanu_appointments_id.d1a6de3ce4": ["source.tamanu.tamanu.appointments"], "test.tamanu.source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_.994c2060a5": ["source.tamanu.tamanu.appointments", "source.tamanu.tamanu.patients"], "test.tamanu.source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_.b2920f6fec": ["source.tamanu.tamanu.appointments", "source.tamanu.tamanu.users"], "test.tamanu.source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_.894dbd0b29": ["source.tamanu.tamanu.appointments", "source.tamanu.tamanu.locations"], "test.tamanu.source_not_null_tamanu_appointments_type_legacy.cd7aaf3419": ["source.tamanu.tamanu.appointments"], "test.tamanu.source_not_null_tamanu_appointments_status.3078c54556": ["source.tamanu.tamanu.appointments"], "test.tamanu.source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled.2b51753ed0": ["source.tamanu.tamanu.appointments"], "test.tamanu.source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_.b603c9c40f": ["source.tamanu.tamanu.appointments", "source.tamanu.tamanu.location_groups"], "test.tamanu.source_not_null_tamanu_appointments_updated_at_sync_tick.fc1a99ab76": ["source.tamanu.tamanu.appointments"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_.e993598733": ["source.tamanu.tamanu.appointments", "source.tamanu.tamanu.reference_data"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_.d6a8261230": ["source.tamanu.tamanu.appointments", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_appointments_is_high_priority.3c2beccb9c": ["source.tamanu.tamanu.appointments"], "test.tamanu.source_unique_tamanu_patient_family_histories_id.403e2d1751": ["source.tamanu.tamanu.patient_family_histories"], "test.tamanu.source_not_null_tamanu_patient_family_histories_id.d2d0e80b7f": ["source.tamanu.tamanu.patient_family_histories"], "test.tamanu.source_not_null_tamanu_patient_family_histories_created_at.8ee5173bfa": ["source.tamanu.tamanu.patient_family_histories"], "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at.c710d3b7b3": ["source.tamanu.tamanu.patient_family_histories"], "test.tamanu.source_not_null_tamanu_patient_family_histories_recorded_date.ec1039e1d3": ["source.tamanu.tamanu.patient_family_histories"], "test.tamanu.source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_.3f50556d92": ["source.tamanu.tamanu.patient_family_histories", "source.tamanu.tamanu.patients"], "test.tamanu.source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_.1464fe93d6": ["source.tamanu.tamanu.patient_family_histories", "source.tamanu.tamanu.users"], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.569a8c1cce": ["source.tamanu.tamanu.patient_family_histories", "source.tamanu.tamanu.reference_data"], "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at_sync_tick.eff3f46718": ["source.tamanu.tamanu.patient_family_histories"], "test.tamanu.source_unique_tamanu_ips_requests_id.3f494ccf34": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_id.82d75ba779": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_created_at.28215c9764": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_updated_at.b1c150635e": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_patient_id.b5ad6ea558": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_created_by.943d0fec8d": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_.9e7a2bec9f": ["source.tamanu.tamanu.ips_requests", "source.tamanu.tamanu.users"], "test.tamanu.source_not_null_tamanu_ips_requests_status.680fa2f376": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_email.29f30a58bf": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_not_null_tamanu_ips_requests_updated_at_sync_tick.72991067d9": ["source.tamanu.tamanu.ips_requests"], "test.tamanu.source_unique_tamanu_user_recently_viewed_patients_id.723cf05c7a": ["source.tamanu.tamanu.user_recently_viewed_patients"], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_id.0772796918": ["source.tamanu.tamanu.user_recently_viewed_patients"], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_created_at.60a2cd8b3e": ["source.tamanu.tamanu.user_recently_viewed_patients"], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_updated_at.f76b5440b3": ["source.tamanu.tamanu.user_recently_viewed_patients"], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_user_id.8e3a703839": ["source.tamanu.tamanu.user_recently_viewed_patients"], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_patient_id.3c02c3c6e8": ["source.tamanu.tamanu.user_recently_viewed_patients"], "test.tamanu.source_unique_tamanu_sync_queued_devices_id.6c914cf2fe": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_id.8a7ff7ff9d": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_seen_time.e49db9d307": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_synced_tick.ebca46f7d5": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_urgent.cdd3e5fe6d": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_created_at.ca84df51b3": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_updated_at.3c113842b4": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_not_null_tamanu_sync_queued_devices_facility_ids.1c565eb9fd": ["source.tamanu.tamanu.sync_queued_devices"], "test.tamanu.source_unique_tamanu_patient_secondary_ids_id.3ac199e68c": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_id.c12a4d4ff4": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_value.ecfec42154": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_visibility_status.687573a37f": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_type_id.1c5040f680": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_patient_id.b8437631c2": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick.f04774a463": ["source.tamanu.tamanu.patient_secondary_ids"], "test.tamanu.source_unique_tamanu_lab_request_attachments_id.b7eb3f1eb1": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_not_null_tamanu_lab_request_attachments_id.6f2075f317": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_not_null_tamanu_lab_request_attachments_created_at.b587e22da8": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at.ce5b0e489b": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_not_null_tamanu_lab_request_attachments_attachment_id.6a6139cc22": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_.eff1df818f": ["source.tamanu.tamanu.attachments", "source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_not_null_tamanu_lab_request_attachments_lab_request_id.15bc6fc2df": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_.8995368506": ["source.tamanu.tamanu.lab_request_attachments", "source.tamanu.tamanu.lab_requests"], "test.tamanu.source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_.5c53ecfc7d": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick.a0d8b0a6ba": ["source.tamanu.tamanu.lab_request_attachments"], "test.tamanu.source_unique_tamanu_vital_logs_id.3a1b593bf4": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_not_null_tamanu_vital_logs_id.2865672c8c": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_not_null_tamanu_vital_logs_created_at.1c50457539": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_not_null_tamanu_vital_logs_updated_at.fad4900972": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_not_null_tamanu_vital_logs_date.19b648a68b": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error.f8319959ff": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_.7c5a5dd055": ["source.tamanu.tamanu.users", "source.tamanu.tamanu.vital_logs"], "test.tamanu.source_not_null_tamanu_vital_logs_answer_id.a061b3580d": ["source.tamanu.tamanu.vital_logs"], "test.tamanu.source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_.345fc6ff26": ["source.tamanu.tamanu.survey_response_answers", "source.tamanu.tamanu.vital_logs"], "test.tamanu.source_not_null_tamanu_vital_logs_updated_at_sync_tick.8257970877": ["source.tamanu.tamanu.vital_logs"], "source.tamanu.fhir__tamanu.specimens": [], "source.tamanu.fhir__tamanu.non_fhir_medici_report": [], "source.tamanu.fhir__tamanu.encounters": [], "source.tamanu.fhir__tamanu.patients": [], "source.tamanu.fhir__tamanu.medication_requests": [], "source.tamanu.fhir__tamanu.service_requests": [], "source.tamanu.fhir__tamanu.jobs": [], "source.tamanu.fhir__tamanu.job_workers": [], "source.tamanu.fhir__tamanu.immunizations": [], "source.tamanu.fhir__tamanu.organizations": [], "source.tamanu.fhir__tamanu.practitioners": [], "source.tamanu.logs__tamanu.migrations": [], "source.tamanu.logs__tamanu.changes": [], "source.tamanu.logs__tamanu.dhis2_pushes": [], "source.tamanu.logs__tamanu.debug_logs": [], "source.tamanu.logs__tamanu.accesses": [], "source.tamanu.logs__tamanu.fhir_writes": [], "source.tamanu.tamanu.patient_allergies": [], "source.tamanu.tamanu.triages": [], "source.tamanu.tamanu.imaging_area_external_codes": [], "source.tamanu.tamanu.socket_io_attachments": [], "source.tamanu.tamanu.report_definitions": [], "source.tamanu.tamanu.one_time_logins": [], "source.tamanu.tamanu.invoice_price_lists": [], "source.tamanu.tamanu.patient_contacts": [], "source.tamanu.tamanu.certificate_notifications": [], "source.tamanu.tamanu.medication_administration_records": [], "source.tamanu.tamanu.templates": [], "source.tamanu.tamanu.program_registry_condition_categories": [], "source.tamanu.tamanu.procedure_survey_responses": [], "source.tamanu.tamanu.pharmacy_order_prescriptions": [], "source.tamanu.tamanu.location_groups": [], "source.tamanu.tamanu.invoice_products": [], "source.tamanu.tamanu.certifiable_vaccines": [], "source.tamanu.tamanu.task_designations": [], "source.tamanu.tamanu.appointment_schedules": [], "source.tamanu.tamanu.scheduled_vaccines": [], "source.tamanu.tamanu.user_localisation_caches": [], "source.tamanu.tamanu.invoice_item_discounts": [], "source.tamanu.tamanu.portal_one_time_tokens": [], "source.tamanu.tamanu.invoice_discounts": [], "source.tamanu.tamanu.program_registry_conditions": [], "source.tamanu.tamanu.invoice_payments": [], "source.tamanu.tamanu.patient_additional_data": [], "source.tamanu.tamanu.upcoming_vaccinations": [], "source.tamanu.tamanu.user_preferences": [], "source.tamanu.tamanu.patient_field_values": [], "source.tamanu.tamanu.referrals": [], "source.tamanu.tamanu.lab_request_logs": [], "source.tamanu.tamanu.user_leaves": [], "source.tamanu.tamanu.user_designations": [], "source.tamanu.tamanu.patient_field_definitions": [], "source.tamanu.tamanu.lab_test_types": [], "source.tamanu.tamanu.prescriptions": [], "source.tamanu.tamanu.medication_dispenses": [], "source.tamanu.tamanu.encounters": [], "source.tamanu.tamanu.encounter_diets": [], "source.tamanu.tamanu.encounter_diagnoses": [], "source.tamanu.tamanu.program_data_elements": [], "source.tamanu.tamanu.patient_birth_data": [], "source.tamanu.tamanu.program_registries": [], "source.tamanu.tamanu.invoice_insurance_plans": [], "source.tamanu.tamanu.note_items": [], "source.tamanu.tamanu.encounter_pause_prescription_histories": [], "source.tamanu.tamanu.program_registry_clinical_statuses": [], "source.tamanu.tamanu.local_system_facts": [], "source.tamanu.tamanu.invoices_invoice_insurance_plans": [], "source.tamanu.tamanu.refresh_tokens": [], "source.tamanu.tamanu.death_revert_logs": [], "source.tamanu.tamanu.patient_program_registration_conditions": [], "source.tamanu.tamanu.patients": [], "source.tamanu.tamanu.departments": [], "source.tamanu.tamanu.note_pages": [], "source.tamanu.tamanu.invoice_insurance_plan_items": [], "source.tamanu.tamanu.lab_tests": [], "source.tamanu.tamanu.invoice_items": [], "source.tamanu.tamanu.lab_requests": [], "source.tamanu.tamanu.SequelizeMeta": [], "source.tamanu.tamanu.invoices": [], "source.tamanu.tamanu.patient_communications": [], "source.tamanu.tamanu.signers_historical": [], "source.tamanu.tamanu.invoice_price_list_items": [], "source.tamanu.tamanu.notes": [], "source.tamanu.tamanu.imaging_results": [], "source.tamanu.tamanu.discharges": [], "source.tamanu.tamanu.patient_ongoing_prescriptions": [], "source.tamanu.tamanu.location_assignment_templates": [], "source.tamanu.tamanu.patient_facilities": [], "source.tamanu.tamanu.patient_care_plans": [], "source.tamanu.tamanu.surveys": [], "source.tamanu.tamanu.appointment_procedure_types": [], "source.tamanu.tamanu.report_requests": [], "source.tamanu.tamanu.reference_drugs": [], "source.tamanu.tamanu.invoice_insurer_payments": [], "source.tamanu.tamanu.procedures": [], "source.tamanu.tamanu.roles": [], "source.tamanu.tamanu.imaging_requests": [], "source.tamanu.tamanu.reference_data": [], "source.tamanu.tamanu.patient_issues": [], "source.tamanu.tamanu.sync_lookup_ticks": [], "source.tamanu.tamanu.settings": [], "source.tamanu.tamanu.lab_test_panel_requests": [], "source.tamanu.tamanu.vitals": [], "source.tamanu.tamanu.imaging_type_external_codes": [], "source.tamanu.tamanu.contributing_death_causes": [], "source.tamanu.tamanu.user_login_attempts": [], "source.tamanu.tamanu.notes_legacy": [], "source.tamanu.tamanu.users": [], "source.tamanu.tamanu.location_assignments": [], "source.tamanu.tamanu.survey_screen_components": [], "source.tamanu.tamanu.tasks": [], "source.tamanu.tamanu.imaging_request_areas": [], "source.tamanu.tamanu.assets": [], "source.tamanu.tamanu.reference_drug_facilities": [], "source.tamanu.tamanu.patient_vrs_data": [], "source.tamanu.tamanu.encounter_pause_prescriptions": [], "source.tamanu.tamanu.pharmacy_orders": [], "source.tamanu.tamanu.portal_survey_assignments": [], "source.tamanu.tamanu.lab_test_panel_lab_test_types": [], "source.tamanu.tamanu.programs": [], "source.tamanu.tamanu.sync_device_ticks": [], "source.tamanu.tamanu.sync_sessions": [], "source.tamanu.tamanu.invoice_patient_payments": [], "source.tamanu.tamanu.locations": [], "source.tamanu.tamanu.portal_users": [], "source.tamanu.tamanu.invoice_item_finalised_insurances": [], "source.tamanu.tamanu.task_templates": [], "source.tamanu.tamanu.attachments": [], "source.tamanu.tamanu.translated_strings": [], "source.tamanu.tamanu.survey_responses": [], "source.tamanu.tamanu.devices": [], "source.tamanu.tamanu.patient_invoice_insurance_plans": [], "source.tamanu.tamanu.patient_death_data": [], "source.tamanu.tamanu.procedure_assistant_clinicians": [], "source.tamanu.tamanu.user_facilities": [], "source.tamanu.tamanu.document_metadata": [], "source.tamanu.tamanu.procedure_type_surveys": [], "source.tamanu.tamanu.administered_vaccines": [], "source.tamanu.tamanu.report_definition_versions": [], "source.tamanu.tamanu.sync_lookup": [], "source.tamanu.tamanu.encounter_prescriptions": [], "source.tamanu.tamanu.notifications": [], "source.tamanu.tamanu.reference_medication_templates": [], "source.tamanu.tamanu.patient_conditions": [], "source.tamanu.tamanu.survey_response_answers": [], "source.tamanu.tamanu.reference_data_relations": [], "source.tamanu.tamanu.task_template_designations": [], "source.tamanu.tamanu.permissions": [], "source.tamanu.tamanu.patient_field_definition_categories": [], "source.tamanu.tamanu.medication_administration_record_doses": [], "source.tamanu.tamanu.facilities": [], "source.tamanu.tamanu.encounter_history": [], "source.tamanu.tamanu.patient_program_registrations": [], "source.tamanu.tamanu.lab_test_panels": [], "source.tamanu.tamanu.appointments": [], "source.tamanu.tamanu.patient_family_histories": [], "source.tamanu.tamanu.ips_requests": [], "source.tamanu.tamanu.user_recently_viewed_patients": [], "source.tamanu.tamanu.sync_queued_devices": [], "source.tamanu.tamanu.patient_secondary_ids": [], "source.tamanu.tamanu.lab_request_attachments": [], "source.tamanu.tamanu.vital_logs": []}, "child_map": {"test.tamanu.source_unique_fhir__tamanu_specimens_id.7d00fb0248": [], "test.tamanu.source_not_null_fhir__tamanu_specimens_id.7098c20560": [], "test.tamanu.source_not_null_fhir__tamanu_specimens_version_id.a13ea95e5c": [], "test.tamanu.source_not_null_fhir__tamanu_specimens_upstream_id.f9565a425c": [], "test.tamanu.source_not_null_fhir__tamanu_specimens_last_updated.6f9a98122d": [], "test.tamanu.source_not_null_fhir__tamanu_specimens_is_live.99d3cadd54": [], "test.tamanu.source_not_null_fhir__tamanu_specimens_resolved.80b78d06fe": [], "test.tamanu.source_unique_fhir__tamanu_non_fhir_medici_report_id.0e2dad7c7b": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_id.ed54e5fea6": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.adc82d8370": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.68db39c9c1": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated.ab705926fd": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.3bb8a03bae": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.21865513be": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.cb5b40a829": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_sex.dfa61ee459": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id.5521fce097": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date.4142e92001": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.ee7f06020a": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.8f4e5b7426": [], "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.592feba481": [], "test.tamanu.source_unique_fhir__tamanu_encounters_id.bdda44ec81": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_id.5459be3bbc": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_version_id.8f4dcb3a64": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_upstream_id.9257212a57": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_last_updated.199565a5e7": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_status.7255ffba7d": [], "test.tamanu.source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged.ea2dd4dc2a": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_is_live.c401845261": [], "test.tamanu.source_not_null_fhir__tamanu_encounters_resolved.8217d372c8": [], "test.tamanu.source_unique_fhir__tamanu_patients_id.85cfe6c3ea": [], "test.tamanu.source_not_null_fhir__tamanu_patients_id.0c43d4a03e": [], "test.tamanu.source_not_null_fhir__tamanu_patients_version_id.6f3ced7026": [], "test.tamanu.source_not_null_fhir__tamanu_patients_upstream_id.dc466caaf3": [], "test.tamanu.source_not_null_fhir__tamanu_patients_last_updated.65b7545398": [], "test.tamanu.source_not_null_fhir__tamanu_patients_identifier.96f86bad18": [], "test.tamanu.source_not_null_fhir__tamanu_patients_active.922409a478": [], "test.tamanu.source_not_null_fhir__tamanu_patients_name.0e7b5767d3": [], "test.tamanu.source_not_null_fhir__tamanu_patients_telecom.9515617b10": [], "test.tamanu.source_not_null_fhir__tamanu_patients_gender.a288fa3d46": [], "test.tamanu.source_not_null_fhir__tamanu_patients_address.1e80038399": [], "test.tamanu.source_not_null_fhir__tamanu_patients_extension.e3b05cb34a": [], "test.tamanu.source_not_null_fhir__tamanu_patients_is_live.f6662d2722": [], "test.tamanu.source_not_null_fhir__tamanu_patients_resolved.f5739ac9ca": [], "test.tamanu.source_unique_fhir__tamanu_medication_requests_id.538c5993b6": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_id.7fa1f94c15": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_version_id.21066cfc57": [], "test.tamanu.source_unique_fhir__tamanu_medication_requests_upstream_id.73906b5380": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_upstream_id.354715d4f3": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_last_updated.26ce392978": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_status.24aa06df0c": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_intent.063b6ce234": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_resolved.d4ecb04fda": [], "test.tamanu.source_not_null_fhir__tamanu_medication_requests_is_live.d31095549d": [], "test.tamanu.source_unique_fhir__tamanu_service_requests_id.e6a309054d": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_id.a59c3d7e06": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_version_id.136a4ee810": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_upstream_id.81cbc8acb4": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_last_updated.e3657976a4": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_identifier.73b3472574": [], "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown.08fbf0e1e4": [], "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_intent__order.a25886f00a": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_category.af95957557": [], "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat.abe483e472": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_order_detail.be8e9124fc": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_location_code.c8c33ef722": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_is_live.0922cb4130": [], "test.tamanu.source_not_null_fhir__tamanu_service_requests_resolved.92e4b8bf48": [], "test.tamanu.source_unique_fhir__tamanu_jobs_id.96f908c26e": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_id.51acd6ac1e": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_created_at.6a7f288177": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_updated_at.90a980bdc8": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_priority.2313d9b744": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_status.efd7e342aa": [], "test.tamanu.source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored.42189fdf8f": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_topic.98c2f9b4b2": [], "test.tamanu.source_unique_fhir__tamanu_jobs_discriminant.22b1361683": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_discriminant.5c7d80ea70": [], "test.tamanu.source_not_null_fhir__tamanu_jobs_payload.20e661456f": [], "test.tamanu.source_unique_fhir__tamanu_job_workers_id.dee0269c4e": [], "test.tamanu.source_not_null_fhir__tamanu_job_workers_id.c3476b3eb9": [], "test.tamanu.source_not_null_fhir__tamanu_job_workers_created_at.860a644fd1": [], "test.tamanu.source_not_null_fhir__tamanu_job_workers_updated_at.0fe62e1558": [], "test.tamanu.source_not_null_fhir__tamanu_job_workers_metadata.e61a2ced27": [], "test.tamanu.source_unique_fhir__tamanu_immunizations_id.596d017734": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_id.7f90c3dd59": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_version_id.f3bbf1cc3b": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_upstream_id.5882d9e14e": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_last_updated.62a54529c6": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_status.4ce41d1f44": [], "test.tamanu.source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done.38601d1fe7": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_vaccine_code.ed1ac8c537": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_patient.8dcba1e0e1": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_site.b1fa3dddbb": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_performer.29b3a99986": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_protocol_applied.563e648d14": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_is_live.f8992f894b": [], "test.tamanu.source_not_null_fhir__tamanu_immunizations_resolved.ff096f7b43": [], "test.tamanu.source_unique_fhir__tamanu_organizations_id.e211eaf17e": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_id.ac18b655d1": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_version_id.f0fa91055e": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_upstream_id.3c212df269": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_last_updated.c79b2ea09a": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_name.9dbf1f951c": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_is_live.edc801380a": [], "test.tamanu.source_not_null_fhir__tamanu_organizations_resolved.813365ad2b": [], "test.tamanu.source_unique_fhir__tamanu_practitioners_id.a2b4a981a6": [], "test.tamanu.source_not_null_fhir__tamanu_practitioners_id.296f73c09b": [], "test.tamanu.source_not_null_fhir__tamanu_practitioners_version_id.42684fbfa8": [], "test.tamanu.source_not_null_fhir__tamanu_practitioners_upstream_id.3446e5bb3c": [], "test.tamanu.source_not_null_fhir__tamanu_practitioners_last_updated.324d60604b": [], "test.tamanu.source_not_null_fhir__tamanu_practitioners_is_live.f0077a943a": [], "test.tamanu.source_not_null_fhir__tamanu_practitioners_resolved.18050ffab2": [], "test.tamanu.source_unique_logs__tamanu_migrations_id.12ea87b61e": [], "test.tamanu.source_not_null_logs__tamanu_migrations_id.5638ece336": [], "test.tamanu.source_not_null_logs__tamanu_migrations_logged_at.9b591e2016": [], "test.tamanu.source_not_null_logs__tamanu_migrations_record_sync_tick.ddbd48d1c1": [], "test.tamanu.source_not_null_logs__tamanu_migrations_device_id.30a569c46c": [], "test.tamanu.source_not_null_logs__tamanu_migrations_version.ad4fd97571": [], "test.tamanu.source_not_null_logs__tamanu_migrations_direction.c83fad8f7e": [], "test.tamanu.source_not_null_logs__tamanu_migrations_migrations.bf597438c3": [], "test.tamanu.source_not_null_logs__tamanu_migrations_updated_at_sync_tick.2ee4244e54": [], "test.tamanu.source_unique_logs__tamanu_changes_id.dd0bf715d9": [], "test.tamanu.source_not_null_logs__tamanu_changes_id.866e117189": [], "test.tamanu.source_not_null_logs__tamanu_changes_table_oid.b9844b50e8": [], "test.tamanu.source_not_null_logs__tamanu_changes_table_schema.3e59c96f61": [], "test.tamanu.source_not_null_logs__tamanu_changes_table_name.0b42537bc6": [], "test.tamanu.source_not_null_logs__tamanu_changes_logged_at.1def9d3088": [], "test.tamanu.source_not_null_logs__tamanu_changes_created_at.3b82d26023": [], "test.tamanu.source_not_null_logs__tamanu_changes_updated_by_user_id.82cb04062b": [], "test.tamanu.source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_.7c9053d465": [], "test.tamanu.source_not_null_logs__tamanu_changes_device_id.e56e90ec9d": [], "test.tamanu.source_not_null_logs__tamanu_changes_version.9d511c5658": [], "test.tamanu.source_not_null_logs__tamanu_changes_record_id.782318322c": [], "test.tamanu.source_not_null_logs__tamanu_changes_record_created_at.d09f0598ea": [], "test.tamanu.source_not_null_logs__tamanu_changes_record_updated_at.7ba7742260": [], "test.tamanu.source_not_null_logs__tamanu_changes_record_data.83bbd4bbf6": [], "test.tamanu.source_not_null_logs__tamanu_changes_updated_at_sync_tick.c1c5731de8": [], "test.tamanu.source_unique_logs__tamanu_dhis2_pushes_id.0da5ddfd43": [], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_id.5b06029985": [], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_created_at.53c44d382b": [], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_report_id.5a861460f0": [], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_status.b440e65629": [], "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_updated_at.46346dc2f0": [], "test.tamanu.source_unique_logs__tamanu_debug_logs_id.a03e8469cd": [], "test.tamanu.source_not_null_logs__tamanu_debug_logs_id.2cd56785d4": [], "test.tamanu.source_not_null_logs__tamanu_debug_logs_type.78622a3567": [], "test.tamanu.source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate.827ca373d0": [], "test.tamanu.source_not_null_logs__tamanu_debug_logs_info.5cb0ccb1a0": [], "test.tamanu.source_unique_logs__tamanu_accesses_id.58775d956a": [], "test.tamanu.source_not_null_logs__tamanu_accesses_id.47650015e9": [], "test.tamanu.source_not_null_logs__tamanu_accesses_created_at.c559af59c4": [], "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at.d68343154e": [], "test.tamanu.source_not_null_logs__tamanu_accesses_user_id.4731fc507d": [], "test.tamanu.source_not_null_logs__tamanu_accesses_record_id.c49d0f4d84": [], "test.tamanu.source_not_null_logs__tamanu_accesses_record_type.b59437e552": [], "test.tamanu.source_not_null_logs__tamanu_accesses_session_id.3968767d39": [], "test.tamanu.source_not_null_logs__tamanu_accesses_device_id.277d95b364": [], "test.tamanu.source_not_null_logs__tamanu_accesses_logged_at.aee8df31c7": [], "test.tamanu.source_not_null_logs__tamanu_accesses_front_end_context.aeef6880f0": [], "test.tamanu.source_not_null_logs__tamanu_accesses_back_end_context.c461ef5b10": [], "test.tamanu.source_not_null_logs__tamanu_accesses_is_mobile.87cbc52937": [], "test.tamanu.source_not_null_logs__tamanu_accesses_version.92cc727c2e": [], "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at_sync_tick.82731184f9": [], "test.tamanu.source_unique_logs__tamanu_fhir_writes_id.8353be29e8": [], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_id.82c7762d53": [], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_created_at.6a5dde6c84": [], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_verb.2b0319d883": [], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_url.1acf607faf": [], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_body.face3433a2": [], "test.tamanu.source_not_null_logs__tamanu_fhir_writes_headers.d9c7e90be8": [], "test.tamanu.source_unique_tamanu_patient_allergies_id.898e40bfbb": [], "test.tamanu.source_not_null_tamanu_patient_allergies_id.f1126d18a5": [], "test.tamanu.source_not_null_tamanu_patient_allergies_created_at.59905c68e2": [], "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at.048547273e": [], "test.tamanu.source_not_null_tamanu_patient_allergies_recorded_date.de31b171cd": [], "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at_sync_tick.14fb342ab8": [], "test.tamanu.source_unique_tamanu_triages_id.86b3cfdd35": [], "test.tamanu.source_not_null_tamanu_triages_id.8276269bfd": [], "test.tamanu.source_not_null_tamanu_triages_created_at.9d4e7381d6": [], "test.tamanu.source_not_null_tamanu_triages_updated_at.3cd54f2d9b": [], "test.tamanu.source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_.3903adeec0": [], "test.tamanu.source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_.9341ff1138": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_.3203451a40": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_.8c9e664e44": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_.26a3871e3a": [], "test.tamanu.source_not_null_tamanu_triages_updated_at_sync_tick.38a343c27f": [], "test.tamanu.source_unique_tamanu_imaging_area_external_codes_id.ac26885b2b": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_id.fe52d7eda4": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_created_at.5a8be2828e": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at.fde1da72e8": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_visibility_status.83963919d0": [], "test.tamanu.source_unique_tamanu_imaging_area_external_codes_area_id.050349fa98": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_area_id.b59576cea8": [], "test.tamanu.source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_.32280d3e7c": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_code.af72562338": [], "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick.1bfbc765fb": [], "test.tamanu.source_unique_tamanu_socket_io_attachments_id.919f1a7156": [], "test.tamanu.source_not_null_tamanu_socket_io_attachments_id.acd275c6dc": [], "test.tamanu.source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick.8169c97d48": [], "test.tamanu.source_unique_tamanu_report_definitions_id.26898ce7eb": [], "test.tamanu.source_not_null_tamanu_report_definitions_id.b8bb2a951d": [], "test.tamanu.source_unique_tamanu_report_definitions_name.2f942767b6": [], "test.tamanu.source_not_null_tamanu_report_definitions_name.a630c1f799": [], "test.tamanu.source_not_null_tamanu_report_definitions_updated_at_sync_tick.3d8f13be51": [], "test.tamanu.source_not_null_tamanu_report_definitions_db_schema.f939e6dfa3": [], "test.tamanu.source_unique_tamanu_one_time_logins_id.b1d11d6c3f": [], "test.tamanu.source_not_null_tamanu_one_time_logins_id.6318f1fc0d": [], "test.tamanu.source_not_null_tamanu_one_time_logins_user_id.ebe1f826af": [], "test.tamanu.source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_.93741528ac": [], "test.tamanu.source_not_null_tamanu_one_time_logins_token.6b7dbabb08": [], "test.tamanu.source_not_null_tamanu_one_time_logins_expires_at.0051cd2e03": [], "test.tamanu.source_unique_tamanu_invoice_price_lists_id.92912c617f": [], "test.tamanu.source_not_null_tamanu_invoice_price_lists_id.dc8853229e": [], "test.tamanu.source_not_null_tamanu_invoice_price_lists_created_at.84fe51b659": [], "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at.75781a813a": [], "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.ff56fc27cb": [], "test.tamanu.source_not_null_tamanu_invoice_price_lists_code.741a3b08ab": [], "test.tamanu.source_not_null_tamanu_invoice_price_lists_visibility_status.a2ae9351b7": [], "test.tamanu.source_unique_tamanu_patient_contacts_id.3c41111688": [], "test.tamanu.source_not_null_tamanu_patient_contacts_id.9e63606ba7": [], "test.tamanu.source_not_null_tamanu_patient_contacts_created_at.29d447b596": [], "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at.e81c827845": [], "test.tamanu.source_not_null_tamanu_patient_contacts_name.2a5f2c99f9": [], "test.tamanu.source_not_null_tamanu_patient_contacts_method.37c9585829": [], "test.tamanu.source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram.8c6857119c": [], "test.tamanu.source_not_null_tamanu_patient_contacts_patient_id.58de0a1f28": [], "test.tamanu.source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_.606993d615": [], "test.tamanu.source_not_null_tamanu_patient_contacts_relationship_id.20abe6c3b2": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_.98d8247d27": [], "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at_sync_tick.3d648b4683": [], "test.tamanu.source_unique_tamanu_certificate_notifications_id.71e705665b": [], "test.tamanu.source_not_null_tamanu_certificate_notifications_id.7757b0046d": [], "test.tamanu.source_not_null_tamanu_certificate_notifications_type.a7491c4721": [], "test.tamanu.source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc.ca722e42a5": [], "test.tamanu.source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_.445dca3a7a": [], "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_.7bacb605d5": [], "test.tamanu.source_not_null_tamanu_certificate_notifications_status.561750c1e5": [], "test.tamanu.source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore.3450abc93a": [], "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_.3cf536fdbe": [], "test.tamanu.source_not_null_tamanu_certificate_notifications_updated_at_sync_tick.7cb5b88cb7": [], "test.tamanu.source_unique_tamanu_medication_administration_records_id.90c6de3c48": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_id.052d1d08f9": [], "test.tamanu.source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN.5e232a0448": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_due_at.448f2c2000": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_is_auto_generated.092ff3874d": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_created_at.9f08841aa3": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at.f0bd0e1339": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at_sync_tick.59617cf32f": [], "test.tamanu.source_not_null_tamanu_medication_administration_records_is_edited.178286708a": [], "test.tamanu.source_unique_tamanu_templates_id.2cf6e18998": [], "test.tamanu.source_not_null_tamanu_templates_id.4e582a2692": [], "test.tamanu.source_not_null_tamanu_templates_name.5251789780": [], "test.tamanu.source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_.e25012c12c": [], "test.tamanu.source_not_null_tamanu_templates_updated_at_sync_tick.68f02a36e6": [], "test.tamanu.source_not_null_tamanu_templates_type.6083b4eb5c": [], "test.tamanu.source_unique_tamanu_program_registry_condition_categories_id.18374f5f6e": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_id.a5fda78261": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_created_at.a0f967234b": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at.704b596025": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_code.a8f2bb54d7": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_name.e875bc9167": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_program_registry_id.bef6922940": [], "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick.62ea28ae95": [], "test.tamanu.source_unique_tamanu_procedure_survey_responses_id.f04f0f3841": [], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_id.a4c8f21301": [], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_procedure_id.d49cf97456": [], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_survey_response_id.08df151a05": [], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_created_at.8143f338d9": [], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at.d9d19cd3aa": [], "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick.7ee597b2e3": [], "test.tamanu.source_unique_tamanu_pharmacy_order_prescriptions_id.03a99815d2": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_id.fd53b388c3": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id.00d2c5b906": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id.5a6d9c2855": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_quantity.02521782a2": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_created_at.f3e852be35": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.4e7669a584": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_is_completed.d0fc6c67a0": [], "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick.eb82a5ba2b": [], "test.tamanu.source_unique_tamanu_location_groups_id.92f4a5e856": [], "test.tamanu.source_not_null_tamanu_location_groups_id.00f301e9d3": [], "test.tamanu.source_not_null_tamanu_location_groups_created_at.b199e250ad": [], "test.tamanu.source_not_null_tamanu_location_groups_updated_at.4a9b84a719": [], "test.tamanu.source_accepted_values_tamanu_location_groups_visibility_status__current__historical.5756cd0b4b": [], "test.tamanu.source_not_null_tamanu_location_groups_name.983b6df532": [], "test.tamanu.source_not_null_tamanu_location_groups_code.c2bcc0bf4f": [], "test.tamanu.source_not_null_tamanu_location_groups_facility_id.d062db3ac7": [], "test.tamanu.source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_.ecb02b7330": [], "test.tamanu.source_not_null_tamanu_location_groups_updated_at_sync_tick.b75e499255": [], "test.tamanu.source_not_null_tamanu_location_groups_is_bookable.c3c0909cd0": [], "test.tamanu.source_unique_tamanu_invoice_products_id.abc4b55436": [], "test.tamanu.source_not_null_tamanu_invoice_products_id.9b98c43ede": [], "test.tamanu.source_not_null_tamanu_invoice_products_name.c01b81d553": [], "test.tamanu.source_not_null_tamanu_invoice_products_insurable.94732ef307": [], "test.tamanu.source_not_null_tamanu_invoice_products_created_at.815791ae0e": [], "test.tamanu.source_not_null_tamanu_invoice_products_visibility_status.a7dd9ecfa0": [], "test.tamanu.source_not_null_tamanu_invoice_products_updated_at_sync_tick.510c557616": [], "test.tamanu.source_unique_tamanu_certifiable_vaccines_id.f0a184f1a0": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_id.b73eb6daff": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_created_at.ed08316054": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at.57aee6fafd": [], "test.tamanu.source_unique_tamanu_certifiable_vaccines_vaccine_id.ab754e124f": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_id.836f9ff4fb": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_.2a45c16791": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_.7fbca1adbc": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.e0022050d1": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.c672804493": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_code.6c9677a1ed": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_maximum_dosage.ab28eb0766": [], "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick.ce5ff28250": [], "test.tamanu.source_unique_tamanu_task_designations_id.adf46ec6db": [], "test.tamanu.source_not_null_tamanu_task_designations_id.2c04a11c88": [], "test.tamanu.source_not_null_tamanu_task_designations_task_id.d0e443e977": [], "test.tamanu.source_not_null_tamanu_task_designations_designation_id.dc0adb2396": [], "test.tamanu.source_not_null_tamanu_task_designations_created_at.60f756cdb6": [], "test.tamanu.source_not_null_tamanu_task_designations_updated_at.14c7cc7b2e": [], "test.tamanu.source_not_null_tamanu_task_designations_updated_at_sync_tick.6da15a7273": [], "test.tamanu.source_unique_tamanu_appointment_schedules_id.0a8d801e6f": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_id.61a1963563": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_interval.09395917c8": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_frequency.1a456b5d85": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_created_at.51ddaf1fe0": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at.ceb401c90c": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at_sync_tick.3902446442": [], "test.tamanu.source_not_null_tamanu_appointment_schedules_is_fully_generated.fd5b4e8ebf": [], "test.tamanu.source_unique_tamanu_scheduled_vaccines_id.2034f06a45": [], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_id.5f527b2c7d": [], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_created_at.af5ea94ddb": [], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at.bbfa85d08b": [], "test.tamanu.source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine.c38ebd4174": [], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.b312aecb83": [], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.69f1da7070": [], "test.tamanu.source_not_null_tamanu_scheduled_vaccines_sort_index.b8dba8349e": [], "test.tamanu.source_unique_tamanu_user_localisation_caches_id.32edbc1226": [], "test.tamanu.source_not_null_tamanu_user_localisation_caches_id.31e4c40fbd": [], "test.tamanu.source_not_null_tamanu_user_localisation_caches_localisation.6988ef3ae3": [], "test.tamanu.source_unique_tamanu_invoice_item_discounts_id.171e1a5e94": [], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_id.bcff96eb2f": [], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_invoice_item_id.3398752f5b": [], "test.tamanu.source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_.18c0b3db45": [], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_amount.0e8480cee8": [], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_created_at.664f2faa45": [], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick.15b4636f1b": [], "test.tamanu.source_not_null_tamanu_invoice_item_discounts_type.f759ed12f3": [], "test.tamanu.source_unique_tamanu_portal_one_time_tokens_id.84f65f30bf": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_id.ab6f761724": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_created_at.1c1279979b": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_updated_at.b077921d8b": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_portal_user_id.5159527428": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_type.5c33a4037d": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_token.8afdc93478": [], "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_expires_at.e45d1c82d9": [], "test.tamanu.source_unique_tamanu_invoice_discounts_id.90b9b4d8a6": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_id.e5dd8872f8": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_invoice_id.e692b8ae47": [], "test.tamanu.source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_.93879e6aa1": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_percentage.eeb4864a35": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_is_manual.e5a0d85a43": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_by_user_id.eacadbca1c": [], "test.tamanu.source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_.4ec462b6c3": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_time.de2863c9b1": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_created_at.2a4d9814f4": [], "test.tamanu.source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.96efd53160": [], "test.tamanu.source_unique_tamanu_program_registry_conditions_id.8aed9112e7": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_id.96669373a2": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_created_at.f1a67190af": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at.2f0d7717b7": [], "test.tamanu.source_unique_tamanu_program_registry_conditions_code.9e9e23890c": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_code.6e0f8d91fe": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_name.fb44ee2d53": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_program_registry_id.8b4085a6a4": [], "test.tamanu.source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_.4b46b0e413": [], "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick.81caed205f": [], "test.tamanu.source_unique_tamanu_invoice_payments_id.0aeb9e30d1": [], "test.tamanu.source_not_null_tamanu_invoice_payments_id.3dad87d906": [], "test.tamanu.source_not_null_tamanu_invoice_payments_invoice_id.f83a526a9f": [], "test.tamanu.source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_.d07f617060": [], "test.tamanu.source_not_null_tamanu_invoice_payments_date.7761ae0a7d": [], "test.tamanu.source_not_null_tamanu_invoice_payments_receipt_number.bd93ab85a8": [], "test.tamanu.source_not_null_tamanu_invoice_payments_amount.ce266dd7a6": [], "test.tamanu.source_not_null_tamanu_invoice_payments_created_at.a163e272e6": [], "test.tamanu.source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_.11aa785c7b": [], "test.tamanu.source_unique_tamanu_invoice_payments_original_payment_id.76c596c1fd": [], "test.tamanu.source_not_null_tamanu_invoice_payments_updated_at_sync_tick.011299b145": [], "test.tamanu.source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown.663d1d9b1c": [], "test.tamanu.source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_.d16028f9e4": [], "test.tamanu.source_unique_tamanu_patient_additional_data_patient_id.765b349cc6": [], "test.tamanu.source_not_null_tamanu_patient_additional_data_patient_id.9eb859e167": [], "test.tamanu.source_not_null_tamanu_patient_additional_data_updated_at_sync_tick.d93ed515bf": [], "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_.32e4981e6c": [], "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.37ba12bfdf": [], "test.tamanu.source_unique_tamanu_user_preferences_id.ff8617d0af": [], "test.tamanu.source_not_null_tamanu_user_preferences_id.0563337670": [], "test.tamanu.source_not_null_tamanu_user_preferences_created_at.b4868da62e": [], "test.tamanu.source_not_null_tamanu_user_preferences_updated_at.e3fb22ee58": [], "test.tamanu.source_not_null_tamanu_user_preferences_user_id.de0ee34cbb": [], "test.tamanu.source_not_null_tamanu_user_preferences_updated_at_sync_tick.68db073099": [], "test.tamanu.source_not_null_tamanu_user_preferences_key.42f62cbf6e": [], "test.tamanu.source_not_null_tamanu_user_preferences_value.05dc3d9f13": [], "test.tamanu.source_not_null_tamanu_patient_field_values_created_at.acd6792845": [], "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at.dc8ebd5fcb": [], "test.tamanu.source_not_null_tamanu_patient_field_values_value.20bfdc4dc5": [], "test.tamanu.source_not_null_tamanu_patient_field_values_definition_id.afb3baa363": [], "test.tamanu.source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_.7942c868d5": [], "test.tamanu.source_not_null_tamanu_patient_field_values_patient_id.d726e4e785": [], "test.tamanu.source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_.7e29294f59": [], "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at_sync_tick.37926ff0c2": [], "test.tamanu.source_unique_tamanu_referrals_id.724932b7f0": [], "test.tamanu.source_not_null_tamanu_referrals_id.b643c6e9cf": [], "test.tamanu.source_not_null_tamanu_referrals_created_at.7dc2e9f62e": [], "test.tamanu.source_not_null_tamanu_referrals_updated_at.319fc895ee": [], "test.tamanu.source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_.e17964499c": [], "test.tamanu.source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_.dc1e9922b6": [], "test.tamanu.source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_.36148d215d": [], "test.tamanu.source_not_null_tamanu_referrals_status.b2da9beb55": [], "test.tamanu.source_accepted_values_tamanu_referrals_status__pending__cancelled__completed.86187bc5c9": [], "test.tamanu.source_not_null_tamanu_referrals_updated_at_sync_tick.475afc0dcb": [], "test.tamanu.source_unique_tamanu_lab_request_logs_id.7acd19c7d3": [], "test.tamanu.source_not_null_tamanu_lab_request_logs_id.fe608e09fd": [], "test.tamanu.source_not_null_tamanu_lab_request_logs_status.8e024043da": [], "test.tamanu.source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_.f8e2c6d82e": [], "test.tamanu.source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_.86e7966883": [], "test.tamanu.source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.960428a44f": [], "test.tamanu.source_unique_tamanu_user_leaves_id.f9fb006fa5": [], "test.tamanu.source_not_null_tamanu_user_leaves_id.3c0b468b6b": [], "test.tamanu.source_not_null_tamanu_user_leaves_start_date.a4376146d4": [], "test.tamanu.source_not_null_tamanu_user_leaves_end_date.69c42bf7d9": [], "test.tamanu.source_not_null_tamanu_user_leaves_user_id.df71d24528": [], "test.tamanu.source_not_null_tamanu_user_leaves_created_at.638cb66e18": [], "test.tamanu.source_not_null_tamanu_user_leaves_updated_at.045e6c9ad2": [], "test.tamanu.source_not_null_tamanu_user_leaves_updated_at_sync_tick.05dfeae565": [], "test.tamanu.source_unique_tamanu_user_designations_id.85f719d07a": [], "test.tamanu.source_not_null_tamanu_user_designations_id.be521369b8": [], "test.tamanu.source_not_null_tamanu_user_designations_user_id.2b15af1d80": [], "test.tamanu.source_not_null_tamanu_user_designations_designation_id.f9b573eeb8": [], "test.tamanu.source_not_null_tamanu_user_designations_created_at.db3f67069a": [], "test.tamanu.source_not_null_tamanu_user_designations_updated_at.4bbf71e0b0": [], "test.tamanu.source_not_null_tamanu_user_designations_updated_at_sync_tick.934bc4ad06": [], "test.tamanu.source_unique_tamanu_patient_field_definitions_id.96d277b7c5": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_id.3b31aed01d": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_created_at.b7c144e251": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at.812399208c": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_name.a1fb4fbbdb": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_field_type.01dad44ce8": [], "test.tamanu.source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select.8c8193f02d": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_visibility_status.353a97d1ea": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_category_id.5bb661f0af": [], "test.tamanu.source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_.d67c1014d6": [], "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick.9334037106": [], "test.tamanu.source_unique_tamanu_lab_test_types_id.59d45fd4c8": [], "test.tamanu.source_not_null_tamanu_lab_test_types_id.0d085cde9d": [], "test.tamanu.source_not_null_tamanu_lab_test_types_created_at.6a4f074401": [], "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at.34e9cce3fa": [], "test.tamanu.source_not_null_tamanu_lab_test_types_code.84b27e0faa": [], "test.tamanu.source_not_null_tamanu_lab_test_types_name.87dee5eabd": [], "test.tamanu.source_not_null_tamanu_lab_test_types_unit.953f194d89": [], "test.tamanu.source_not_null_tamanu_lab_test_types_result_type.a33f1d56c0": [], "test.tamanu.source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select.e7c22c9eca": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.8034332af4": [], "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at_sync_tick.f5cbb064a4": [], "test.tamanu.source_not_null_tamanu_lab_test_types_is_sensitive.7905ffff94": [], "test.tamanu.source_unique_tamanu_prescriptions_id.e43fe53647": [], "test.tamanu.source_not_null_tamanu_prescriptions_id.acb2ebf90d": [], "test.tamanu.source_not_null_tamanu_prescriptions_created_at.ce02db9537": [], "test.tamanu.source_not_null_tamanu_prescriptions_updated_at.db8ce11745": [], "test.tamanu.source_not_null_tamanu_prescriptions_date.a2e0f3a811": [], "test.tamanu.source_not_null_tamanu_prescriptions_units.04b2e47d71": [], "test.tamanu.source_not_null_tamanu_prescriptions_frequency.387650c017": [], "test.tamanu.source_not_null_tamanu_prescriptions_start_date.6b47c62ca9": [], "test.tamanu.source_not_null_tamanu_prescriptions_updated_at_sync_tick.ccc1aacb8b": [], "test.tamanu.source_unique_tamanu_medication_dispenses_id.3794f39031": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_id.4e57f1d462": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id.d4c0bafee8": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_quantity.362d1d5f50": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_by_user_id.afdbe34024": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_at.515dc80dcb": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_created_at.e8d7e87757": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at.76e722a377": [], "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at_sync_tick.463ee92e91": [], "test.tamanu.source_unique_tamanu_encounters_id.6da54b7f38": [], "test.tamanu.source_not_null_tamanu_encounters_id.3d82b88759": [], "test.tamanu.source_not_null_tamanu_encounters_created_at.5a9caa2a2b": [], "test.tamanu.source_not_null_tamanu_encounters_updated_at.65ef63b763": [], "test.tamanu.source_not_null_tamanu_encounters_encounter_type.169507cb50": [], "test.tamanu.source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.6454543933": [], "test.tamanu.source_not_null_tamanu_encounters_start_date.a5dec75857": [], "test.tamanu.source_not_null_tamanu_encounters_patient_id.14f6d7e7fb": [], "test.tamanu.source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_.86e006efba": [], "test.tamanu.source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_.1a33a59a12": [], "test.tamanu.source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_.37f810a377": [], "test.tamanu.source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_.54b3d36175": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_.ecb4200032": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_.6759a4eea9": [], "test.tamanu.source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_.b6110183f5": [], "test.tamanu.source_not_null_tamanu_encounters_updated_at_sync_tick.1eb037d2f2": [], "test.tamanu.source_unique_tamanu_encounter_diets_id.da8f18a027": [], "test.tamanu.source_not_null_tamanu_encounter_diets_id.d0805612f7": [], "test.tamanu.source_not_null_tamanu_encounter_diets_encounter_id.56ca3f2a1c": [], "test.tamanu.source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_.90c10b0836": [], "test.tamanu.source_not_null_tamanu_encounter_diets_diet_id.f096ba53ad": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_.e71c59d77d": [], "test.tamanu.source_not_null_tamanu_encounter_diets_created_at.0f3c391127": [], "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at.1a3c4fcb7f": [], "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at_sync_tick.1e9301afae": [], "test.tamanu.source_unique_tamanu_encounter_diagnoses_id.d52ee9adc9": [], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_id.5010c4db2d": [], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_created_at.2e0c2e1d40": [], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at.e843942ea8": [], "test.tamanu.source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected.9dcc845ca8": [], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_date.3cb9b9f92a": [], "test.tamanu.source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_.16e875a59a": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.6536f09069": [], "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.82fe91df26": [], "test.tamanu.source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_.98d7d9c464": [], "test.tamanu.source_unique_tamanu_program_data_elements_id.a75c7468d4": [], "test.tamanu.source_not_null_tamanu_program_data_elements_id.0e73c12f56": [], "test.tamanu.source_not_null_tamanu_program_data_elements_created_at.3a9a1d2f6d": [], "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at.3f3cecdcc3": [], "test.tamanu.source_not_null_tamanu_program_data_elements_type.5a4507db5e": [], "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at_sync_tick.d9577c2030": [], "test.tamanu.source_not_null_tamanu_patient_birth_data_created_at.ee3353eccc": [], "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at.96f99396c0": [], "test.tamanu.source_unique_tamanu_patient_birth_data_patient_id.8e97708df0": [], "test.tamanu.source_not_null_tamanu_patient_birth_data_patient_id.7c9d7da294": [], "test.tamanu.source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_.535a68dcb7": [], "test.tamanu.source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other.cdd88bca26": [], "test.tamanu.source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other.f7dbbb7dc8": [], "test.tamanu.source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_.41f2b0a645": [], "test.tamanu.source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other.68a09fae97": [], "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.ad66b3a9e9": [], "test.tamanu.source_unique_tamanu_program_registries_id.4591df7852": [], "test.tamanu.source_not_null_tamanu_program_registries_id.e8dd600ce7": [], "test.tamanu.source_not_null_tamanu_program_registries_created_at.ec096818cc": [], "test.tamanu.source_not_null_tamanu_program_registries_updated_at.b636966c96": [], "test.tamanu.source_unique_tamanu_program_registries_code.6aae9c851a": [], "test.tamanu.source_not_null_tamanu_program_registries_code.42a17fd859": [], "test.tamanu.source_not_null_tamanu_program_registries_name.7b40894126": [], "test.tamanu.source_not_null_tamanu_program_registries_currently_at_type.1181424fbc": [], "test.tamanu.source_accepted_values_tamanu_program_registries_currently_at_type__village__facility.878b7101a5": [], "test.tamanu.source_not_null_tamanu_program_registries_program_id.86ea68d449": [], "test.tamanu.source_not_null_tamanu_program_registries_updated_at_sync_tick.5bea147746": [], "test.tamanu.source_unique_tamanu_invoice_insurance_plans_id.c93eebe7c9": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_id.4c3a005a8c": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_created_at.6a73080b49": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at.1382c20539": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick.1671b13fb3": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_code.5691576988": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_visibility_status.3bdc27963d": [], "test.tamanu.source_unique_tamanu_note_items_id.6a3c41e3a8": [], "test.tamanu.source_not_null_tamanu_note_items_id.e102088706": [], "test.tamanu.source_not_null_tamanu_note_items_created_at.6c19cc76af": [], "test.tamanu.source_not_null_tamanu_note_items_updated_at.c552d1546c": [], "test.tamanu.source_not_null_tamanu_note_items_note_page_id.e6a2a1ff2b": [], "test.tamanu.source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_.11dd57c56b": [], "test.tamanu.source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_.1c2976179a": [], "test.tamanu.source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_.1029ad90a3": [], "test.tamanu.source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_.35728438ca": [], "test.tamanu.source_not_null_tamanu_note_items_content.cdcdc58bd6": [], "test.tamanu.source_not_null_tamanu_note_items_date.b7ba7d298b": [], "test.tamanu.source_not_null_tamanu_note_items_updated_at_sync_tick.9c0561f44d": [], "test.tamanu.source_unique_tamanu_encounter_pause_prescription_histories_id.242095e95a": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_id.9371741f30": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id.6431100b96": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action.36a50d92fd": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action_date.fff7387332": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_created_at.1766fe12bb": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at.bce04537f7": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick.1a62809ae2": [], "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_id.6579ad9f9e": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_id.5152485ff1": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_created_at.db653414c9": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at.74ec57dc65": [], "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_code.93a7de7fa7": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_code.b6dbb55eee": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_name.1483c9ad54": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id.51f24319f9": [], "test.tamanu.source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_.5a69a4eefa": [], "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick.a28eb831c8": [], "test.tamanu.source_unique_tamanu_local_system_facts_id.fec4c53d21": [], "test.tamanu.source_not_null_tamanu_local_system_facts_id.b86094ee5b": [], "test.tamanu.source_not_null_tamanu_local_system_facts_key.d313f0ba6d": [], "test.tamanu.source_unique_tamanu_invoices_invoice_insurance_plans_id.33a1630253": [], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_id.81fdb96190": [], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_created_at.3c4109e1f6": [], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at.23b9b151a0": [], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick.65d4601e80": [], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id.06e1c59b11": [], "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id.b21c244f33": [], "test.tamanu.source_unique_tamanu_refresh_tokens_id.0c9c64d141": [], "test.tamanu.source_not_null_tamanu_refresh_tokens_id.470a9a0ad1": [], "test.tamanu.source_not_null_tamanu_refresh_tokens_refresh_id.1f1f3cc868": [], "test.tamanu.source_not_null_tamanu_refresh_tokens_device_id.b6b31e60be": [], "test.tamanu.source_not_null_tamanu_refresh_tokens_user_id.78eb836f95": [], "test.tamanu.source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_.ba625319c2": [], "test.tamanu.source_not_null_tamanu_refresh_tokens_expires_at.a515544921": [], "test.tamanu.source_unique_tamanu_death_revert_logs_id.001d670317": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_id.6df645dcf5": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_created_at.c782214dc7": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at.844962c5a1": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_revert_time.3e0bd39153": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_death_data_id.4889452a8a": [], "test.tamanu.source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_.a370a6342c": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_patient_id.12123f0c05": [], "test.tamanu.source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_.ab4f34cd7c": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_reverted_by_id.34e5a69137": [], "test.tamanu.source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_.953c559e54": [], "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.24982eacdf": [], "test.tamanu.source_unique_tamanu_patient_program_registration_conditions_id.18c7acc7c5": [], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_id.148f05b382": [], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_created_at.ffd5ec434b": [], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at.ec3ed984e8": [], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_date.51631f2975": [], "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_.bfef5107bf": [], "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_.1928169432": [], "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_.329bc7b403": [], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick.9a6307d740": [], "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id.e4d2008618": [], "test.tamanu.source_unique_tamanu_patients_id.aad3b90c9d": [], "test.tamanu.source_not_null_tamanu_patients_id.275ed05302": [], "test.tamanu.source_not_null_tamanu_patients_created_at.f10f4a4622": [], "test.tamanu.source_not_null_tamanu_patients_updated_at.907998e8ed": [], "test.tamanu.source_unique_tamanu_patients_display_id.d601818f72": [], "test.tamanu.source_not_null_tamanu_patients_display_id.faf4f13c00": [], "test.tamanu.source_not_null_tamanu_patients_sex.107df8a545": [], "test.tamanu.source_accepted_values_tamanu_patients_sex__female__male__other.a3c5a2bdc7": [], "test.tamanu.source_not_null_tamanu_patients_updated_at_sync_tick.937dfa8d54": [], "test.tamanu.source_unique_tamanu_departments_id.f24dde60cc": [], "test.tamanu.source_not_null_tamanu_departments_id.4f5628ebfb": [], "test.tamanu.source_not_null_tamanu_departments_code.196489124d": [], "test.tamanu.source_not_null_tamanu_departments_name.3448ffbf45": [], "test.tamanu.source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_.632d512530": [], "test.tamanu.source_not_null_tamanu_departments_updated_at_sync_tick.3876957182": [], "test.tamanu.source_unique_tamanu_note_pages_id.589de9f269": [], "test.tamanu.source_not_null_tamanu_note_pages_id.ca251365f2": [], "test.tamanu.source_not_null_tamanu_note_pages_created_at.d12af0d7fa": [], "test.tamanu.source_not_null_tamanu_note_pages_updated_at.f4a3d0c174": [], "test.tamanu.source_not_null_tamanu_note_pages_note_type.ef33cb53cd": [], "test.tamanu.source_not_null_tamanu_note_pages_record_id.4fb443d5b8": [], "test.tamanu.source_not_null_tamanu_note_pages_record_type.3a45297bcc": [], "test.tamanu.source_not_null_tamanu_note_pages_date.73c5e4ff13": [], "test.tamanu.source_not_null_tamanu_note_pages_updated_at_sync_tick.92101dbbcc": [], "test.tamanu.source_unique_tamanu_invoice_insurance_plan_items_id.cbd4f88b8d": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_id.43701f0ea4": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_created_at.3f6d2aaeca": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at.31dd03f410": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick.1d01aecfe2": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id.22ae6631a9": [], "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id.e10425ebc3": [], "test.tamanu.source_unique_tamanu_lab_tests_id.2135a2616a": [], "test.tamanu.source_not_null_tamanu_lab_tests_id.abec38f58a": [], "test.tamanu.source_not_null_tamanu_lab_tests_created_at.667f51451c": [], "test.tamanu.source_not_null_tamanu_lab_tests_updated_at.64be4fd140": [], "test.tamanu.source_not_null_tamanu_lab_tests_date.e00dab5c9e": [], "test.tamanu.source_not_null_tamanu_lab_tests_result.cac9a56686": [], "test.tamanu.source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_.feba1f8faa": [], "test.tamanu.source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_.1db3f2d26e": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_.be7e43137f": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_.b46161f1b5": [], "test.tamanu.source_not_null_tamanu_lab_tests_updated_at_sync_tick.eeac5bc0de": [], "test.tamanu.source_unique_tamanu_invoice_items_id.9cdffdcc59": [], "test.tamanu.source_not_null_tamanu_invoice_items_id.dc141da1a1": [], "test.tamanu.source_not_null_tamanu_invoice_items_invoice_id.3660f18c91": [], "test.tamanu.source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_.1c28785b87": [], "test.tamanu.source_not_null_tamanu_invoice_items_order_date.7be79d0261": [], "test.tamanu.source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_.46ad5d1e2f": [], "test.tamanu.source_not_null_tamanu_invoice_items_quantity.3be1c84af8": [], "test.tamanu.source_not_null_tamanu_invoice_items_ordered_by_user_id.a2db62ee39": [], "test.tamanu.source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_.a5aadc15a8": [], "test.tamanu.source_not_null_tamanu_invoice_items_created_at.474e57c0bb": [], "test.tamanu.source_not_null_tamanu_invoice_items_updated_at_sync_tick.0d6baa054f": [], "test.tamanu.source_not_null_tamanu_invoice_items_approved.3e2ce00100": [], "test.tamanu.source_unique_tamanu_lab_requests_id.4e5a6c8c2f": [], "test.tamanu.source_not_null_tamanu_lab_requests_id.e536409687": [], "test.tamanu.source_not_null_tamanu_lab_requests_created_at.1ee9713d63": [], "test.tamanu.source_not_null_tamanu_lab_requests_updated_at.fca847ad8c": [], "test.tamanu.source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error.a405e0e600": [], "test.tamanu.source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_.332337a1bd": [], "test.tamanu.source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_.ead6a9d3f0": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.1161021af0": [], "test.tamanu.source_not_null_tamanu_lab_requests_display_id.cbbdd33475": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_.15144cb13a": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_.4ae8635507": [], "test.tamanu.source_not_null_tamanu_lab_requests_updated_at_sync_tick.ef00317737": [], "test.tamanu.source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused.2cbc5618a7": [], "test.tamanu.source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_.b8a500a3ec": [], "test.tamanu.source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_.2905d1bd3a": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_.726d5f854e": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_.b37e5b8f30": [], "test.tamanu.source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_.fa7e746896": [], "test.tamanu.source_unique_tamanu_SequelizeMeta_name.ed3437179c": [], "test.tamanu.source_not_null_tamanu_SequelizeMeta_name.8bbd44e2f6": [], "test.tamanu.source_unique_tamanu_invoices_id.5821fd311e": [], "test.tamanu.source_not_null_tamanu_invoices_id.547f4c6b53": [], "test.tamanu.source_not_null_tamanu_invoices_display_id.d7f24dffea": [], "test.tamanu.source_not_null_tamanu_invoices_date.af363f73c1": [], "test.tamanu.source_not_null_tamanu_invoices_status.3cc2fac683": [], "test.tamanu.source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised.6e4b4a0157": [], "test.tamanu.source_not_null_tamanu_invoices_encounter_id.165abf9a41": [], "test.tamanu.source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_.5dd1ea3660": [], "test.tamanu.source_not_null_tamanu_invoices_created_at.f79d3fee01": [], "test.tamanu.source_not_null_tamanu_invoices_patient_payment_status.c489578d60": [], "test.tamanu.source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial.fa024cba1f": [], "test.tamanu.source_not_null_tamanu_invoices_insurer_payment_status.defe067d68": [], "test.tamanu.source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected.3e0ad430bb": [], "test.tamanu.source_not_null_tamanu_invoices_updated_at_sync_tick.1157c94f1b": [], "test.tamanu.source_unique_tamanu_patient_communications_id.b90ad76da2": [], "test.tamanu.source_not_null_tamanu_patient_communications_id.1fe956c44c": [], "test.tamanu.source_not_null_tamanu_patient_communications_created_at.33e1921e8e": [], "test.tamanu.source_not_null_tamanu_patient_communications_updated_at.871abd87ae": [], "test.tamanu.source_not_null_tamanu_patient_communications_type.4795985e7b": [], "test.tamanu.source_not_null_tamanu_patient_communications_channel.587842d7e0": [], "test.tamanu.source_not_null_tamanu_patient_communications_status.125dae34af": [], "test.tamanu.source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_.f0401833ba": [], "test.tamanu.source_not_null_tamanu_patient_communications_updated_at_sync_tick.2b3912c278": [], "test.tamanu.source_unique_tamanu_signers_historical_id.a3bfab8f1b": [], "test.tamanu.source_not_null_tamanu_signers_historical_id.0d0aeac24d": [], "test.tamanu.source_not_null_tamanu_signers_historical_created_at.42db3ab0e4": [], "test.tamanu.source_not_null_tamanu_signers_historical_updated_at.1b5d6fc4e7": [], "test.tamanu.source_not_null_tamanu_signers_historical_country_code.42c68d2696": [], "test.tamanu.source_not_null_tamanu_signers_historical_public_key.d16df118c2": [], "test.tamanu.source_not_null_tamanu_signers_historical_request.2959786f4d": [], "test.tamanu.source_not_null_tamanu_signers_historical_signatures_issued.da2dbdd26c": [], "test.tamanu.source_unique_tamanu_invoice_price_list_items_id.0ce15b2467": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_id.5081c70d98": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_created_at.94f64a01f3": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at.3be1e8411f": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick.96a1770fd7": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id.98a95f7705": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_product_id.21d5cfd939": [], "test.tamanu.source_not_null_tamanu_invoice_price_list_items_is_hidden.7422bf5f0a": [], "test.tamanu.source_unique_tamanu_notes_id.a24a543e48": [], "test.tamanu.source_not_null_tamanu_notes_id.09c896ad4f": [], "test.tamanu.source_not_null_tamanu_notes_created_at.6995826036": [], "test.tamanu.source_not_null_tamanu_notes_updated_at.a1ee0f269e": [], "test.tamanu.source_not_null_tamanu_notes_record_id.cfea6af90a": [], "test.tamanu.source_not_null_tamanu_notes_record_type.95fdec276c": [], "test.tamanu.source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage.bec5c8fb7d": [], "test.tamanu.source_not_null_tamanu_notes_date.da7301eac5": [], "test.tamanu.source_not_null_tamanu_notes_updated_at_sync_tick.c817dbafe2": [], "test.tamanu.source_relationships_tamanu_notes_author_id__id__source_tamanu_users_.d295cc11d5": [], "test.tamanu.source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_.8b38421ee7": [], "test.tamanu.source_not_null_tamanu_notes_content.aaef9e6205": [], "test.tamanu.source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_.2e3d834e0e": [], "test.tamanu.source_not_null_tamanu_notes_note_type_id.149bd5c822": [], "test.tamanu.source_unique_tamanu_imaging_results_id.6830573d99": [], "test.tamanu.source_not_null_tamanu_imaging_results_id.bc45b4d2ee": [], "test.tamanu.source_not_null_tamanu_imaging_results_created_at.59c90956bf": [], "test.tamanu.source_not_null_tamanu_imaging_results_updated_at.6f4012c0e4": [], "test.tamanu.source_not_null_tamanu_imaging_results_updated_at_sync_tick.35b86ae623": [], "test.tamanu.source_not_null_tamanu_imaging_results_visibility_status.80dbc6bd58": [], "test.tamanu.source_not_null_tamanu_imaging_results_imaging_request_id.68d290fbfe": [], "test.tamanu.source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_.2549bf4069": [], "test.tamanu.source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_.cf92796113": [], "test.tamanu.source_not_null_tamanu_imaging_results_completed_at.3e8e297046": [], "test.tamanu.source_unique_tamanu_discharges_id.8b9c580a59": [], "test.tamanu.source_not_null_tamanu_discharges_id.4a7ff5af7b": [], "test.tamanu.source_not_null_tamanu_discharges_encounter_id.5299e31574": [], "test.tamanu.source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_.43adeff312": [], "test.tamanu.source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_.1e9379ede1": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_.2fff0e5fc5": [], "test.tamanu.source_not_null_tamanu_discharges_updated_at_sync_tick.0b20bf424c": [], "test.tamanu.source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_.1fe0fe6f7f": [], "test.tamanu.source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_.298b48d81f": [], "test.tamanu.source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_.68747350e4": [], "test.tamanu.source_unique_tamanu_patient_ongoing_prescriptions_id.acc37386e6": [], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_id.01386e7977": [], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.f41a0ed63a": [], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id.3409401d0e": [], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_created_at.0bf2c435a7": [], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.6af6ca8d00": [], "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick.d9e250caae": [], "test.tamanu.source_unique_tamanu_location_assignment_templates_id.2a2b122606": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_id.91706d5751": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_user_id.fc74c558b6": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_location_id.f01a2ba717": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_date.0265301d5d": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_start_time.aad4cea7dc": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_end_time.65aa617784": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_end_date.cfd6b45ace": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_frequency.c7157d2070": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_unit.2fca6b103d": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_created_at.a5e55e1095": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at.813872183e": [], "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick.902f20bfe3": [], "test.tamanu.source_not_null_tamanu_patient_facilities_facility_id.2e4a51e2f6": [], "test.tamanu.source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_.8a454e3fea": [], "test.tamanu.source_not_null_tamanu_patient_facilities_patient_id.a4d7ee14a4": [], "test.tamanu.source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_.62c931e062": [], "test.tamanu.source_unique_tamanu_patient_care_plans_id.a3a1194e99": [], "test.tamanu.source_not_null_tamanu_patient_care_plans_id.56024c4140": [], "test.tamanu.source_not_null_tamanu_patient_care_plans_created_at.dd6e82d0b1": [], "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at.b6d6e4d022": [], "test.tamanu.source_not_null_tamanu_patient_care_plans_date.34408a1445": [], "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.310ae42450": [], "test.tamanu.source_unique_tamanu_surveys_id.0e6c4290cc": [], "test.tamanu.source_not_null_tamanu_surveys_id.232633415e": [], "test.tamanu.source_not_null_tamanu_surveys_created_at.49abf4cc08": [], "test.tamanu.source_not_null_tamanu_surveys_updated_at.88f3f24266": [], "test.tamanu.source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_.fa85daf635": [], "test.tamanu.source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals.fb3dae8522": [], "test.tamanu.source_not_null_tamanu_surveys_is_sensitive.5f59558cfe": [], "test.tamanu.source_not_null_tamanu_surveys_updated_at_sync_tick.27e79d3218": [], "test.tamanu.source_not_null_tamanu_surveys_notifiable.fa289a592a": [], "test.tamanu.source_not_null_tamanu_surveys_notify_email_addresses.6c0b996c80": [], "test.tamanu.source_not_null_tamanu_surveys_visibility_status.a50fde3a7b": [], "test.tamanu.source_unique_tamanu_appointment_procedure_types_id.037055b61c": [], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_id.138766fc43": [], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_appointment_id.5ad9e548f4": [], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_procedure_type_id.14840677e5": [], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_created_at.2e4c1b17ce": [], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at.7d42fb36d3": [], "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick.66fee65a6c": [], "test.tamanu.source_unique_tamanu_report_requests_id.d871afb2cf": [], "test.tamanu.source_not_null_tamanu_report_requests_id.8374913dcd": [], "test.tamanu.source_not_null_tamanu_report_requests_created_at.5d76519d08": [], "test.tamanu.source_not_null_tamanu_report_requests_updated_at.60abf391b8": [], "test.tamanu.source_not_null_tamanu_report_requests_recipients.d49a8a2f72": [], "test.tamanu.source_not_null_tamanu_report_requests_status.4eafffa24a": [], "test.tamanu.source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error.526b71b853": [], "test.tamanu.source_not_null_tamanu_report_requests_requested_by_user_id.10828a78a1": [], "test.tamanu.source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_.11b6b8f5c4": [], "test.tamanu.source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_.ce7ace92aa": [], "test.tamanu.source_not_null_tamanu_report_requests_export_format.0e947a46a3": [], "test.tamanu.source_accepted_values_tamanu_report_requests_export_format__xlsx__csv.68903ce3f9": [], "test.tamanu.source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_.c9440b513d": [], "test.tamanu.source_not_null_tamanu_report_requests_updated_at_sync_tick.eef7d7f267": [], "test.tamanu.source_unique_tamanu_reference_drugs_id.b18d9ebb13": [], "test.tamanu.source_not_null_tamanu_reference_drugs_id.262b5ed3f6": [], "test.tamanu.source_unique_tamanu_reference_drugs_reference_data_id.ecedb99e2c": [], "test.tamanu.source_not_null_tamanu_reference_drugs_reference_data_id.69bff85f87": [], "test.tamanu.source_not_null_tamanu_reference_drugs_is_sensitive.e5bd778894": [], "test.tamanu.source_not_null_tamanu_reference_drugs_created_at.56d6a7bcc0": [], "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at.573d9fdd62": [], "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at_sync_tick.82d2c43485": [], "test.tamanu.source_unique_tamanu_invoice_insurer_payments_id.b447e82df0": [], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_id.e4847e6d62": [], "test.tamanu.source_unique_tamanu_invoice_insurer_payments_invoice_payment_id.7dc74551cc": [], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id.d5611881a3": [], "test.tamanu.source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.bb3f5a2cf7": [], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_insurer_id.d4af11cfdf": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_.04f39ad92a": [], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_status.7ac01d0560": [], "test.tamanu.source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected.b655cf463e": [], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_created_at.8b24ac848c": [], "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick.4f3ee2ea02": [], "test.tamanu.source_unique_tamanu_procedures_id.ed36ede291": [], "test.tamanu.source_not_null_tamanu_procedures_id.ba34e3de73": [], "test.tamanu.source_not_null_tamanu_procedures_created_at.04e3942886": [], "test.tamanu.source_not_null_tamanu_procedures_updated_at.25bc26ecf8": [], "test.tamanu.source_not_null_tamanu_procedures_date.dcd844e127": [], "test.tamanu.source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_.e6407dfa85": [], "test.tamanu.source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_.679ed5aba8": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_.357cfc4070": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_.8b2aee60ac": [], "test.tamanu.source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_.b1d682ce39": [], "test.tamanu.source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_.5a3ee51b82": [], "test.tamanu.source_not_null_tamanu_procedures_updated_at_sync_tick.2da29f5157": [], "test.tamanu.source_unique_tamanu_roles_id.0ad588a58a": [], "test.tamanu.source_not_null_tamanu_roles_id.a534c5d463": [], "test.tamanu.source_not_null_tamanu_roles_name.cfc8ac49ef": [], "test.tamanu.source_not_null_tamanu_roles_updated_at_sync_tick.7e4ea46e3f": [], "test.tamanu.source_unique_tamanu_imaging_requests_id.189883862e": [], "test.tamanu.source_not_null_tamanu_imaging_requests_id.d663e704e6": [], "test.tamanu.source_not_null_tamanu_imaging_requests_created_at.d386c49d0f": [], "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at.ea1a5d3b4f": [], "test.tamanu.source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error.a9ecb8382a": [], "test.tamanu.source_not_null_tamanu_imaging_requests_requested_date.4fe72ce056": [], "test.tamanu.source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_.6e73984503": [], "test.tamanu.source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_.120db4235e": [], "test.tamanu.source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_.d4627e3b55": [], "test.tamanu.source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_.70fffaafa5": [], "test.tamanu.source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay.b2d7a7ce17": [], "test.tamanu.source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_.5f80fa9caf": [], "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at_sync_tick.bde3718e92": [], "test.tamanu.source_not_null_tamanu_imaging_requests_display_id.7bf4017999": [], "test.tamanu.source_unique_tamanu_reference_data_id.f40209ddee": [], "test.tamanu.source_not_null_tamanu_reference_data_id.558d36e056": [], "test.tamanu.source_not_null_tamanu_reference_data_created_at.929d48b0fb": [], "test.tamanu.source_not_null_tamanu_reference_data_updated_at.2d38750dde": [], "test.tamanu.source_not_null_tamanu_reference_data_code.45bb74a969": [], "test.tamanu.source_not_null_tamanu_reference_data_type.be10d4a572": [], "test.tamanu.source_not_null_tamanu_reference_data_name.92065a73ea": [], "test.tamanu.source_not_null_tamanu_reference_data_updated_at_sync_tick.c5ae94a272": [], "test.tamanu.source_not_null_tamanu_reference_data_system_required.5345a25d20": [], "test.tamanu.source_unique_tamanu_patient_issues_id.cc84a334be": [], "test.tamanu.source_not_null_tamanu_patient_issues_id.90df660f7f": [], "test.tamanu.source_not_null_tamanu_patient_issues_created_at.e6b6b24d67": [], "test.tamanu.source_not_null_tamanu_patient_issues_updated_at.3d4ab948f0": [], "test.tamanu.source_not_null_tamanu_patient_issues_recorded_date.1adb9dcc27": [], "test.tamanu.source_not_null_tamanu_patient_issues_type.86926f7218": [], "test.tamanu.source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_.d2d3f731fb": [], "test.tamanu.source_not_null_tamanu_patient_issues_updated_at_sync_tick.b613106397": [], "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_source_start_tick.4b0254a181": [], "test.tamanu.source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.f4830d30b3": [], "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.2552341359": [], "test.tamanu.source_unique_tamanu_settings_id.6bf47c8849": [], "test.tamanu.source_not_null_tamanu_settings_id.5ec7f45b36": [], "test.tamanu.source_not_null_tamanu_settings_created_at.8ad3e239a6": [], "test.tamanu.source_not_null_tamanu_settings_updated_at.9dc40b301e": [], "test.tamanu.source_not_null_tamanu_settings_key.83ad9711e6": [], "test.tamanu.source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_.bf1a10aebe": [], "test.tamanu.source_not_null_tamanu_settings_updated_at_sync_tick.9e782f5b11": [], "test.tamanu.source_not_null_tamanu_settings_scope.64d1f26cf2": [], "test.tamanu.source_accepted_values_tamanu_settings_scope__global__central__facility.5ddc355de8": [], "test.tamanu.source_unique_tamanu_lab_test_panel_requests_id.fa501ddd2c": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_id.41fa505d02": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_created_at.8a393e3d79": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at.f165e4a05b": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id.e533aeba03": [], "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_.1bf2e5a1ff": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_encounter_id.ffb89736d8": [], "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_.01f5be3602": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick.c176776d9d": [], "test.tamanu.source_unique_tamanu_vitals_id.fd030294af": [], "test.tamanu.source_not_null_tamanu_vitals_id.18a9bbf45f": [], "test.tamanu.source_not_null_tamanu_vitals_created_at.16b6f3a14f": [], "test.tamanu.source_not_null_tamanu_vitals_updated_at.a07980dfdb": [], "test.tamanu.source_not_null_tamanu_vitals_date_recorded.0d32b23c9f": [], "test.tamanu.source_not_null_tamanu_vitals_updated_at_sync_tick.9962306ac1": [], "test.tamanu.source_unique_tamanu_imaging_type_external_codes_id.99627516fd": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_id.ad31be3508": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_created_at.e2ccce310c": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at.f2a8814402": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_visibility_status.3ef76c80ff": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_imaging_type_code.6104c70b98": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_code.527d0ff6f5": [], "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick.447d3995ee": [], "test.tamanu.source_unique_tamanu_contributing_death_causes_id.626611e2fa": [], "test.tamanu.source_not_null_tamanu_contributing_death_causes_id.0c8b2503cb": [], "test.tamanu.source_not_null_tamanu_contributing_death_causes_time_after_onset.aaabeca43d": [], "test.tamanu.source_not_null_tamanu_contributing_death_causes_patient_death_data_id.d0b021dec5": [], "test.tamanu.source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_.404540bf0a": [], "test.tamanu.source_not_null_tamanu_contributing_death_causes_condition_id.7888faae6b": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_.677e6eaf1b": [], "test.tamanu.source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick.082b545b7a": [], "test.tamanu.source_unique_tamanu_user_login_attempts_id.5f14bcd808": [], "test.tamanu.source_not_null_tamanu_user_login_attempts_id.41946400e6": [], "test.tamanu.source_not_null_tamanu_user_login_attempts_created_at.6e8a042c51": [], "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at.d3d764c50c": [], "test.tamanu.source_not_null_tamanu_user_login_attempts_outcome.75b959648c": [], "test.tamanu.source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_.caa8944999": [], "test.tamanu.source_not_null_tamanu_user_login_attempts_user_id.51a52b5106": [], "test.tamanu.source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_.e19bccc1a5": [], "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.4f8f310f05": [], "test.tamanu.source_unique_tamanu_notes_legacy_id.b36a7a24dd": [], "test.tamanu.source_not_null_tamanu_notes_legacy_id.0ca554e30e": [], "test.tamanu.source_not_null_tamanu_notes_legacy_created_at.1614bfff1e": [], "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at.9cb08b5b1d": [], "test.tamanu.source_not_null_tamanu_notes_legacy_record_id.e04f2d4fd5": [], "test.tamanu.source_not_null_tamanu_notes_legacy_record_type.c368d7d085": [], "test.tamanu.source_not_null_tamanu_notes_legacy_date.ebfcb3c49c": [], "test.tamanu.source_not_null_tamanu_notes_legacy_content.88552a0676": [], "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at_sync_tick.935e8256d0": [], "test.tamanu.source_unique_tamanu_users_id.b46294f196": [], "test.tamanu.source_not_null_tamanu_users_id.7a4497a05a": [], "test.tamanu.source_not_null_tamanu_users_created_at.7bde2fabde": [], "test.tamanu.source_not_null_tamanu_users_updated_at.63853dad90": [], "test.tamanu.source_unique_tamanu_users_email.e8d696ebe0": [], "test.tamanu.source_not_null_tamanu_users_email.c9dd9cef8c": [], "test.tamanu.source_not_null_tamanu_users_display_name.86d7ca2504": [], "test.tamanu.source_not_null_tamanu_users_role.553b7aa11f": [], "test.tamanu.source_not_null_tamanu_users_updated_at_sync_tick.ddaa25a636": [], "test.tamanu.source_not_null_tamanu_users_visibility_status.48d8ce74c3": [], "test.tamanu.source_not_null_tamanu_users_device_registration_quota.06b86bd62e": [], "test.tamanu.dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0.fdd0e2e704": [], "test.tamanu.source_unique_tamanu_location_assignments_id.d7960bf1a5": [], "test.tamanu.source_not_null_tamanu_location_assignments_id.f9c655fff8": [], "test.tamanu.source_not_null_tamanu_location_assignments_user_id.49ff1e2e9a": [], "test.tamanu.source_not_null_tamanu_location_assignments_location_id.4ec3093145": [], "test.tamanu.source_not_null_tamanu_location_assignments_date.41611197a6": [], "test.tamanu.source_not_null_tamanu_location_assignments_start_time.3eaa8dd9bd": [], "test.tamanu.source_not_null_tamanu_location_assignments_end_time.1d084e0550": [], "test.tamanu.source_not_null_tamanu_location_assignments_created_at.df3be173f2": [], "test.tamanu.source_not_null_tamanu_location_assignments_updated_at.31f65e2832": [], "test.tamanu.source_not_null_tamanu_location_assignments_updated_at_sync_tick.b44f74a24f": [], "test.tamanu.source_unique_tamanu_survey_screen_components_id.83c6daf387": [], "test.tamanu.source_not_null_tamanu_survey_screen_components_id.f2559a7214": [], "test.tamanu.source_not_null_tamanu_survey_screen_components_created_at.e0b4cb2d3f": [], "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at.87177a4413": [], "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at_sync_tick.ac240e6aaa": [], "test.tamanu.source_unique_tamanu_tasks_id.78245a380c": [], "test.tamanu.source_not_null_tamanu_tasks_id.5bf790bd4a": [], "test.tamanu.source_not_null_tamanu_tasks_encounter_id.a10fb48922": [], "test.tamanu.source_not_null_tamanu_tasks_name.2bd48eee09": [], "test.tamanu.source_not_null_tamanu_tasks_due_time.786df1eb28": [], "test.tamanu.source_not_null_tamanu_tasks_requested_by_user_id.952e010b84": [], "test.tamanu.source_not_null_tamanu_tasks_request_time.23dfcbcfc2": [], "test.tamanu.source_not_null_tamanu_tasks_status.bac3beba06": [], "test.tamanu.source_not_null_tamanu_tasks_created_at.75a1e0c186": [], "test.tamanu.source_not_null_tamanu_tasks_updated_at.6e16335296": [], "test.tamanu.source_not_null_tamanu_tasks_updated_at_sync_tick.1b04cf33ee": [], "test.tamanu.source_not_null_tamanu_tasks_task_type.4d57fb7d6d": [], "test.tamanu.source_unique_tamanu_imaging_request_areas_id.b9f4c605b2": [], "test.tamanu.source_not_null_tamanu_imaging_request_areas_id.3b96eae2fd": [], "test.tamanu.source_not_null_tamanu_imaging_request_areas_created_at.bbbd373fe1": [], "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at.aab4a9c280": [], "test.tamanu.source_not_null_tamanu_imaging_request_areas_imaging_request_id.c75e5d81dd": [], "test.tamanu.source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_.ea8a5a0600": [], "test.tamanu.source_not_null_tamanu_imaging_request_areas_area_id.e9e04e2311": [], "test.tamanu.source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_.6afdf29a06": [], "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick.cdbd0a0462": [], "test.tamanu.source_unique_tamanu_assets_id.0b004e27a6": [], "test.tamanu.source_not_null_tamanu_assets_id.5903661f6e": [], "test.tamanu.source_not_null_tamanu_assets_name.9ccba2d3d2": [], "test.tamanu.source_not_null_tamanu_assets_type.a71e515992": [], "test.tamanu.source_accepted_values_tamanu_assets_type__image_png__image_svg.4ac901bedb": [], "test.tamanu.source_not_null_tamanu_assets_data.58f7384f54": [], "test.tamanu.source_not_null_tamanu_assets_updated_at_sync_tick.6baf11bd0b": [], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_reference_drug_id.358fa51efa": [], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_facility_id.5012dd6aea": [], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_created_at.8b63abec3a": [], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at.978a5d4017": [], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick.26b8e76f96": [], "test.tamanu.source_not_null_tamanu_reference_drug_facilities_stock_status.290bc96370": [], "test.tamanu.source_unique_tamanu_patient_vrs_data_id.23cca07715": [], "test.tamanu.source_not_null_tamanu_patient_vrs_data_id.4cc64fcbe6": [], "test.tamanu.source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_.a8a8eb7561": [], "test.tamanu.source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.37fb7ca437": [], "test.tamanu.source_unique_tamanu_encounter_pause_prescriptions_id.41bdc9747d": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_id.e57a9fc1b3": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id.fbd245146d": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_duration.dbd59b4962": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit.d2004436c1": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date.e8ca98a8ab": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date.7bc8a722ce": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_created_at.ad1eb449bc": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at.b6f63cea98": [], "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick.242bd8180f": [], "test.tamanu.source_unique_tamanu_pharmacy_orders_id.8a0e450c16": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_id.a04c130d73": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.51e116019a": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_encounter_id.5425699795": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_created_at.c5c0ae80b6": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at.5cbf7e3b7d": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.bc9433fa8e": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_is_discharge_prescription.3adc7ce103": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_date.d54f107a00": [], "test.tamanu.source_not_null_tamanu_pharmacy_orders_facility_id.9a63aff904": [], "test.tamanu.source_unique_tamanu_portal_survey_assignments_id.07592792ba": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_id.493854cb01": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_created_at.28c46a0f38": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at.fba08a91b8": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_patient_id.4d329cbe3d": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_survey_id.4c38bb901d": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_status.cbc3f2b455": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_by_id.0e7bb7620f": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick.71bac26d85": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_at.368a678108": [], "test.tamanu.source_not_null_tamanu_portal_survey_assignments_facility_id.635b864bd0": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.a16be69527": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.92a5a89a02": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id.35608ab0f8": [], "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_.930e94d56c": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id.69ea8c29b8": [], "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_.ca4f2c354a": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_order.d0f90d653c": [], "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick.539440bb36": [], "test.tamanu.source_unique_tamanu_programs_id.62a81a7e37": [], "test.tamanu.source_not_null_tamanu_programs_id.30041338c4": [], "test.tamanu.source_not_null_tamanu_programs_created_at.9b5a061fef": [], "test.tamanu.source_not_null_tamanu_programs_updated_at.1fdd112a50": [], "test.tamanu.source_not_null_tamanu_programs_updated_at_sync_tick.b90cb49ae9": [], "test.tamanu.source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.fad79e2999": [], "test.tamanu.source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.70f0dcb68a": [], "test.tamanu.source_not_null_tamanu_sync_device_ticks_device_id.6e51235a41": [], "test.tamanu.source_unique_tamanu_sync_sessions_id.889d1d85c3": [], "test.tamanu.source_not_null_tamanu_sync_sessions_id.0f66f04bf1": [], "test.tamanu.source_not_null_tamanu_sync_sessions_created_at.0c852b71e6": [], "test.tamanu.source_not_null_tamanu_sync_sessions_updated_at.807ac1b19c": [], "test.tamanu.source_not_null_tamanu_sync_sessions_start_time.10e3f256db": [], "test.tamanu.source_not_null_tamanu_sync_sessions_last_connection_time.c7679203ab": [], "test.tamanu.source_not_null_tamanu_sync_sessions_parameters.f21c74e9cb": [], "test.tamanu.source_unique_tamanu_invoice_patient_payments_id.31f94704f5": [], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_id.a2e9c179c4": [], "test.tamanu.source_unique_tamanu_invoice_patient_payments_invoice_payment_id.6379289247": [], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_invoice_payment_id.b24d465eaf": [], "test.tamanu.source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.e12c61546e": [], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_method_id.49c2b4bb2d": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_.0c32c0d3e1": [], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_created_at.2612097232": [], "test.tamanu.source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick.9cbc6365e6": [], "test.tamanu.source_unique_tamanu_locations_id.09af17ade1": [], "test.tamanu.source_not_null_tamanu_locations_id.406e448574": [], "test.tamanu.source_unique_tamanu_locations_code.dffad8f5ce": [], "test.tamanu.source_not_null_tamanu_locations_code.5c9a7f01c2": [], "test.tamanu.source_not_null_tamanu_locations_name.b6c0a3d9c2": [], "test.tamanu.source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_.def8603286": [], "test.tamanu.source_accepted_values_tamanu_locations_visibility_status__current__historical.8ec0690204": [], "test.tamanu.source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_.351ebd459e": [], "test.tamanu.source_not_null_tamanu_locations_updated_at_sync_tick.3e72adcac5": [], "test.tamanu.source_unique_tamanu_portal_users_id.2af5302ce1": [], "test.tamanu.source_not_null_tamanu_portal_users_id.5d79991deb": [], "test.tamanu.source_not_null_tamanu_portal_users_created_at.dd512de83d": [], "test.tamanu.source_not_null_tamanu_portal_users_updated_at.5a6d07bf8a": [], "test.tamanu.source_not_null_tamanu_portal_users_patient_id.f2014094b2": [], "test.tamanu.source_unique_tamanu_portal_users_email.4ffb54b9ac": [], "test.tamanu.source_not_null_tamanu_portal_users_email.46b31ee79f": [], "test.tamanu.source_not_null_tamanu_portal_users_status.1904f1c6d7": [], "test.tamanu.source_not_null_tamanu_portal_users_updated_at_sync_tick.b6190d5108": [], "test.tamanu.source_unique_tamanu_invoice_item_finalised_insurances_id.7d268a7e0a": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_id.c00db5ebff": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_created_at.c2d663353d": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at.eaa471bbcf": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick.b75138b334": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id.705d63f383": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final.21d527ca7b": [], "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id.61feb9231c": [], "test.tamanu.source_unique_tamanu_task_templates_id.f452d2227f": [], "test.tamanu.source_not_null_tamanu_task_templates_id.0933c9bcea": [], "test.tamanu.source_unique_tamanu_task_templates_reference_data_id.7d4341b2a8": [], "test.tamanu.source_not_null_tamanu_task_templates_reference_data_id.7d5a72304e": [], "test.tamanu.source_not_null_tamanu_task_templates_created_at.dc5ea6d6ea": [], "test.tamanu.source_not_null_tamanu_task_templates_updated_at.4ff8103b44": [], "test.tamanu.source_not_null_tamanu_task_templates_updated_at_sync_tick.91bfaac2c6": [], "test.tamanu.source_unique_tamanu_attachments_id.58d67f1227": [], "test.tamanu.source_not_null_tamanu_attachments_id.89138b8f9e": [], "test.tamanu.source_not_null_tamanu_attachments_type.3fa788a0f1": [], "test.tamanu.source_not_null_tamanu_attachments_data.d8f00c841e": [], "test.tamanu.source_not_null_tamanu_attachments_updated_at_sync_tick.964e5f600d": [], "test.tamanu.source_not_null_tamanu_translated_strings_string_id.7e37c8c4ad": [], "test.tamanu.source_not_null_tamanu_translated_strings_language.5db2b5e2e8": [], "test.tamanu.source_not_null_tamanu_translated_strings_created_at.07e267913e": [], "test.tamanu.source_not_null_tamanu_translated_strings_updated_at.d1e4d3b582": [], "test.tamanu.source_not_null_tamanu_translated_strings_updated_at_sync_tick.25a430f1e2": [], "test.tamanu.source_unique_tamanu_survey_responses_id.7d37627ac3": [], "test.tamanu.source_not_null_tamanu_survey_responses_id.89723bde14": [], "test.tamanu.source_not_null_tamanu_survey_responses_created_at.49ae85efe6": [], "test.tamanu.source_not_null_tamanu_survey_responses_updated_at.1ac4070914": [], "test.tamanu.source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_.f0ce4a9c90": [], "test.tamanu.source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_.5fa54101ad": [], "test.tamanu.source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_.2aef705f04": [], "test.tamanu.source_not_null_tamanu_survey_responses_updated_at_sync_tick.d413782924": [], "test.tamanu.source_unique_tamanu_devices_id.0507752158": [], "test.tamanu.source_not_null_tamanu_devices_id.5c11d14906": [], "test.tamanu.source_not_null_tamanu_devices_created_at.f353e449ee": [], "test.tamanu.source_not_null_tamanu_devices_updated_at.9667683ae2": [], "test.tamanu.source_not_null_tamanu_devices_last_seen_at.940293bbb4": [], "test.tamanu.source_not_null_tamanu_devices_registered_by_id.99c3580040": [], "test.tamanu.source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_.b7e1d90812": [], "test.tamanu.source_not_null_tamanu_devices_scopes.a34bba28b6": [], "test.tamanu.source_unique_tamanu_patient_invoice_insurance_plans_id.d4e0a2e211": [], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_id.67fd40be6c": [], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_created_at.558236cf0c": [], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at.46249b6ee1": [], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_patient_id.88ff695295": [], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id.2ce603fd96": [], "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick.0c00fa1166": [], "test.tamanu.source_unique_tamanu_patient_death_data_id.2155f2b6c6": [], "test.tamanu.source_not_null_tamanu_patient_death_data_id.61b8d549ff": [], "test.tamanu.source_not_null_tamanu_patient_death_data_patient_id.fa93535dcf": [], "test.tamanu.source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_.2640b3d741": [], "test.tamanu.source_not_null_tamanu_patient_death_data_clinician_id.419275886d": [], "test.tamanu.source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_.12e92239d7": [], "test.tamanu.source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_.d81577e3c0": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_.f3a9b1a797": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_.27473a57dc": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_.7ace974f49": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_.1dea4f8138": [], "test.tamanu.source_not_null_tamanu_patient_death_data_updated_at_sync_tick.74f83a5b18": [], "test.tamanu.source_not_null_tamanu_patient_death_data_is_final.f258620126": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_.c7596dc8de": [], "test.tamanu.source_unique_tamanu_procedure_assistant_clinicians_id.c47366f5e6": [], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_id.5e29573c0c": [], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_procedure_id.d372d78257": [], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_user_id.1c73aa9d80": [], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_created_at.6b6e8d8caf": [], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at.29771b97a5": [], "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick.874770378e": [], "test.tamanu.source_unique_tamanu_user_facilities_id.30936aeb5a": [], "test.tamanu.source_not_null_tamanu_user_facilities_id.b28d1c6ab3": [], "test.tamanu.source_not_null_tamanu_user_facilities_updated_at_sync_tick.14851edb16": [], "test.tamanu.source_unique_tamanu_document_metadata_id.25fbd602e6": [], "test.tamanu.source_not_null_tamanu_document_metadata_id.df7500e31c": [], "test.tamanu.source_not_null_tamanu_document_metadata_name.1e7e44b11e": [], "test.tamanu.source_not_null_tamanu_document_metadata_type.ad3c33203c": [], "test.tamanu.source_not_null_tamanu_document_metadata_document_uploaded_at.3e699cede3": [], "test.tamanu.source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_.697577ed3b": [], "test.tamanu.source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_.58f844c909": [], "test.tamanu.source_not_null_tamanu_document_metadata_attachment_id.73279e3459": [], "test.tamanu.source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_.422a5cdedd": [], "test.tamanu.source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_.5942352785": [], "test.tamanu.source_not_null_tamanu_document_metadata_updated_at_sync_tick.818184c71a": [], "test.tamanu.source_not_null_tamanu_document_metadata_source.c7dde3dea4": [], "test.tamanu.source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded.d562bb3947": [], "test.tamanu.source_unique_tamanu_procedure_type_surveys_id.4813977d15": [], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_id.846fa7b74b": [], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_procedure_type_id.05c245e1bc": [], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_survey_id.8490b1ab3d": [], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_created_at.f34e2e523c": [], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at.b5a09d255c": [], "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick.d37ec82a41": [], "test.tamanu.source_unique_tamanu_administered_vaccines_id.1b16daae05": [], "test.tamanu.source_not_null_tamanu_administered_vaccines_id.71c049c95c": [], "test.tamanu.source_not_null_tamanu_administered_vaccines_created_at.311e25104e": [], "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at.81a714c41e": [], "test.tamanu.source_not_null_tamanu_administered_vaccines_status.3bf7e20f14": [], "test.tamanu.source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING.8b8a9d77fd": [], "test.tamanu.source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.7bc6d9cb6e": [], "test.tamanu.source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_.1ab396ce2d": [], "test.tamanu.source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other.a34597923c": [], "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at_sync_tick.1f4a79d8c1": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_.8bc715362f": [], "test.tamanu.source_unique_tamanu_report_definition_versions_id.fc34f6d49c": [], "test.tamanu.source_not_null_tamanu_report_definition_versions_id.aeefc85efc": [], "test.tamanu.source_not_null_tamanu_report_definition_versions_version_number.a1c7832d22": [], "test.tamanu.source_not_null_tamanu_report_definition_versions_status.b2ccf6ba31": [], "test.tamanu.source_accepted_values_tamanu_report_definition_versions_status__draft__published.7b945f9a74": [], "test.tamanu.source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_.b208147bc2": [], "test.tamanu.source_not_null_tamanu_report_definition_versions_user_id.c3351f91fd": [], "test.tamanu.source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_.53887ef192": [], "test.tamanu.source_not_null_tamanu_report_definition_versions_updated_at_sync_tick.c11a1df762": [], "test.tamanu.source_unique_tamanu_sync_lookup_id.dc05d15b43": [], "test.tamanu.source_not_null_tamanu_sync_lookup_id.e77326bde2": [], "test.tamanu.source_not_null_tamanu_sync_lookup_record_id.39e7bce4d2": [], "test.tamanu.source_not_null_tamanu_sync_lookup_record_type.f0bc60b21f": [], "test.tamanu.source_not_null_tamanu_sync_lookup_data.aadfed61f6": [], "test.tamanu.source_not_null_tamanu_sync_lookup_updated_at_sync_tick.902ae4ae9c": [], "test.tamanu.source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_.07efccc886": [], "test.tamanu.source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_.f3141bec3e": [], "test.tamanu.source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_.c67a117f63": [], "test.tamanu.source_not_null_tamanu_sync_lookup_is_lab_request.dbe4ce8b63": [], "test.tamanu.source_not_null_tamanu_sync_lookup_is_deleted.356b4fa211": [], "test.tamanu.source_unique_tamanu_encounter_prescriptions_id.6371d45cc1": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_id.3be49c8399": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_encounter_id.ea618fdd05": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_prescription_id.485995235b": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge.621eb1bc4b": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_created_at.777fb22523": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at.cc684b1350": [], "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick.b07eb557ab": [], "test.tamanu.source_unique_tamanu_notifications_id.51d3db417b": [], "test.tamanu.source_not_null_tamanu_notifications_id.04c2f24f06": [], "test.tamanu.source_not_null_tamanu_notifications_type.a007c8bb26": [], "test.tamanu.source_not_null_tamanu_notifications_status.74f6b456fc": [], "test.tamanu.source_not_null_tamanu_notifications_user_id.72a5473ae9": [], "test.tamanu.source_not_null_tamanu_notifications_created_time.5a54e4d785": [], "test.tamanu.source_not_null_tamanu_notifications_metadata.054778f4a5": [], "test.tamanu.source_not_null_tamanu_notifications_created_at.8d2ded1ce7": [], "test.tamanu.source_not_null_tamanu_notifications_updated_at.ae82c65f62": [], "test.tamanu.source_not_null_tamanu_notifications_updated_at_sync_tick.9098dc98f2": [], "test.tamanu.source_unique_tamanu_reference_medication_templates_id.9c50848c51": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_id.f4e40f0746": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_reference_data_id.655683c6a0": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_medication_id.050df86e27": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_variable_dose.13556de3df": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_prn.6fb35e8eed": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_units.692f7068eb": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_frequency.af51280e00": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_route.a182c49081": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_created_at.f610fc9916": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at.b43c9d5e62": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick.cd13e259c4": [], "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_ongoing.a2332da0d1": [], "test.tamanu.source_unique_tamanu_patient_conditions_id.1b1daf4d86": [], "test.tamanu.source_not_null_tamanu_patient_conditions_id.5d2e0fb3a9": [], "test.tamanu.source_not_null_tamanu_patient_conditions_created_at.deda3b580a": [], "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at.1dc42ed219": [], "test.tamanu.source_not_null_tamanu_patient_conditions_recorded_date.91d95abca2": [], "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at_sync_tick.2e7535fcbb": [], "test.tamanu.source_unique_tamanu_survey_response_answers_id.9ab12c2f4a": [], "test.tamanu.source_not_null_tamanu_survey_response_answers_id.a1a5252fba": [], "test.tamanu.source_not_null_tamanu_survey_response_answers_created_at.6a14b3247f": [], "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at.e9d87e13d5": [], "test.tamanu.source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_.f49aacfe3d": [], "test.tamanu.source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_.a34b366f2b": [], "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at_sync_tick.23337bdabf": [], "test.tamanu.source_unique_tamanu_reference_data_relations_id.0fd94d2b7e": [], "test.tamanu.source_not_null_tamanu_reference_data_relations_id.6816cc32f5": [], "test.tamanu.source_not_null_tamanu_reference_data_relations_created_at.c605cb5fd3": [], "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at.1731c2aeb8": [], "test.tamanu.source_not_null_tamanu_reference_data_relations_type.16a6b96610": [], "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at_sync_tick.b7d71eb49b": [], "test.tamanu.source_unique_tamanu_task_template_designations_id.d2b5b4576a": [], "test.tamanu.source_not_null_tamanu_task_template_designations_id.b21ed442a4": [], "test.tamanu.source_not_null_tamanu_task_template_designations_task_template_id.7cd91a06a9": [], "test.tamanu.source_not_null_tamanu_task_template_designations_designation_id.08e232161f": [], "test.tamanu.source_not_null_tamanu_task_template_designations_created_at.c02e7baa62": [], "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at.8c60186f8d": [], "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at_sync_tick.a7118edaf1": [], "test.tamanu.source_unique_tamanu_permissions_id.f42c77c5be": [], "test.tamanu.source_not_null_tamanu_permissions_id.6ee02405bb": [], "test.tamanu.source_not_null_tamanu_permissions_role_id.de3cb0b624": [], "test.tamanu.source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_.5a5a1be407": [], "test.tamanu.source_not_null_tamanu_permissions_noun.e00a302536": [], "test.tamanu.source_not_null_tamanu_permissions_verb.7e7206e395": [], "test.tamanu.source_not_null_tamanu_permissions_updated_at_sync_tick.cb90c585be": [], "test.tamanu.source_unique_tamanu_patient_field_definition_categories_id.7b788d0c37": [], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_id.a80a45d121": [], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_created_at.aca434dbf3": [], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at.f6f9f3ee6a": [], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_name.a7913c1d45": [], "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick.e345b399c6": [], "test.tamanu.source_unique_tamanu_medication_administration_record_doses_id.433dfbdead": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_id.a52e3aa0c8": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_amount.331e93abb3": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_time.1ccce1a649": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_by_user_id.65d6a1441b": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id.a78608d49f": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_mar_id.5c2f68633d": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_created_at.d2ae234e45": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at.3bad2c9822": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick.fc7397bf69": [], "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_index.c22ff9799c": [], "test.tamanu.source_unique_tamanu_facilities_id.9e454badf4": [], "test.tamanu.source_not_null_tamanu_facilities_id.ad186295b9": [], "test.tamanu.source_not_null_tamanu_facilities_code.55fbf8c36c": [], "test.tamanu.source_not_null_tamanu_facilities_name.9ac276f33d": [], "test.tamanu.source_accepted_values_tamanu_facilities_visibility_status__current__historical.1f32aa4a9d": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_.0a191fc0e4": [], "test.tamanu.source_not_null_tamanu_facilities_updated_at_sync_tick.5ebc0505a1": [], "test.tamanu.source_not_null_tamanu_facilities_is_sensitive.83efc1299f": [], "test.tamanu.source_unique_tamanu_encounter_history_id.b5104bb3a4": [], "test.tamanu.source_not_null_tamanu_encounter_history_id.98f4907b32": [], "test.tamanu.source_not_null_tamanu_encounter_history_created_at.d7d91fd2e8": [], "test.tamanu.source_not_null_tamanu_encounter_history_updated_at.cafd8d5cb6": [], "test.tamanu.source_not_null_tamanu_encounter_history_date.5840578e29": [], "test.tamanu.source_not_null_tamanu_encounter_history_encounter_id.5d9223d72c": [], "test.tamanu.source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_.98ae5b7d3b": [], "test.tamanu.source_not_null_tamanu_encounter_history_department_id.2bf94ddc1c": [], "test.tamanu.source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_.cc3dcc54fd": [], "test.tamanu.source_not_null_tamanu_encounter_history_location_id.5b7796abc8": [], "test.tamanu.source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_.c9d4f477fb": [], "test.tamanu.source_not_null_tamanu_encounter_history_examiner_id.96fc96334d": [], "test.tamanu.source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_.b2d555c7b6": [], "test.tamanu.source_not_null_tamanu_encounter_history_encounter_type.a7b6e21a3c": [], "test.tamanu.source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.af58070d62": [], "test.tamanu.source_not_null_tamanu_encounter_history_updated_at_sync_tick.6ea4b7b4cd": [], "test.tamanu.source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_.fbf272ed47": [], "test.tamanu.source_not_null_tamanu_encounter_history_change_type.53d3e33bca": [], "test.tamanu.source_unique_tamanu_patient_program_registrations_id.82d7fead9b": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_id.3e27cbc953": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_created_at.b6bbcb66a6": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at.7b0cb3a4d3": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_date.ee77ca5f67": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_registration_status.f99db0e260": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_patient_id.21a8bab832": [], "test.tamanu.source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_.edaef8726f": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_program_registry_id.c9b21e72ac": [], "test.tamanu.source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_.ca26255395": [], "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_.f60ae13805": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_clinician_id.f5eec02863": [], "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_.660ded928b": [], "test.tamanu.source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_.0915c99f9a": [], "test.tamanu.source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_.e70f29b144": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_.db6437c554": [], "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick.6e539b8d2d": [], "test.tamanu.source_unique_tamanu_lab_test_panels_id.509550e62b": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_id.11a6b51e6b": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_created_at.da26e7a248": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at.b4f58197df": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_name.3fdd4c9c83": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_code.41611b6a55": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_visibility_status.482b848a4d": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_.f5578be7c6": [], "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.bd90caed16": [], "test.tamanu.source_unique_tamanu_appointments_id.5632c4fc60": [], "test.tamanu.source_not_null_tamanu_appointments_id.d1a6de3ce4": [], "test.tamanu.source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_.994c2060a5": [], "test.tamanu.source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_.b2920f6fec": [], "test.tamanu.source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_.894dbd0b29": [], "test.tamanu.source_not_null_tamanu_appointments_type_legacy.cd7aaf3419": [], "test.tamanu.source_not_null_tamanu_appointments_status.3078c54556": [], "test.tamanu.source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled.2b51753ed0": [], "test.tamanu.source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_.b603c9c40f": [], "test.tamanu.source_not_null_tamanu_appointments_updated_at_sync_tick.fc1a99ab76": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_.e993598733": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_.d6a8261230": [], "test.tamanu.source_not_null_tamanu_appointments_is_high_priority.3c2beccb9c": [], "test.tamanu.source_unique_tamanu_patient_family_histories_id.403e2d1751": [], "test.tamanu.source_not_null_tamanu_patient_family_histories_id.d2d0e80b7f": [], "test.tamanu.source_not_null_tamanu_patient_family_histories_created_at.8ee5173bfa": [], "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at.c710d3b7b3": [], "test.tamanu.source_not_null_tamanu_patient_family_histories_recorded_date.ec1039e1d3": [], "test.tamanu.source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_.3f50556d92": [], "test.tamanu.source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_.1464fe93d6": [], "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.569a8c1cce": [], "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at_sync_tick.eff3f46718": [], "test.tamanu.source_unique_tamanu_ips_requests_id.3f494ccf34": [], "test.tamanu.source_not_null_tamanu_ips_requests_id.82d75ba779": [], "test.tamanu.source_not_null_tamanu_ips_requests_created_at.28215c9764": [], "test.tamanu.source_not_null_tamanu_ips_requests_updated_at.b1c150635e": [], "test.tamanu.source_not_null_tamanu_ips_requests_patient_id.b5ad6ea558": [], "test.tamanu.source_not_null_tamanu_ips_requests_created_by.943d0fec8d": [], "test.tamanu.source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_.9e7a2bec9f": [], "test.tamanu.source_not_null_tamanu_ips_requests_status.680fa2f376": [], "test.tamanu.source_not_null_tamanu_ips_requests_email.29f30a58bf": [], "test.tamanu.source_not_null_tamanu_ips_requests_updated_at_sync_tick.72991067d9": [], "test.tamanu.source_unique_tamanu_user_recently_viewed_patients_id.723cf05c7a": [], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_id.0772796918": [], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_created_at.60a2cd8b3e": [], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_updated_at.f76b5440b3": [], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_user_id.8e3a703839": [], "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_patient_id.3c02c3c6e8": [], "test.tamanu.source_unique_tamanu_sync_queued_devices_id.6c914cf2fe": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_id.8a7ff7ff9d": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_seen_time.e49db9d307": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_synced_tick.ebca46f7d5": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_urgent.cdd3e5fe6d": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_created_at.ca84df51b3": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_updated_at.3c113842b4": [], "test.tamanu.source_not_null_tamanu_sync_queued_devices_facility_ids.1c565eb9fd": [], "test.tamanu.source_unique_tamanu_patient_secondary_ids_id.3ac199e68c": [], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_id.c12a4d4ff4": [], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_value.ecfec42154": [], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_visibility_status.687573a37f": [], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_type_id.1c5040f680": [], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_patient_id.b8437631c2": [], "test.tamanu.source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick.f04774a463": [], "test.tamanu.source_unique_tamanu_lab_request_attachments_id.b7eb3f1eb1": [], "test.tamanu.source_not_null_tamanu_lab_request_attachments_id.6f2075f317": [], "test.tamanu.source_not_null_tamanu_lab_request_attachments_created_at.b587e22da8": [], "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at.ce5b0e489b": [], "test.tamanu.source_not_null_tamanu_lab_request_attachments_attachment_id.6a6139cc22": [], "test.tamanu.source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_.eff1df818f": [], "test.tamanu.source_not_null_tamanu_lab_request_attachments_lab_request_id.15bc6fc2df": [], "test.tamanu.source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_.8995368506": [], "test.tamanu.source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_.5c53ecfc7d": [], "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick.a0d8b0a6ba": [], "test.tamanu.source_unique_tamanu_vital_logs_id.3a1b593bf4": [], "test.tamanu.source_not_null_tamanu_vital_logs_id.2865672c8c": [], "test.tamanu.source_not_null_tamanu_vital_logs_created_at.1c50457539": [], "test.tamanu.source_not_null_tamanu_vital_logs_updated_at.fad4900972": [], "test.tamanu.source_not_null_tamanu_vital_logs_date.19b648a68b": [], "test.tamanu.source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error.f8319959ff": [], "test.tamanu.source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_.7c5a5dd055": [], "test.tamanu.source_not_null_tamanu_vital_logs_answer_id.a061b3580d": [], "test.tamanu.source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_.345fc6ff26": [], "test.tamanu.source_not_null_tamanu_vital_logs_updated_at_sync_tick.8257970877": [], "source.tamanu.fhir__tamanu.specimens": ["test.tamanu.source_not_null_fhir__tamanu_specimens_id.7098c20560", "test.tamanu.source_not_null_fhir__tamanu_specimens_is_live.99d3cadd54", "test.tamanu.source_not_null_fhir__tamanu_specimens_last_updated.6f9a98122d", "test.tamanu.source_not_null_fhir__tamanu_specimens_resolved.80b78d06fe", "test.tamanu.source_not_null_fhir__tamanu_specimens_upstream_id.f9565a425c", "test.tamanu.source_not_null_fhir__tamanu_specimens_version_id.a13ea95e5c", "test.tamanu.source_unique_fhir__tamanu_specimens_id.7d00fb0248"], "source.tamanu.fhir__tamanu.non_fhir_medici_report": ["test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_id.5521fce097", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_encounter_start_date.4142e92001", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_first_name.21865513be", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_id.ed54e5fea6", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_is_live.8f4e5b7426", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_name.cb5b40a829", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_last_updated.ab705926fd", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_patient_id.3bb8a03bae", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_resolved.592feba481", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_sex.dfa61ee459", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_upstream_id.68db39c9c1", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_version_id.adc82d8370", "test.tamanu.source_not_null_fhir__tamanu_non_fhir_medici_report_visit_type.ee7f06020a", "test.tamanu.source_unique_fhir__tamanu_non_fhir_medici_report_id.0e2dad7c7b"], "source.tamanu.fhir__tamanu.encounters": ["test.tamanu.source_accepted_values_fhir__tamanu_encounters_status__in_progress__discharged.ea2dd4dc2a", "test.tamanu.source_not_null_fhir__tamanu_encounters_id.5459be3bbc", "test.tamanu.source_not_null_fhir__tamanu_encounters_is_live.c401845261", "test.tamanu.source_not_null_fhir__tamanu_encounters_last_updated.199565a5e7", "test.tamanu.source_not_null_fhir__tamanu_encounters_resolved.8217d372c8", "test.tamanu.source_not_null_fhir__tamanu_encounters_status.7255ffba7d", "test.tamanu.source_not_null_fhir__tamanu_encounters_upstream_id.9257212a57", "test.tamanu.source_not_null_fhir__tamanu_encounters_version_id.8f4dcb3a64", "test.tamanu.source_unique_fhir__tamanu_encounters_id.bdda44ec81"], "source.tamanu.fhir__tamanu.patients": ["test.tamanu.source_not_null_fhir__tamanu_patients_active.922409a478", "test.tamanu.source_not_null_fhir__tamanu_patients_address.1e80038399", "test.tamanu.source_not_null_fhir__tamanu_patients_extension.e3b05cb34a", "test.tamanu.source_not_null_fhir__tamanu_patients_gender.a288fa3d46", "test.tamanu.source_not_null_fhir__tamanu_patients_id.0c43d4a03e", "test.tamanu.source_not_null_fhir__tamanu_patients_identifier.96f86bad18", "test.tamanu.source_not_null_fhir__tamanu_patients_is_live.f6662d2722", "test.tamanu.source_not_null_fhir__tamanu_patients_last_updated.65b7545398", "test.tamanu.source_not_null_fhir__tamanu_patients_name.0e7b5767d3", "test.tamanu.source_not_null_fhir__tamanu_patients_resolved.f5739ac9ca", "test.tamanu.source_not_null_fhir__tamanu_patients_telecom.9515617b10", "test.tamanu.source_not_null_fhir__tamanu_patients_upstream_id.dc466caaf3", "test.tamanu.source_not_null_fhir__tamanu_patients_version_id.6f3ced7026", "test.tamanu.source_unique_fhir__tamanu_patients_id.85cfe6c3ea"], "source.tamanu.fhir__tamanu.medication_requests": ["test.tamanu.source_not_null_fhir__tamanu_medication_requests_id.7fa1f94c15", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_intent.063b6ce234", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_is_live.d31095549d", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_last_updated.26ce392978", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_resolved.d4ecb04fda", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_status.24aa06df0c", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_upstream_id.354715d4f3", "test.tamanu.source_not_null_fhir__tamanu_medication_requests_version_id.21066cfc57", "test.tamanu.source_unique_fhir__tamanu_medication_requests_id.538c5993b6", "test.tamanu.source_unique_fhir__tamanu_medication_requests_upstream_id.73906b5380"], "source.tamanu.fhir__tamanu.service_requests": ["test.tamanu.source_accepted_values_fhir__tamanu_service_requests_intent__order.a25886f00a", "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_priority__routine__urgent__asap__stat.abe483e472", "test.tamanu.source_accepted_values_fhir__tamanu_service_requests_status__draft__active__on_hold__revoked__completed__entered_in_error__unknown.08fbf0e1e4", "test.tamanu.source_not_null_fhir__tamanu_service_requests_category.af95957557", "test.tamanu.source_not_null_fhir__tamanu_service_requests_id.a59c3d7e06", "test.tamanu.source_not_null_fhir__tamanu_service_requests_identifier.73b3472574", "test.tamanu.source_not_null_fhir__tamanu_service_requests_is_live.0922cb4130", "test.tamanu.source_not_null_fhir__tamanu_service_requests_last_updated.e3657976a4", "test.tamanu.source_not_null_fhir__tamanu_service_requests_location_code.c8c33ef722", "test.tamanu.source_not_null_fhir__tamanu_service_requests_order_detail.be8e9124fc", "test.tamanu.source_not_null_fhir__tamanu_service_requests_resolved.92e4b8bf48", "test.tamanu.source_not_null_fhir__tamanu_service_requests_upstream_id.81cbc8acb4", "test.tamanu.source_not_null_fhir__tamanu_service_requests_version_id.136a4ee810", "test.tamanu.source_unique_fhir__tamanu_service_requests_id.e6a309054d"], "source.tamanu.fhir__tamanu.jobs": ["test.tamanu.source_accepted_values_fhir__tamanu_jobs_status__Queued__Grabbed__Started__Errored.42189fdf8f", "test.tamanu.source_not_null_fhir__tamanu_jobs_created_at.6a7f288177", "test.tamanu.source_not_null_fhir__tamanu_jobs_discriminant.5c7d80ea70", "test.tamanu.source_not_null_fhir__tamanu_jobs_id.51acd6ac1e", "test.tamanu.source_not_null_fhir__tamanu_jobs_payload.20e661456f", "test.tamanu.source_not_null_fhir__tamanu_jobs_priority.2313d9b744", "test.tamanu.source_not_null_fhir__tamanu_jobs_status.efd7e342aa", "test.tamanu.source_not_null_fhir__tamanu_jobs_topic.98c2f9b4b2", "test.tamanu.source_not_null_fhir__tamanu_jobs_updated_at.90a980bdc8", "test.tamanu.source_unique_fhir__tamanu_jobs_discriminant.22b1361683", "test.tamanu.source_unique_fhir__tamanu_jobs_id.96f908c26e"], "source.tamanu.fhir__tamanu.job_workers": ["test.tamanu.source_not_null_fhir__tamanu_job_workers_created_at.860a644fd1", "test.tamanu.source_not_null_fhir__tamanu_job_workers_id.c3476b3eb9", "test.tamanu.source_not_null_fhir__tamanu_job_workers_metadata.e61a2ced27", "test.tamanu.source_not_null_fhir__tamanu_job_workers_updated_at.0fe62e1558", "test.tamanu.source_unique_fhir__tamanu_job_workers_id.dee0269c4e"], "source.tamanu.fhir__tamanu.immunizations": ["test.tamanu.source_accepted_values_fhir__tamanu_immunizations_status__completed__entered_in_error__not_done.38601d1fe7", "test.tamanu.source_not_null_fhir__tamanu_immunizations_id.7f90c3dd59", "test.tamanu.source_not_null_fhir__tamanu_immunizations_is_live.f8992f894b", "test.tamanu.source_not_null_fhir__tamanu_immunizations_last_updated.62a54529c6", "test.tamanu.source_not_null_fhir__tamanu_immunizations_patient.8dcba1e0e1", "test.tamanu.source_not_null_fhir__tamanu_immunizations_performer.29b3a99986", "test.tamanu.source_not_null_fhir__tamanu_immunizations_protocol_applied.563e648d14", "test.tamanu.source_not_null_fhir__tamanu_immunizations_resolved.ff096f7b43", "test.tamanu.source_not_null_fhir__tamanu_immunizations_site.b1fa3dddbb", "test.tamanu.source_not_null_fhir__tamanu_immunizations_status.4ce41d1f44", "test.tamanu.source_not_null_fhir__tamanu_immunizations_upstream_id.5882d9e14e", "test.tamanu.source_not_null_fhir__tamanu_immunizations_vaccine_code.ed1ac8c537", "test.tamanu.source_not_null_fhir__tamanu_immunizations_version_id.f3bbf1cc3b", "test.tamanu.source_unique_fhir__tamanu_immunizations_id.596d017734"], "source.tamanu.fhir__tamanu.organizations": ["test.tamanu.source_not_null_fhir__tamanu_organizations_id.ac18b655d1", "test.tamanu.source_not_null_fhir__tamanu_organizations_is_live.edc801380a", "test.tamanu.source_not_null_fhir__tamanu_organizations_last_updated.c79b2ea09a", "test.tamanu.source_not_null_fhir__tamanu_organizations_name.9dbf1f951c", "test.tamanu.source_not_null_fhir__tamanu_organizations_resolved.813365ad2b", "test.tamanu.source_not_null_fhir__tamanu_organizations_upstream_id.3c212df269", "test.tamanu.source_not_null_fhir__tamanu_organizations_version_id.f0fa91055e", "test.tamanu.source_unique_fhir__tamanu_organizations_id.e211eaf17e"], "source.tamanu.fhir__tamanu.practitioners": ["test.tamanu.source_not_null_fhir__tamanu_practitioners_id.296f73c09b", "test.tamanu.source_not_null_fhir__tamanu_practitioners_is_live.f0077a943a", "test.tamanu.source_not_null_fhir__tamanu_practitioners_last_updated.324d60604b", "test.tamanu.source_not_null_fhir__tamanu_practitioners_resolved.18050ffab2", "test.tamanu.source_not_null_fhir__tamanu_practitioners_upstream_id.3446e5bb3c", "test.tamanu.source_not_null_fhir__tamanu_practitioners_version_id.42684fbfa8", "test.tamanu.source_unique_fhir__tamanu_practitioners_id.a2b4a981a6"], "source.tamanu.logs__tamanu.migrations": ["test.tamanu.source_not_null_logs__tamanu_migrations_device_id.30a569c46c", "test.tamanu.source_not_null_logs__tamanu_migrations_direction.c83fad8f7e", "test.tamanu.source_not_null_logs__tamanu_migrations_id.5638ece336", "test.tamanu.source_not_null_logs__tamanu_migrations_logged_at.9b591e2016", "test.tamanu.source_not_null_logs__tamanu_migrations_migrations.bf597438c3", "test.tamanu.source_not_null_logs__tamanu_migrations_record_sync_tick.ddbd48d1c1", "test.tamanu.source_not_null_logs__tamanu_migrations_updated_at_sync_tick.2ee4244e54", "test.tamanu.source_not_null_logs__tamanu_migrations_version.ad4fd97571", "test.tamanu.source_unique_logs__tamanu_migrations_id.12ea87b61e"], "source.tamanu.logs__tamanu.changes": ["test.tamanu.source_not_null_logs__tamanu_changes_created_at.3b82d26023", "test.tamanu.source_not_null_logs__tamanu_changes_device_id.e56e90ec9d", "test.tamanu.source_not_null_logs__tamanu_changes_id.866e117189", "test.tamanu.source_not_null_logs__tamanu_changes_logged_at.1def9d3088", "test.tamanu.source_not_null_logs__tamanu_changes_record_created_at.d09f0598ea", "test.tamanu.source_not_null_logs__tamanu_changes_record_data.83bbd4bbf6", "test.tamanu.source_not_null_logs__tamanu_changes_record_id.782318322c", "test.tamanu.source_not_null_logs__tamanu_changes_record_updated_at.7ba7742260", "test.tamanu.source_not_null_logs__tamanu_changes_table_name.0b42537bc6", "test.tamanu.source_not_null_logs__tamanu_changes_table_oid.b9844b50e8", "test.tamanu.source_not_null_logs__tamanu_changes_table_schema.3e59c96f61", "test.tamanu.source_not_null_logs__tamanu_changes_updated_at_sync_tick.c1c5731de8", "test.tamanu.source_not_null_logs__tamanu_changes_updated_by_user_id.82cb04062b", "test.tamanu.source_not_null_logs__tamanu_changes_version.9d511c5658", "test.tamanu.source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_.7c9053d465", "test.tamanu.source_unique_logs__tamanu_changes_id.dd0bf715d9"], "source.tamanu.logs__tamanu.dhis2_pushes": ["test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_created_at.53c44d382b", "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_id.5b06029985", "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_report_id.5a861460f0", "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_status.b440e65629", "test.tamanu.source_not_null_logs__tamanu_dhis2_pushes_updated_at.46346dc2f0", "test.tamanu.source_unique_logs__tamanu_dhis2_pushes_id.0da5ddfd43"], "source.tamanu.logs__tamanu.debug_logs": ["test.tamanu.source_accepted_values_logs__tamanu_debug_logs_type__syncLookupUpdate.827ca373d0", "test.tamanu.source_not_null_logs__tamanu_debug_logs_id.2cd56785d4", "test.tamanu.source_not_null_logs__tamanu_debug_logs_info.5cb0ccb1a0", "test.tamanu.source_not_null_logs__tamanu_debug_logs_type.78622a3567", "test.tamanu.source_unique_logs__tamanu_debug_logs_id.a03e8469cd"], "source.tamanu.logs__tamanu.accesses": ["test.tamanu.source_not_null_logs__tamanu_accesses_back_end_context.c461ef5b10", "test.tamanu.source_not_null_logs__tamanu_accesses_created_at.c559af59c4", "test.tamanu.source_not_null_logs__tamanu_accesses_device_id.277d95b364", "test.tamanu.source_not_null_logs__tamanu_accesses_front_end_context.aeef6880f0", "test.tamanu.source_not_null_logs__tamanu_accesses_id.47650015e9", "test.tamanu.source_not_null_logs__tamanu_accesses_is_mobile.87cbc52937", "test.tamanu.source_not_null_logs__tamanu_accesses_logged_at.aee8df31c7", "test.tamanu.source_not_null_logs__tamanu_accesses_record_id.c49d0f4d84", "test.tamanu.source_not_null_logs__tamanu_accesses_record_type.b59437e552", "test.tamanu.source_not_null_logs__tamanu_accesses_session_id.3968767d39", "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at.d68343154e", "test.tamanu.source_not_null_logs__tamanu_accesses_updated_at_sync_tick.82731184f9", "test.tamanu.source_not_null_logs__tamanu_accesses_user_id.4731fc507d", "test.tamanu.source_not_null_logs__tamanu_accesses_version.92cc727c2e", "test.tamanu.source_unique_logs__tamanu_accesses_id.58775d956a"], "source.tamanu.logs__tamanu.fhir_writes": ["test.tamanu.source_not_null_logs__tamanu_fhir_writes_body.face3433a2", "test.tamanu.source_not_null_logs__tamanu_fhir_writes_created_at.6a5dde6c84", "test.tamanu.source_not_null_logs__tamanu_fhir_writes_headers.d9c7e90be8", "test.tamanu.source_not_null_logs__tamanu_fhir_writes_id.82c7762d53", "test.tamanu.source_not_null_logs__tamanu_fhir_writes_url.1acf607faf", "test.tamanu.source_not_null_logs__tamanu_fhir_writes_verb.2b0319d883", "test.tamanu.source_unique_logs__tamanu_fhir_writes_id.8353be29e8"], "source.tamanu.tamanu.patient_allergies": ["test.tamanu.source_not_null_tamanu_patient_allergies_created_at.59905c68e2", "test.tamanu.source_not_null_tamanu_patient_allergies_id.f1126d18a5", "test.tamanu.source_not_null_tamanu_patient_allergies_recorded_date.de31b171cd", "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at.048547273e", "test.tamanu.source_not_null_tamanu_patient_allergies_updated_at_sync_tick.14fb342ab8", "test.tamanu.source_unique_tamanu_patient_allergies_id.898e40bfbb"], "source.tamanu.tamanu.triages": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_.26a3871e3a", "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_.3203451a40", "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_.8c9e664e44", "test.tamanu.source_not_null_tamanu_triages_created_at.9d4e7381d6", "test.tamanu.source_not_null_tamanu_triages_id.8276269bfd", "test.tamanu.source_not_null_tamanu_triages_updated_at.3cd54f2d9b", "test.tamanu.source_not_null_tamanu_triages_updated_at_sync_tick.38a343c27f", "test.tamanu.source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_.3903adeec0", "test.tamanu.source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_.9341ff1138", "test.tamanu.source_unique_tamanu_triages_id.86b3cfdd35"], "source.tamanu.tamanu.imaging_area_external_codes": ["test.tamanu.source_not_null_tamanu_imaging_area_external_codes_area_id.b59576cea8", "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_code.af72562338", "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_created_at.5a8be2828e", "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_id.fe52d7eda4", "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at.fde1da72e8", "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_updated_at_sync_tick.1bfbc765fb", "test.tamanu.source_not_null_tamanu_imaging_area_external_codes_visibility_status.83963919d0", "test.tamanu.source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_.32280d3e7c", "test.tamanu.source_unique_tamanu_imaging_area_external_codes_area_id.050349fa98", "test.tamanu.source_unique_tamanu_imaging_area_external_codes_id.ac26885b2b"], "source.tamanu.tamanu.socket_io_attachments": ["test.tamanu.source_not_null_tamanu_socket_io_attachments_id.acd275c6dc", "test.tamanu.source_not_null_tamanu_socket_io_attachments_updated_at_sync_tick.8169c97d48", "test.tamanu.source_unique_tamanu_socket_io_attachments_id.919f1a7156"], "source.tamanu.tamanu.report_definitions": ["test.tamanu.source_not_null_tamanu_report_definitions_db_schema.f939e6dfa3", "test.tamanu.source_not_null_tamanu_report_definitions_id.b8bb2a951d", "test.tamanu.source_not_null_tamanu_report_definitions_name.a630c1f799", "test.tamanu.source_not_null_tamanu_report_definitions_updated_at_sync_tick.3d8f13be51", "test.tamanu.source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_.b208147bc2", "test.tamanu.source_unique_tamanu_report_definitions_id.26898ce7eb", "test.tamanu.source_unique_tamanu_report_definitions_name.2f942767b6"], "source.tamanu.tamanu.one_time_logins": ["test.tamanu.source_not_null_tamanu_one_time_logins_expires_at.0051cd2e03", "test.tamanu.source_not_null_tamanu_one_time_logins_id.6318f1fc0d", "test.tamanu.source_not_null_tamanu_one_time_logins_token.6b7dbabb08", "test.tamanu.source_not_null_tamanu_one_time_logins_user_id.ebe1f826af", "test.tamanu.source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_.93741528ac", "test.tamanu.source_unique_tamanu_one_time_logins_id.b1d11d6c3f"], "source.tamanu.tamanu.invoice_price_lists": ["test.tamanu.source_not_null_tamanu_invoice_price_lists_code.741a3b08ab", "test.tamanu.source_not_null_tamanu_invoice_price_lists_created_at.84fe51b659", "test.tamanu.source_not_null_tamanu_invoice_price_lists_id.dc8853229e", "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at.75781a813a", "test.tamanu.source_not_null_tamanu_invoice_price_lists_updated_at_sync_tick.ff56fc27cb", "test.tamanu.source_not_null_tamanu_invoice_price_lists_visibility_status.a2ae9351b7", "test.tamanu.source_unique_tamanu_invoice_price_lists_id.92912c617f"], "source.tamanu.tamanu.patient_contacts": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_.98d8247d27", "test.tamanu.source_accepted_values_tamanu_patient_contacts_method__Email__Sms__WhatsApp__Telegram.8c6857119c", "test.tamanu.source_not_null_tamanu_patient_contacts_created_at.29d447b596", "test.tamanu.source_not_null_tamanu_patient_contacts_id.9e63606ba7", "test.tamanu.source_not_null_tamanu_patient_contacts_method.37c9585829", "test.tamanu.source_not_null_tamanu_patient_contacts_name.2a5f2c99f9", "test.tamanu.source_not_null_tamanu_patient_contacts_patient_id.58de0a1f28", "test.tamanu.source_not_null_tamanu_patient_contacts_relationship_id.20abe6c3b2", "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at.e81c827845", "test.tamanu.source_not_null_tamanu_patient_contacts_updated_at_sync_tick.3d648b4683", "test.tamanu.source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_.606993d615", "test.tamanu.source_unique_tamanu_patient_contacts_id.3c41111688"], "source.tamanu.tamanu.certificate_notifications": ["test.tamanu.source_accepted_values_tamanu_certificate_notifications_status__Queued__Processed__Error__Ignore.3450abc93a", "test.tamanu.source_accepted_values_tamanu_certificate_notifications_type__covid_19_clearance__vaccination_certificate__icao_test__icao_vacc.ca722e42a5", "test.tamanu.source_not_null_tamanu_certificate_notifications_id.7757b0046d", "test.tamanu.source_not_null_tamanu_certificate_notifications_status.561750c1e5", "test.tamanu.source_not_null_tamanu_certificate_notifications_type.a7491c4721", "test.tamanu.source_not_null_tamanu_certificate_notifications_updated_at_sync_tick.7cb5b88cb7", "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_.3cf536fdbe", "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_.7bacb605d5", "test.tamanu.source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_.445dca3a7a", "test.tamanu.source_unique_tamanu_certificate_notifications_id.71e705665b"], "source.tamanu.tamanu.medication_administration_records": ["test.tamanu.source_accepted_values_tamanu_medication_administration_records_status__GIVEN__NOT_GIVEN.5e232a0448", "test.tamanu.source_not_null_tamanu_medication_administration_records_created_at.9f08841aa3", "test.tamanu.source_not_null_tamanu_medication_administration_records_due_at.448f2c2000", "test.tamanu.source_not_null_tamanu_medication_administration_records_id.052d1d08f9", "test.tamanu.source_not_null_tamanu_medication_administration_records_is_auto_generated.092ff3874d", "test.tamanu.source_not_null_tamanu_medication_administration_records_is_edited.178286708a", "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at.f0bd0e1339", "test.tamanu.source_not_null_tamanu_medication_administration_records_updated_at_sync_tick.59617cf32f", "test.tamanu.source_unique_tamanu_medication_administration_records_id.90c6de3c48"], "source.tamanu.tamanu.templates": ["test.tamanu.source_not_null_tamanu_templates_id.4e582a2692", "test.tamanu.source_not_null_tamanu_templates_name.5251789780", "test.tamanu.source_not_null_tamanu_templates_type.6083b4eb5c", "test.tamanu.source_not_null_tamanu_templates_updated_at_sync_tick.68f02a36e6", "test.tamanu.source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_.e25012c12c", "test.tamanu.source_unique_tamanu_templates_id.2cf6e18998"], "source.tamanu.tamanu.program_registry_condition_categories": ["test.tamanu.source_not_null_tamanu_program_registry_condition_categories_code.a8f2bb54d7", "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_created_at.a0f967234b", "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_id.a5fda78261", "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_name.e875bc9167", "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_program_registry_id.bef6922940", "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at.704b596025", "test.tamanu.source_not_null_tamanu_program_registry_condition_categories_updated_at_sync_tick.62ea28ae95", "test.tamanu.source_unique_tamanu_program_registry_condition_categories_id.18374f5f6e"], "source.tamanu.tamanu.procedure_survey_responses": ["test.tamanu.source_not_null_tamanu_procedure_survey_responses_created_at.8143f338d9", "test.tamanu.source_not_null_tamanu_procedure_survey_responses_id.a4c8f21301", "test.tamanu.source_not_null_tamanu_procedure_survey_responses_procedure_id.d49cf97456", "test.tamanu.source_not_null_tamanu_procedure_survey_responses_survey_response_id.08df151a05", "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at.d9d19cd3aa", "test.tamanu.source_not_null_tamanu_procedure_survey_responses_updated_at_sync_tick.7ee597b2e3", "test.tamanu.source_unique_tamanu_procedure_survey_responses_id.f04f0f3841"], "source.tamanu.tamanu.pharmacy_order_prescriptions": ["test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_created_at.f3e852be35", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_id.fd53b388c3", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_is_completed.d0fc6c67a0", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_pharmacy_order_id.00d2c5b906", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_prescription_id.5a6d9c2855", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_quantity.02521782a2", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at.4e7669a584", "test.tamanu.source_not_null_tamanu_pharmacy_order_prescriptions_updated_at_sync_tick.eb82a5ba2b", "test.tamanu.source_unique_tamanu_pharmacy_order_prescriptions_id.03a99815d2"], "source.tamanu.tamanu.location_groups": ["test.tamanu.source_accepted_values_tamanu_location_groups_visibility_status__current__historical.5756cd0b4b", "test.tamanu.source_not_null_tamanu_location_groups_code.c2bcc0bf4f", "test.tamanu.source_not_null_tamanu_location_groups_created_at.b199e250ad", "test.tamanu.source_not_null_tamanu_location_groups_facility_id.d062db3ac7", "test.tamanu.source_not_null_tamanu_location_groups_id.00f301e9d3", "test.tamanu.source_not_null_tamanu_location_groups_is_bookable.c3c0909cd0", "test.tamanu.source_not_null_tamanu_location_groups_name.983b6df532", "test.tamanu.source_not_null_tamanu_location_groups_updated_at.4a9b84a719", "test.tamanu.source_not_null_tamanu_location_groups_updated_at_sync_tick.b75e499255", "test.tamanu.source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_.b603c9c40f", "test.tamanu.source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_.5f80fa9caf", "test.tamanu.source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_.ecb02b7330", "test.tamanu.source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_.351ebd459e", "test.tamanu.source_unique_tamanu_location_groups_id.92f4a5e856"], "source.tamanu.tamanu.invoice_products": ["test.tamanu.source_not_null_tamanu_invoice_products_created_at.815791ae0e", "test.tamanu.source_not_null_tamanu_invoice_products_id.9b98c43ede", "test.tamanu.source_not_null_tamanu_invoice_products_insurable.94732ef307", "test.tamanu.source_not_null_tamanu_invoice_products_name.c01b81d553", "test.tamanu.source_not_null_tamanu_invoice_products_updated_at_sync_tick.510c557616", "test.tamanu.source_not_null_tamanu_invoice_products_visibility_status.a7dd9ecfa0", "test.tamanu.source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_.46ad5d1e2f", "test.tamanu.source_unique_tamanu_invoice_products_id.abc4b55436"], "source.tamanu.tamanu.certifiable_vaccines": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_.7fbca1adbc", "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_.2a45c16791", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_created_at.ed08316054", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_disease_code.c672804493", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_icd11_drug_code.e0022050d1", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_id.b73eb6daff", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_maximum_dosage.ab28eb0766", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at.57aee6fafd", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_updated_at_sync_tick.ce5ff28250", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_code.6c9677a1ed", "test.tamanu.source_not_null_tamanu_certifiable_vaccines_vaccine_id.836f9ff4fb", "test.tamanu.source_unique_tamanu_certifiable_vaccines_id.f0a184f1a0", "test.tamanu.source_unique_tamanu_certifiable_vaccines_vaccine_id.ab754e124f"], "source.tamanu.tamanu.task_designations": ["test.tamanu.source_not_null_tamanu_task_designations_created_at.60f756cdb6", "test.tamanu.source_not_null_tamanu_task_designations_designation_id.dc0adb2396", "test.tamanu.source_not_null_tamanu_task_designations_id.2c04a11c88", "test.tamanu.source_not_null_tamanu_task_designations_task_id.d0e443e977", "test.tamanu.source_not_null_tamanu_task_designations_updated_at.14c7cc7b2e", "test.tamanu.source_not_null_tamanu_task_designations_updated_at_sync_tick.6da15a7273", "test.tamanu.source_unique_tamanu_task_designations_id.adf46ec6db"], "source.tamanu.tamanu.appointment_schedules": ["test.tamanu.source_not_null_tamanu_appointment_schedules_created_at.51ddaf1fe0", "test.tamanu.source_not_null_tamanu_appointment_schedules_frequency.1a456b5d85", "test.tamanu.source_not_null_tamanu_appointment_schedules_id.61a1963563", "test.tamanu.source_not_null_tamanu_appointment_schedules_interval.09395917c8", "test.tamanu.source_not_null_tamanu_appointment_schedules_is_fully_generated.fd5b4e8ebf", "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at.ceb401c90c", "test.tamanu.source_not_null_tamanu_appointment_schedules_updated_at_sync_tick.3902446442", "test.tamanu.source_unique_tamanu_appointment_schedules_id.0a8d801e6f"], "source.tamanu.tamanu.scheduled_vaccines": ["test.tamanu.source_accepted_values_tamanu_scheduled_vaccines_category__Campaign__Catchup__Other__Routine.c38ebd4174", "test.tamanu.source_not_null_tamanu_scheduled_vaccines_created_at.af5ea94ddb", "test.tamanu.source_not_null_tamanu_scheduled_vaccines_hide_from_certificate.69f1da7070", "test.tamanu.source_not_null_tamanu_scheduled_vaccines_id.5f527b2c7d", "test.tamanu.source_not_null_tamanu_scheduled_vaccines_sort_index.b8dba8349e", "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at.bbfa85d08b", "test.tamanu.source_not_null_tamanu_scheduled_vaccines_updated_at_sync_tick.b312aecb83", "test.tamanu.source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.7bc6d9cb6e", "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.37ba12bfdf", "test.tamanu.source_unique_tamanu_scheduled_vaccines_id.2034f06a45"], "source.tamanu.tamanu.user_localisation_caches": ["test.tamanu.source_not_null_tamanu_user_localisation_caches_id.31e4c40fbd", "test.tamanu.source_not_null_tamanu_user_localisation_caches_localisation.6988ef3ae3", "test.tamanu.source_unique_tamanu_user_localisation_caches_id.32edbc1226"], "source.tamanu.tamanu.invoice_item_discounts": ["test.tamanu.source_not_null_tamanu_invoice_item_discounts_amount.0e8480cee8", "test.tamanu.source_not_null_tamanu_invoice_item_discounts_created_at.664f2faa45", "test.tamanu.source_not_null_tamanu_invoice_item_discounts_id.bcff96eb2f", "test.tamanu.source_not_null_tamanu_invoice_item_discounts_invoice_item_id.3398752f5b", "test.tamanu.source_not_null_tamanu_invoice_item_discounts_type.f759ed12f3", "test.tamanu.source_not_null_tamanu_invoice_item_discounts_updated_at_sync_tick.15b4636f1b", "test.tamanu.source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_.18c0b3db45", "test.tamanu.source_unique_tamanu_invoice_item_discounts_id.171e1a5e94"], "source.tamanu.tamanu.portal_one_time_tokens": ["test.tamanu.source_not_null_tamanu_portal_one_time_tokens_created_at.1c1279979b", "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_expires_at.e45d1c82d9", "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_id.ab6f761724", "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_portal_user_id.5159527428", "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_token.8afdc93478", "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_type.5c33a4037d", "test.tamanu.source_not_null_tamanu_portal_one_time_tokens_updated_at.b077921d8b", "test.tamanu.source_unique_tamanu_portal_one_time_tokens_id.84f65f30bf"], "source.tamanu.tamanu.invoice_discounts": ["test.tamanu.source_not_null_tamanu_invoice_discounts_applied_by_user_id.eacadbca1c", "test.tamanu.source_not_null_tamanu_invoice_discounts_applied_time.de2863c9b1", "test.tamanu.source_not_null_tamanu_invoice_discounts_created_at.2a4d9814f4", "test.tamanu.source_not_null_tamanu_invoice_discounts_id.e5dd8872f8", "test.tamanu.source_not_null_tamanu_invoice_discounts_invoice_id.e692b8ae47", "test.tamanu.source_not_null_tamanu_invoice_discounts_is_manual.e5a0d85a43", "test.tamanu.source_not_null_tamanu_invoice_discounts_percentage.eeb4864a35", "test.tamanu.source_not_null_tamanu_invoice_discounts_updated_at_sync_tick.96efd53160", "test.tamanu.source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_.4ec462b6c3", "test.tamanu.source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_.93879e6aa1", "test.tamanu.source_unique_tamanu_invoice_discounts_id.90b9b4d8a6"], "source.tamanu.tamanu.program_registry_conditions": ["test.tamanu.source_not_null_tamanu_program_registry_conditions_code.6e0f8d91fe", "test.tamanu.source_not_null_tamanu_program_registry_conditions_created_at.f1a67190af", "test.tamanu.source_not_null_tamanu_program_registry_conditions_id.96669373a2", "test.tamanu.source_not_null_tamanu_program_registry_conditions_name.fb44ee2d53", "test.tamanu.source_not_null_tamanu_program_registry_conditions_program_registry_id.8b4085a6a4", "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at.2f0d7717b7", "test.tamanu.source_not_null_tamanu_program_registry_conditions_updated_at_sync_tick.81caed205f", "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_.bfef5107bf", "test.tamanu.source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_.4b46b0e413", "test.tamanu.source_unique_tamanu_program_registry_conditions_code.9e9e23890c", "test.tamanu.source_unique_tamanu_program_registry_conditions_id.8aed9112e7"], "source.tamanu.tamanu.invoice_payments": ["test.tamanu.source_not_null_tamanu_invoice_payments_amount.ce266dd7a6", "test.tamanu.source_not_null_tamanu_invoice_payments_created_at.a163e272e6", "test.tamanu.source_not_null_tamanu_invoice_payments_date.7761ae0a7d", "test.tamanu.source_not_null_tamanu_invoice_payments_id.3dad87d906", "test.tamanu.source_not_null_tamanu_invoice_payments_invoice_id.f83a526a9f", "test.tamanu.source_not_null_tamanu_invoice_payments_receipt_number.bd93ab85a8", "test.tamanu.source_not_null_tamanu_invoice_payments_updated_at_sync_tick.011299b145", "test.tamanu.source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.bb3f5a2cf7", "test.tamanu.source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.e12c61546e", "test.tamanu.source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_.d07f617060", "test.tamanu.source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_.11aa785c7b", "test.tamanu.source_unique_tamanu_invoice_payments_id.0aeb9e30d1", "test.tamanu.source_unique_tamanu_invoice_payments_original_payment_id.76c596c1fd"], "source.tamanu.tamanu.patient_additional_data": ["test.tamanu.source_accepted_values_tamanu_patient_additional_data_blood_type__A___A___AB___AB___B___B___O___O_.d16028f9e4", "test.tamanu.source_accepted_values_tamanu_patient_additional_data_marital_status__Defacto__Married__Single__Widow__Divorced__Separated__Unknown.663d1d9b1c", "test.tamanu.source_not_null_tamanu_patient_additional_data_patient_id.9eb859e167", "test.tamanu.source_not_null_tamanu_patient_additional_data_updated_at_sync_tick.d93ed515bf", "test.tamanu.source_unique_tamanu_patient_additional_data_patient_id.765b349cc6"], "source.tamanu.tamanu.upcoming_vaccinations": ["test.tamanu.source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_.32e4981e6c", "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.37ba12bfdf"], "source.tamanu.tamanu.user_preferences": ["test.tamanu.source_not_null_tamanu_user_preferences_created_at.b4868da62e", "test.tamanu.source_not_null_tamanu_user_preferences_id.0563337670", "test.tamanu.source_not_null_tamanu_user_preferences_key.42f62cbf6e", "test.tamanu.source_not_null_tamanu_user_preferences_updated_at.e3fb22ee58", "test.tamanu.source_not_null_tamanu_user_preferences_updated_at_sync_tick.68db073099", "test.tamanu.source_not_null_tamanu_user_preferences_user_id.de0ee34cbb", "test.tamanu.source_not_null_tamanu_user_preferences_value.05dc3d9f13", "test.tamanu.source_unique_tamanu_user_preferences_id.ff8617d0af"], "source.tamanu.tamanu.patient_field_values": ["test.tamanu.source_not_null_tamanu_patient_field_values_created_at.acd6792845", "test.tamanu.source_not_null_tamanu_patient_field_values_definition_id.afb3baa363", "test.tamanu.source_not_null_tamanu_patient_field_values_patient_id.d726e4e785", "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at.dc8ebd5fcb", "test.tamanu.source_not_null_tamanu_patient_field_values_updated_at_sync_tick.37926ff0c2", "test.tamanu.source_not_null_tamanu_patient_field_values_value.20bfdc4dc5", "test.tamanu.source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_.7942c868d5", "test.tamanu.source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_.7e29294f59"], "source.tamanu.tamanu.referrals": ["test.tamanu.source_accepted_values_tamanu_referrals_status__pending__cancelled__completed.86187bc5c9", "test.tamanu.source_not_null_tamanu_referrals_created_at.7dc2e9f62e", "test.tamanu.source_not_null_tamanu_referrals_id.b643c6e9cf", "test.tamanu.source_not_null_tamanu_referrals_status.b2da9beb55", "test.tamanu.source_not_null_tamanu_referrals_updated_at.319fc895ee", "test.tamanu.source_not_null_tamanu_referrals_updated_at_sync_tick.475afc0dcb", "test.tamanu.source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_.dc1e9922b6", "test.tamanu.source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_.e17964499c", "test.tamanu.source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_.36148d215d", "test.tamanu.source_unique_tamanu_referrals_id.724932b7f0"], "source.tamanu.tamanu.lab_request_logs": ["test.tamanu.source_not_null_tamanu_lab_request_logs_id.fe608e09fd", "test.tamanu.source_not_null_tamanu_lab_request_logs_status.8e024043da", "test.tamanu.source_not_null_tamanu_lab_request_logs_updated_at_sync_tick.960428a44f", "test.tamanu.source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_.f8e2c6d82e", "test.tamanu.source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_.86e7966883", "test.tamanu.source_unique_tamanu_lab_request_logs_id.7acd19c7d3"], "source.tamanu.tamanu.user_leaves": ["test.tamanu.source_not_null_tamanu_user_leaves_created_at.638cb66e18", "test.tamanu.source_not_null_tamanu_user_leaves_end_date.69c42bf7d9", "test.tamanu.source_not_null_tamanu_user_leaves_id.3c0b468b6b", "test.tamanu.source_not_null_tamanu_user_leaves_start_date.a4376146d4", "test.tamanu.source_not_null_tamanu_user_leaves_updated_at.045e6c9ad2", "test.tamanu.source_not_null_tamanu_user_leaves_updated_at_sync_tick.05dfeae565", "test.tamanu.source_not_null_tamanu_user_leaves_user_id.df71d24528", "test.tamanu.source_unique_tamanu_user_leaves_id.f9fb006fa5"], "source.tamanu.tamanu.user_designations": ["test.tamanu.source_not_null_tamanu_user_designations_created_at.db3f67069a", "test.tamanu.source_not_null_tamanu_user_designations_designation_id.f9b573eeb8", "test.tamanu.source_not_null_tamanu_user_designations_id.be521369b8", "test.tamanu.source_not_null_tamanu_user_designations_updated_at.4bbf71e0b0", "test.tamanu.source_not_null_tamanu_user_designations_updated_at_sync_tick.934bc4ad06", "test.tamanu.source_not_null_tamanu_user_designations_user_id.2b15af1d80", "test.tamanu.source_unique_tamanu_user_designations_id.85f719d07a"], "source.tamanu.tamanu.patient_field_definitions": ["test.tamanu.source_accepted_values_tamanu_patient_field_definitions_field_type__string__number__select.8c8193f02d", "test.tamanu.source_not_null_tamanu_patient_field_definitions_category_id.5bb661f0af", "test.tamanu.source_not_null_tamanu_patient_field_definitions_created_at.b7c144e251", "test.tamanu.source_not_null_tamanu_patient_field_definitions_field_type.01dad44ce8", "test.tamanu.source_not_null_tamanu_patient_field_definitions_id.3b31aed01d", "test.tamanu.source_not_null_tamanu_patient_field_definitions_name.a1fb4fbbdb", "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at.812399208c", "test.tamanu.source_not_null_tamanu_patient_field_definitions_updated_at_sync_tick.9334037106", "test.tamanu.source_not_null_tamanu_patient_field_definitions_visibility_status.353a97d1ea", "test.tamanu.source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_.d67c1014d6", "test.tamanu.source_relationships_tamanu_patient_field_values_definition_id__id__source_tamanu_patient_field_definitions_.7942c868d5", "test.tamanu.source_unique_tamanu_patient_field_definitions_id.96d277b7c5"], "source.tamanu.tamanu.lab_test_types": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.8034332af4", "test.tamanu.source_accepted_values_tamanu_lab_test_types_result_type__FreeText__Number__Select.e7c22c9eca", "test.tamanu.source_not_null_tamanu_lab_test_types_code.84b27e0faa", "test.tamanu.source_not_null_tamanu_lab_test_types_created_at.6a4f074401", "test.tamanu.source_not_null_tamanu_lab_test_types_id.0d085cde9d", "test.tamanu.source_not_null_tamanu_lab_test_types_is_sensitive.7905ffff94", "test.tamanu.source_not_null_tamanu_lab_test_types_name.87dee5eabd", "test.tamanu.source_not_null_tamanu_lab_test_types_result_type.a33f1d56c0", "test.tamanu.source_not_null_tamanu_lab_test_types_unit.953f194d89", "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at.34e9cce3fa", "test.tamanu.source_not_null_tamanu_lab_test_types_updated_at_sync_tick.f5cbb064a4", "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_.ca4f2c354a", "test.tamanu.source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_.1db3f2d26e", "test.tamanu.source_unique_tamanu_lab_test_types_id.59d45fd4c8"], "source.tamanu.tamanu.prescriptions": ["test.tamanu.source_not_null_tamanu_prescriptions_created_at.ce02db9537", "test.tamanu.source_not_null_tamanu_prescriptions_date.a2e0f3a811", "test.tamanu.source_not_null_tamanu_prescriptions_frequency.387650c017", "test.tamanu.source_not_null_tamanu_prescriptions_id.acb2ebf90d", "test.tamanu.source_not_null_tamanu_prescriptions_start_date.6b47c62ca9", "test.tamanu.source_not_null_tamanu_prescriptions_units.04b2e47d71", "test.tamanu.source_not_null_tamanu_prescriptions_updated_at.db8ce11745", "test.tamanu.source_not_null_tamanu_prescriptions_updated_at_sync_tick.ccc1aacb8b", "test.tamanu.source_unique_tamanu_prescriptions_id.e43fe53647"], "source.tamanu.tamanu.medication_dispenses": ["test.tamanu.source_not_null_tamanu_medication_dispenses_created_at.e8d7e87757", "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_at.515dc80dcb", "test.tamanu.source_not_null_tamanu_medication_dispenses_dispensed_by_user_id.afdbe34024", "test.tamanu.source_not_null_tamanu_medication_dispenses_id.4e57f1d462", "test.tamanu.source_not_null_tamanu_medication_dispenses_pharmacy_order_prescription_id.d4c0bafee8", "test.tamanu.source_not_null_tamanu_medication_dispenses_quantity.362d1d5f50", "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at.76e722a377", "test.tamanu.source_not_null_tamanu_medication_dispenses_updated_at_sync_tick.463ee92e91", "test.tamanu.source_unique_tamanu_medication_dispenses_id.3794f39031"], "source.tamanu.tamanu.encounters": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_.ecb4200032", "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_.6759a4eea9", "test.tamanu.source_accepted_values_tamanu_encounters_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.6454543933", "test.tamanu.source_not_null_tamanu_encounters_created_at.5a9caa2a2b", "test.tamanu.source_not_null_tamanu_encounters_encounter_type.169507cb50", "test.tamanu.source_not_null_tamanu_encounters_id.3d82b88759", "test.tamanu.source_not_null_tamanu_encounters_patient_id.14f6d7e7fb", "test.tamanu.source_not_null_tamanu_encounters_start_date.a5dec75857", "test.tamanu.source_not_null_tamanu_encounters_updated_at.65ef63b763", "test.tamanu.source_not_null_tamanu_encounters_updated_at_sync_tick.1eb037d2f2", "test.tamanu.source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_.1ab396ce2d", "test.tamanu.source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_.43adeff312", "test.tamanu.source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_.58f844c909", "test.tamanu.source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_.16e875a59a", "test.tamanu.source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_.90c10b0836", "test.tamanu.source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_.98ae5b7d3b", "test.tamanu.source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_.54b3d36175", "test.tamanu.source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_.1a33a59a12", "test.tamanu.source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_.37f810a377", "test.tamanu.source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_.86e006efba", "test.tamanu.source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_.b6110183f5", "test.tamanu.source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_.6e73984503", "test.tamanu.source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_.5dd1ea3660", "test.tamanu.source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_.ead6a9d3f0", "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_.01f5be3602", "test.tamanu.source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_.e6407dfa85", "test.tamanu.source_relationships_tamanu_referrals_completing_encounter_id__id__source_tamanu_encounters_.dc1e9922b6", "test.tamanu.source_relationships_tamanu_referrals_initiating_encounter_id__id__source_tamanu_encounters_.e17964499c", "test.tamanu.source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_.5fa54101ad", "test.tamanu.source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_.f3141bec3e", "test.tamanu.source_relationships_tamanu_triages_encounter_id__id__source_tamanu_encounters_.3903adeec0", "test.tamanu.source_unique_tamanu_encounters_id.6da54b7f38"], "source.tamanu.tamanu.encounter_diets": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_.e71c59d77d", "test.tamanu.source_not_null_tamanu_encounter_diets_created_at.0f3c391127", "test.tamanu.source_not_null_tamanu_encounter_diets_diet_id.f096ba53ad", "test.tamanu.source_not_null_tamanu_encounter_diets_encounter_id.56ca3f2a1c", "test.tamanu.source_not_null_tamanu_encounter_diets_id.d0805612f7", "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at.1a3c4fcb7f", "test.tamanu.source_not_null_tamanu_encounter_diets_updated_at_sync_tick.1e9301afae", "test.tamanu.source_relationships_tamanu_encounter_diets_encounter_id__id__source_tamanu_encounters_.90c10b0836", "test.tamanu.source_unique_tamanu_encounter_diets_id.da8f18a027"], "source.tamanu.tamanu.encounter_diagnoses": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.6536f09069", "test.tamanu.source_accepted_values_tamanu_encounter_diagnoses_certainty__confirmed__disproven__emergency__error__suspected.9dcc845ca8", "test.tamanu.source_not_null_tamanu_encounter_diagnoses_created_at.2e0c2e1d40", "test.tamanu.source_not_null_tamanu_encounter_diagnoses_date.3cb9b9f92a", "test.tamanu.source_not_null_tamanu_encounter_diagnoses_id.5010c4db2d", "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at.e843942ea8", "test.tamanu.source_not_null_tamanu_encounter_diagnoses_updated_at_sync_tick.82fe91df26", "test.tamanu.source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_.98d7d9c464", "test.tamanu.source_relationships_tamanu_encounter_diagnoses_encounter_id__id__source_tamanu_encounters_.16e875a59a", "test.tamanu.source_unique_tamanu_encounter_diagnoses_id.d52ee9adc9"], "source.tamanu.tamanu.program_data_elements": ["test.tamanu.source_not_null_tamanu_program_data_elements_created_at.3a9a1d2f6d", "test.tamanu.source_not_null_tamanu_program_data_elements_id.0e73c12f56", "test.tamanu.source_not_null_tamanu_program_data_elements_type.5a4507db5e", "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at.3f3cecdcc3", "test.tamanu.source_not_null_tamanu_program_data_elements_updated_at_sync_tick.d9577c2030", "test.tamanu.source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_.a34b366f2b", "test.tamanu.source_unique_tamanu_program_data_elements_id.a75c7468d4"], "source.tamanu.tamanu.patient_birth_data": ["test.tamanu.source_accepted_values_tamanu_patient_birth_data_attendant_at_birth__doctor__midwife__nurse__traditional_birth_attentdant__other.f7dbbb7dc8", "test.tamanu.source_accepted_values_tamanu_patient_birth_data_birth_delivery_type__normal_vaginal_delivery__breech__emergency_c_section__elective_c_section__vacuum_extraction__forceps__other.cdd88bca26", "test.tamanu.source_accepted_values_tamanu_patient_birth_data_registered_birth_place__health_facility__home__other.68a09fae97", "test.tamanu.source_not_null_tamanu_patient_birth_data_created_at.ee3353eccc", "test.tamanu.source_not_null_tamanu_patient_birth_data_patient_id.7c9d7da294", "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at.96f99396c0", "test.tamanu.source_not_null_tamanu_patient_birth_data_updated_at_sync_tick.ad66b3a9e9", "test.tamanu.source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_.41f2b0a645", "test.tamanu.source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_.535a68dcb7", "test.tamanu.source_unique_tamanu_patient_birth_data_patient_id.8e97708df0"], "source.tamanu.tamanu.program_registries": ["test.tamanu.source_accepted_values_tamanu_program_registries_currently_at_type__village__facility.878b7101a5", "test.tamanu.source_not_null_tamanu_program_registries_code.42a17fd859", "test.tamanu.source_not_null_tamanu_program_registries_created_at.ec096818cc", "test.tamanu.source_not_null_tamanu_program_registries_currently_at_type.1181424fbc", "test.tamanu.source_not_null_tamanu_program_registries_id.e8dd600ce7", "test.tamanu.source_not_null_tamanu_program_registries_name.7b40894126", "test.tamanu.source_not_null_tamanu_program_registries_program_id.86ea68d449", "test.tamanu.source_not_null_tamanu_program_registries_updated_at.b636966c96", "test.tamanu.source_not_null_tamanu_program_registries_updated_at_sync_tick.5bea147746", "test.tamanu.source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_.ca26255395", "test.tamanu.source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_.5a69a4eefa", "test.tamanu.source_relationships_tamanu_program_registry_conditions_program_registry_id__id__source_tamanu_program_registries_.4b46b0e413", "test.tamanu.source_unique_tamanu_program_registries_code.6aae9c851a", "test.tamanu.source_unique_tamanu_program_registries_id.4591df7852"], "source.tamanu.tamanu.invoice_insurance_plans": ["test.tamanu.source_not_null_tamanu_invoice_insurance_plans_code.5691576988", "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_created_at.6a73080b49", "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_id.4c3a005a8c", "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at.1382c20539", "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_updated_at_sync_tick.1671b13fb3", "test.tamanu.source_not_null_tamanu_invoice_insurance_plans_visibility_status.3bdc27963d", "test.tamanu.source_unique_tamanu_invoice_insurance_plans_id.c93eebe7c9"], "source.tamanu.tamanu.note_items": ["test.tamanu.source_not_null_tamanu_note_items_content.cdcdc58bd6", "test.tamanu.source_not_null_tamanu_note_items_created_at.6c19cc76af", "test.tamanu.source_not_null_tamanu_note_items_date.b7ba7d298b", "test.tamanu.source_not_null_tamanu_note_items_id.e102088706", "test.tamanu.source_not_null_tamanu_note_items_note_page_id.e6a2a1ff2b", "test.tamanu.source_not_null_tamanu_note_items_updated_at.c552d1546c", "test.tamanu.source_not_null_tamanu_note_items_updated_at_sync_tick.9c0561f44d", "test.tamanu.source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_.1029ad90a3", "test.tamanu.source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_.11dd57c56b", "test.tamanu.source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_.35728438ca", "test.tamanu.source_relationships_tamanu_note_items_revised_by_id__id__source_tamanu_note_items_.1c2976179a", "test.tamanu.source_unique_tamanu_note_items_id.6a3c41e3a8"], "source.tamanu.tamanu.encounter_pause_prescription_histories": ["test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action.36a50d92fd", "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_action_date.fff7387332", "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_created_at.1766fe12bb", "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_encounter_prescription_id.6431100b96", "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_id.9371741f30", "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at.bce04537f7", "test.tamanu.source_not_null_tamanu_encounter_pause_prescription_histories_updated_at_sync_tick.1a62809ae2", "test.tamanu.source_unique_tamanu_encounter_pause_prescription_histories_id.242095e95a"], "source.tamanu.tamanu.program_registry_clinical_statuses": ["test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_code.b6dbb55eee", "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_created_at.db653414c9", "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_id.5152485ff1", "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_name.1483c9ad54", "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_program_registry_id.51f24319f9", "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at.74ec57dc65", "test.tamanu.source_not_null_tamanu_program_registry_clinical_statuses_updated_at_sync_tick.a28eb831c8", "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_.f60ae13805", "test.tamanu.source_relationships_tamanu_program_registry_clinical_statuses_program_registry_id__id__source_tamanu_program_registries_.5a69a4eefa", "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_code.93a7de7fa7", "test.tamanu.source_unique_tamanu_program_registry_clinical_statuses_id.6579ad9f9e"], "source.tamanu.tamanu.local_system_facts": ["test.tamanu.source_not_null_tamanu_local_system_facts_id.b86094ee5b", "test.tamanu.source_not_null_tamanu_local_system_facts_key.d313f0ba6d", "test.tamanu.source_unique_tamanu_local_system_facts_id.fec4c53d21"], "source.tamanu.tamanu.invoices_invoice_insurance_plans": ["test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_created_at.3c4109e1f6", "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_id.81fdb96190", "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_id.06e1c59b11", "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_invoice_insurance_plan_id.b21c244f33", "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at.23b9b151a0", "test.tamanu.source_not_null_tamanu_invoices_invoice_insurance_plans_updated_at_sync_tick.65d4601e80", "test.tamanu.source_unique_tamanu_invoices_invoice_insurance_plans_id.33a1630253"], "source.tamanu.tamanu.refresh_tokens": ["test.tamanu.source_not_null_tamanu_refresh_tokens_device_id.b6b31e60be", "test.tamanu.source_not_null_tamanu_refresh_tokens_expires_at.a515544921", "test.tamanu.source_not_null_tamanu_refresh_tokens_id.470a9a0ad1", "test.tamanu.source_not_null_tamanu_refresh_tokens_refresh_id.1f1f3cc868", "test.tamanu.source_not_null_tamanu_refresh_tokens_user_id.78eb836f95", "test.tamanu.source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_.ba625319c2", "test.tamanu.source_unique_tamanu_refresh_tokens_id.0c9c64d141"], "source.tamanu.tamanu.death_revert_logs": ["test.tamanu.source_not_null_tamanu_death_revert_logs_created_at.c782214dc7", "test.tamanu.source_not_null_tamanu_death_revert_logs_death_data_id.4889452a8a", "test.tamanu.source_not_null_tamanu_death_revert_logs_id.6df645dcf5", "test.tamanu.source_not_null_tamanu_death_revert_logs_patient_id.12123f0c05", "test.tamanu.source_not_null_tamanu_death_revert_logs_revert_time.3e0bd39153", "test.tamanu.source_not_null_tamanu_death_revert_logs_reverted_by_id.34e5a69137", "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at.844962c5a1", "test.tamanu.source_not_null_tamanu_death_revert_logs_updated_at_sync_tick.24982eacdf", "test.tamanu.source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_.a370a6342c", "test.tamanu.source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_.ab4f34cd7c", "test.tamanu.source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_.953c559e54", "test.tamanu.source_unique_tamanu_death_revert_logs_id.001d670317"], "source.tamanu.tamanu.patient_program_registration_conditions": ["test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_created_at.ffd5ec434b", "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_date.51631f2975", "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_id.148f05b382", "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_program_registry_condition_category_id.e4d2008618", "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at.ec3ed984e8", "test.tamanu.source_not_null_tamanu_patient_program_registration_conditions_updated_at_sync_tick.9a6307d740", "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_.1928169432", "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_.329bc7b403", "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_program_registry_condition_id__id__source_tamanu_program_registry_conditions_.bfef5107bf", "test.tamanu.source_unique_tamanu_patient_program_registration_conditions_id.18c7acc7c5"], "source.tamanu.tamanu.patients": ["test.tamanu.source_accepted_values_tamanu_patients_sex__female__male__other.a3c5a2bdc7", "test.tamanu.source_not_null_tamanu_patients_created_at.f10f4a4622", "test.tamanu.source_not_null_tamanu_patients_display_id.faf4f13c00", "test.tamanu.source_not_null_tamanu_patients_id.275ed05302", "test.tamanu.source_not_null_tamanu_patients_sex.107df8a545", "test.tamanu.source_not_null_tamanu_patients_updated_at.907998e8ed", "test.tamanu.source_not_null_tamanu_patients_updated_at_sync_tick.937dfa8d54", "test.tamanu.source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_.994c2060a5", "test.tamanu.source_relationships_tamanu_certificate_notifications_patient_id__id__source_tamanu_patients_.445dca3a7a", "test.tamanu.source_relationships_tamanu_death_revert_logs_patient_id__id__source_tamanu_patients_.ab4f34cd7c", "test.tamanu.source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_.697577ed3b", "test.tamanu.source_relationships_tamanu_encounters_patient_id__id__source_tamanu_patients_.86e006efba", "test.tamanu.source_relationships_tamanu_patient_birth_data_patient_id__id__source_tamanu_patients_.535a68dcb7", "test.tamanu.source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_.f0401833ba", "test.tamanu.source_relationships_tamanu_patient_contacts_patient_id__id__source_tamanu_patients_.606993d615", "test.tamanu.source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_.2640b3d741", "test.tamanu.source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_.62c931e062", "test.tamanu.source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_.3f50556d92", "test.tamanu.source_relationships_tamanu_patient_field_values_patient_id__id__source_tamanu_patients_.7e29294f59", "test.tamanu.source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_.d2d3f731fb", "test.tamanu.source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_.edaef8726f", "test.tamanu.source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_.a8a8eb7561", "test.tamanu.source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_.07efccc886", "test.tamanu.source_relationships_tamanu_upcoming_vaccinations_patient_id__id__source_tamanu_patients_.32e4981e6c", "test.tamanu.source_unique_tamanu_patients_display_id.d601818f72", "test.tamanu.source_unique_tamanu_patients_id.aad3b90c9d"], "source.tamanu.tamanu.departments": ["test.tamanu.source_not_null_tamanu_departments_code.196489124d", "test.tamanu.source_not_null_tamanu_departments_id.4f5628ebfb", "test.tamanu.source_not_null_tamanu_departments_name.3448ffbf45", "test.tamanu.source_not_null_tamanu_departments_updated_at_sync_tick.3876957182", "test.tamanu.source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_.632d512530", "test.tamanu.source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_.5942352785", "test.tamanu.source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_.cc3dcc54fd", "test.tamanu.source_relationships_tamanu_encounters_department_id__id__source_tamanu_departments_.54b3d36175", "test.tamanu.source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_.b8a500a3ec", "test.tamanu.source_unique_tamanu_departments_id.f24dde60cc"], "source.tamanu.tamanu.note_pages": ["test.tamanu.source_not_null_tamanu_note_pages_created_at.d12af0d7fa", "test.tamanu.source_not_null_tamanu_note_pages_date.73c5e4ff13", "test.tamanu.source_not_null_tamanu_note_pages_id.ca251365f2", "test.tamanu.source_not_null_tamanu_note_pages_note_type.ef33cb53cd", "test.tamanu.source_not_null_tamanu_note_pages_record_id.4fb443d5b8", "test.tamanu.source_not_null_tamanu_note_pages_record_type.3a45297bcc", "test.tamanu.source_not_null_tamanu_note_pages_updated_at.f4a3d0c174", "test.tamanu.source_not_null_tamanu_note_pages_updated_at_sync_tick.92101dbbcc", "test.tamanu.source_relationships_tamanu_note_items_note_page_id__id__source_tamanu_note_pages_.11dd57c56b", "test.tamanu.source_unique_tamanu_note_pages_id.589de9f269"], "source.tamanu.tamanu.invoice_insurance_plan_items": ["test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_created_at.3f6d2aaeca", "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_id.43701f0ea4", "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_insurance_plan_id.22ae6631a9", "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_invoice_product_id.e10425ebc3", "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at.31dd03f410", "test.tamanu.source_not_null_tamanu_invoice_insurance_plan_items_updated_at_sync_tick.1d01aecfe2", "test.tamanu.source_unique_tamanu_invoice_insurance_plan_items_id.cbd4f88b8d"], "source.tamanu.tamanu.lab_tests": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_.be7e43137f", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_.b46161f1b5", "test.tamanu.source_not_null_tamanu_lab_tests_created_at.667f51451c", "test.tamanu.source_not_null_tamanu_lab_tests_date.e00dab5c9e", "test.tamanu.source_not_null_tamanu_lab_tests_id.abec38f58a", "test.tamanu.source_not_null_tamanu_lab_tests_result.cac9a56686", "test.tamanu.source_not_null_tamanu_lab_tests_updated_at.64be4fd140", "test.tamanu.source_not_null_tamanu_lab_tests_updated_at_sync_tick.eeac5bc0de", "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_test_id__id__source_tamanu_lab_tests_.7bacb605d5", "test.tamanu.source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_.feba1f8faa", "test.tamanu.source_relationships_tamanu_lab_tests_lab_test_type_id__id__source_tamanu_lab_test_types_.1db3f2d26e", "test.tamanu.source_unique_tamanu_lab_tests_id.2135a2616a"], "source.tamanu.tamanu.invoice_items": ["test.tamanu.source_not_null_tamanu_invoice_items_approved.3e2ce00100", "test.tamanu.source_not_null_tamanu_invoice_items_created_at.474e57c0bb", "test.tamanu.source_not_null_tamanu_invoice_items_id.dc141da1a1", "test.tamanu.source_not_null_tamanu_invoice_items_invoice_id.3660f18c91", "test.tamanu.source_not_null_tamanu_invoice_items_order_date.7be79d0261", "test.tamanu.source_not_null_tamanu_invoice_items_ordered_by_user_id.a2db62ee39", "test.tamanu.source_not_null_tamanu_invoice_items_quantity.3be1c84af8", "test.tamanu.source_not_null_tamanu_invoice_items_updated_at_sync_tick.0d6baa054f", "test.tamanu.source_relationships_tamanu_invoice_item_discounts_invoice_item_id__id__source_tamanu_invoice_items_.18c0b3db45", "test.tamanu.source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_.1c28785b87", "test.tamanu.source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_.a5aadc15a8", "test.tamanu.source_relationships_tamanu_invoice_items_product_id__id__source_tamanu_invoice_products_.46ad5d1e2f", "test.tamanu.source_unique_tamanu_invoice_items_id.9cdffdcc59"], "source.tamanu.tamanu.lab_requests": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_.726d5f854e", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.1161021af0", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_.4ae8635507", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_.15144cb13a", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_.b37e5b8f30", "test.tamanu.source_accepted_values_tamanu_lab_requests_reason_for_cancellation__clinical__duplicate__entered_in_error__other__patient_discharged__patient_refused.2cbc5618a7", "test.tamanu.source_accepted_values_tamanu_lab_requests_status__reception_pending__results_pending__interim_results__to_be_verified__verified__published__cancelled__invalidated__deleted__sample_not_collected__entered_in_error.a405e0e600", "test.tamanu.source_not_null_tamanu_lab_requests_created_at.1ee9713d63", "test.tamanu.source_not_null_tamanu_lab_requests_display_id.cbbdd33475", "test.tamanu.source_not_null_tamanu_lab_requests_id.e536409687", "test.tamanu.source_not_null_tamanu_lab_requests_updated_at.fca847ad8c", "test.tamanu.source_not_null_tamanu_lab_requests_updated_at_sync_tick.ef00317737", "test.tamanu.source_relationships_tamanu_certificate_notifications_lab_request_id__id__source_tamanu_lab_requests_.3cf536fdbe", "test.tamanu.source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_.8995368506", "test.tamanu.source_relationships_tamanu_lab_request_logs_lab_request_id__id__source_tamanu_lab_requests_.f8e2c6d82e", "test.tamanu.source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_.fa7e746896", "test.tamanu.source_relationships_tamanu_lab_requests_department_id__id__source_tamanu_departments_.b8a500a3ec", "test.tamanu.source_relationships_tamanu_lab_requests_encounter_id__id__source_tamanu_encounters_.ead6a9d3f0", "test.tamanu.source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_.2905d1bd3a", "test.tamanu.source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_.332337a1bd", "test.tamanu.source_relationships_tamanu_lab_tests_lab_request_id__id__source_tamanu_lab_requests_.feba1f8faa", "test.tamanu.source_unique_tamanu_lab_requests_id.4e5a6c8c2f"], "source.tamanu.tamanu.SequelizeMeta": ["test.tamanu.source_not_null_tamanu_SequelizeMeta_name.8bbd44e2f6", "test.tamanu.source_unique_tamanu_SequelizeMeta_name.ed3437179c"], "source.tamanu.tamanu.invoices": ["test.tamanu.source_accepted_values_tamanu_invoices_insurer_payment_status__unpaid__paid__partial__rejected.3e0ad430bb", "test.tamanu.source_accepted_values_tamanu_invoices_patient_payment_status__unpaid__paid__partial.fa024cba1f", "test.tamanu.source_accepted_values_tamanu_invoices_status__cancelled__in_progress__finalised.6e4b4a0157", "test.tamanu.source_not_null_tamanu_invoices_created_at.f79d3fee01", "test.tamanu.source_not_null_tamanu_invoices_date.af363f73c1", "test.tamanu.source_not_null_tamanu_invoices_display_id.d7f24dffea", "test.tamanu.source_not_null_tamanu_invoices_encounter_id.165abf9a41", "test.tamanu.source_not_null_tamanu_invoices_id.547f4c6b53", "test.tamanu.source_not_null_tamanu_invoices_insurer_payment_status.defe067d68", "test.tamanu.source_not_null_tamanu_invoices_patient_payment_status.c489578d60", "test.tamanu.source_not_null_tamanu_invoices_status.3cc2fac683", "test.tamanu.source_not_null_tamanu_invoices_updated_at_sync_tick.1157c94f1b", "test.tamanu.source_relationships_tamanu_invoice_discounts_invoice_id__id__source_tamanu_invoices_.93879e6aa1", "test.tamanu.source_relationships_tamanu_invoice_items_invoice_id__id__source_tamanu_invoices_.1c28785b87", "test.tamanu.source_relationships_tamanu_invoice_payments_invoice_id__id__source_tamanu_invoices_.d07f617060", "test.tamanu.source_relationships_tamanu_invoices_encounter_id__id__source_tamanu_encounters_.5dd1ea3660", "test.tamanu.source_unique_tamanu_invoices_id.5821fd311e"], "source.tamanu.tamanu.patient_communications": ["test.tamanu.source_not_null_tamanu_patient_communications_channel.587842d7e0", "test.tamanu.source_not_null_tamanu_patient_communications_created_at.33e1921e8e", "test.tamanu.source_not_null_tamanu_patient_communications_id.1fe956c44c", "test.tamanu.source_not_null_tamanu_patient_communications_status.125dae34af", "test.tamanu.source_not_null_tamanu_patient_communications_type.4795985e7b", "test.tamanu.source_not_null_tamanu_patient_communications_updated_at.871abd87ae", "test.tamanu.source_not_null_tamanu_patient_communications_updated_at_sync_tick.2b3912c278", "test.tamanu.source_relationships_tamanu_patient_communications_patient_id__id__source_tamanu_patients_.f0401833ba", "test.tamanu.source_unique_tamanu_patient_communications_id.b90ad76da2"], "source.tamanu.tamanu.signers_historical": ["test.tamanu.source_not_null_tamanu_signers_historical_country_code.42c68d2696", "test.tamanu.source_not_null_tamanu_signers_historical_created_at.42db3ab0e4", "test.tamanu.source_not_null_tamanu_signers_historical_id.0d0aeac24d", "test.tamanu.source_not_null_tamanu_signers_historical_public_key.d16df118c2", "test.tamanu.source_not_null_tamanu_signers_historical_request.2959786f4d", "test.tamanu.source_not_null_tamanu_signers_historical_signatures_issued.da2dbdd26c", "test.tamanu.source_not_null_tamanu_signers_historical_updated_at.1b5d6fc4e7", "test.tamanu.source_unique_tamanu_signers_historical_id.a3bfab8f1b"], "source.tamanu.tamanu.invoice_price_list_items": ["test.tamanu.source_not_null_tamanu_invoice_price_list_items_created_at.94f64a01f3", "test.tamanu.source_not_null_tamanu_invoice_price_list_items_id.5081c70d98", "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_price_list_id.98a95f7705", "test.tamanu.source_not_null_tamanu_invoice_price_list_items_invoice_product_id.21d5cfd939", "test.tamanu.source_not_null_tamanu_invoice_price_list_items_is_hidden.7422bf5f0a", "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at.3be1e8411f", "test.tamanu.source_not_null_tamanu_invoice_price_list_items_updated_at_sync_tick.96a1770fd7", "test.tamanu.source_unique_tamanu_invoice_price_list_items_id.0ce15b2467"], "source.tamanu.tamanu.notes": ["test.tamanu.source_accepted_values_tamanu_notes_record_type__Encounter__ImagingRequest__LabRequest__Patient__PatientCarePlan__Triage.bec5c8fb7d", "test.tamanu.source_not_null_tamanu_notes_content.aaef9e6205", "test.tamanu.source_not_null_tamanu_notes_created_at.6995826036", "test.tamanu.source_not_null_tamanu_notes_date.da7301eac5", "test.tamanu.source_not_null_tamanu_notes_id.09c896ad4f", "test.tamanu.source_not_null_tamanu_notes_note_type_id.149bd5c822", "test.tamanu.source_not_null_tamanu_notes_record_id.cfea6af90a", "test.tamanu.source_not_null_tamanu_notes_record_type.95fdec276c", "test.tamanu.source_not_null_tamanu_notes_updated_at.a1ee0f269e", "test.tamanu.source_not_null_tamanu_notes_updated_at_sync_tick.c817dbafe2", "test.tamanu.source_relationships_tamanu_notes_author_id__id__source_tamanu_users_.d295cc11d5", "test.tamanu.source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_.8b38421ee7", "test.tamanu.source_relationships_tamanu_notes_revised_by_id__id__source_tamanu_notes_.2e3d834e0e", "test.tamanu.source_unique_tamanu_notes_id.a24a543e48"], "source.tamanu.tamanu.imaging_results": ["test.tamanu.source_not_null_tamanu_imaging_results_completed_at.3e8e297046", "test.tamanu.source_not_null_tamanu_imaging_results_created_at.59c90956bf", "test.tamanu.source_not_null_tamanu_imaging_results_id.bc45b4d2ee", "test.tamanu.source_not_null_tamanu_imaging_results_imaging_request_id.68d290fbfe", "test.tamanu.source_not_null_tamanu_imaging_results_updated_at.6f4012c0e4", "test.tamanu.source_not_null_tamanu_imaging_results_updated_at_sync_tick.35b86ae623", "test.tamanu.source_not_null_tamanu_imaging_results_visibility_status.80dbc6bd58", "test.tamanu.source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_.cf92796113", "test.tamanu.source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_.2549bf4069", "test.tamanu.source_unique_tamanu_imaging_results_id.6830573d99"], "source.tamanu.tamanu.discharges": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_.2fff0e5fc5", "test.tamanu.source_not_null_tamanu_discharges_encounter_id.5299e31574", "test.tamanu.source_not_null_tamanu_discharges_id.4a7ff5af7b", "test.tamanu.source_not_null_tamanu_discharges_updated_at_sync_tick.0b20bf424c", "test.tamanu.source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_.1e9379ede1", "test.tamanu.source_relationships_tamanu_discharges_encounter_id__id__source_tamanu_encounters_.43adeff312", "test.tamanu.source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_.298b48d81f", "test.tamanu.source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_.1fe0fe6f7f", "test.tamanu.source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_.68747350e4", "test.tamanu.source_unique_tamanu_discharges_id.8b9c580a59"], "source.tamanu.tamanu.patient_ongoing_prescriptions": ["test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_created_at.0bf2c435a7", "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_id.01386e7977", "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_patient_id.f41a0ed63a", "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_prescription_id.3409401d0e", "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at.6af6ca8d00", "test.tamanu.source_not_null_tamanu_patient_ongoing_prescriptions_updated_at_sync_tick.d9e250caae", "test.tamanu.source_unique_tamanu_patient_ongoing_prescriptions_id.acc37386e6"], "source.tamanu.tamanu.location_assignment_templates": ["test.tamanu.source_not_null_tamanu_location_assignment_templates_created_at.a5e55e1095", "test.tamanu.source_not_null_tamanu_location_assignment_templates_date.0265301d5d", "test.tamanu.source_not_null_tamanu_location_assignment_templates_end_time.65aa617784", "test.tamanu.source_not_null_tamanu_location_assignment_templates_id.91706d5751", "test.tamanu.source_not_null_tamanu_location_assignment_templates_location_id.f01a2ba717", "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_end_date.cfd6b45ace", "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_frequency.c7157d2070", "test.tamanu.source_not_null_tamanu_location_assignment_templates_repeat_unit.2fca6b103d", "test.tamanu.source_not_null_tamanu_location_assignment_templates_start_time.aad4cea7dc", "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at.813872183e", "test.tamanu.source_not_null_tamanu_location_assignment_templates_updated_at_sync_tick.902f20bfe3", "test.tamanu.source_not_null_tamanu_location_assignment_templates_user_id.fc74c558b6", "test.tamanu.source_unique_tamanu_location_assignment_templates_id.2a2b122606"], "source.tamanu.tamanu.patient_facilities": ["test.tamanu.source_not_null_tamanu_patient_facilities_facility_id.2e4a51e2f6", "test.tamanu.source_not_null_tamanu_patient_facilities_patient_id.a4d7ee14a4", "test.tamanu.source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_.8a454e3fea", "test.tamanu.source_relationships_tamanu_patient_facilities_patient_id__id__source_tamanu_patients_.62c931e062"], "source.tamanu.tamanu.patient_care_plans": ["test.tamanu.source_not_null_tamanu_patient_care_plans_created_at.dd6e82d0b1", "test.tamanu.source_not_null_tamanu_patient_care_plans_date.34408a1445", "test.tamanu.source_not_null_tamanu_patient_care_plans_id.56024c4140", "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at.b6d6e4d022", "test.tamanu.source_not_null_tamanu_patient_care_plans_updated_at_sync_tick.310ae42450", "test.tamanu.source_unique_tamanu_patient_care_plans_id.a3a1194e99"], "source.tamanu.tamanu.surveys": ["test.tamanu.source_accepted_values_tamanu_surveys_survey_type__programs__referral__obsolete__vitals.fb3dae8522", "test.tamanu.source_not_null_tamanu_surveys_created_at.49abf4cc08", "test.tamanu.source_not_null_tamanu_surveys_id.232633415e", "test.tamanu.source_not_null_tamanu_surveys_is_sensitive.5f59558cfe", "test.tamanu.source_not_null_tamanu_surveys_notifiable.fa289a592a", "test.tamanu.source_not_null_tamanu_surveys_notify_email_addresses.6c0b996c80", "test.tamanu.source_not_null_tamanu_surveys_updated_at.88f3f24266", "test.tamanu.source_not_null_tamanu_surveys_updated_at_sync_tick.27e79d3218", "test.tamanu.source_not_null_tamanu_surveys_visibility_status.a50fde3a7b", "test.tamanu.source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_.f0ce4a9c90", "test.tamanu.source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_.fa85daf635", "test.tamanu.source_unique_tamanu_surveys_id.0e6c4290cc"], "source.tamanu.tamanu.appointment_procedure_types": ["test.tamanu.source_not_null_tamanu_appointment_procedure_types_appointment_id.5ad9e548f4", "test.tamanu.source_not_null_tamanu_appointment_procedure_types_created_at.2e4c1b17ce", "test.tamanu.source_not_null_tamanu_appointment_procedure_types_id.138766fc43", "test.tamanu.source_not_null_tamanu_appointment_procedure_types_procedure_type_id.14840677e5", "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at.7d42fb36d3", "test.tamanu.source_not_null_tamanu_appointment_procedure_types_updated_at_sync_tick.66fee65a6c", "test.tamanu.source_unique_tamanu_appointment_procedure_types_id.037055b61c"], "source.tamanu.tamanu.report_requests": ["test.tamanu.source_accepted_values_tamanu_report_requests_export_format__xlsx__csv.68903ce3f9", "test.tamanu.source_accepted_values_tamanu_report_requests_status__Received__Processing__Processed__Error.526b71b853", "test.tamanu.source_not_null_tamanu_report_requests_created_at.5d76519d08", "test.tamanu.source_not_null_tamanu_report_requests_export_format.0e947a46a3", "test.tamanu.source_not_null_tamanu_report_requests_id.8374913dcd", "test.tamanu.source_not_null_tamanu_report_requests_recipients.d49a8a2f72", "test.tamanu.source_not_null_tamanu_report_requests_requested_by_user_id.10828a78a1", "test.tamanu.source_not_null_tamanu_report_requests_status.4eafffa24a", "test.tamanu.source_not_null_tamanu_report_requests_updated_at.60abf391b8", "test.tamanu.source_not_null_tamanu_report_requests_updated_at_sync_tick.eef7d7f267", "test.tamanu.source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_.ce7ace92aa", "test.tamanu.source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_.c9440b513d", "test.tamanu.source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_.11b6b8f5c4", "test.tamanu.source_unique_tamanu_report_requests_id.d871afb2cf"], "source.tamanu.tamanu.reference_drugs": ["test.tamanu.source_not_null_tamanu_reference_drugs_created_at.56d6a7bcc0", "test.tamanu.source_not_null_tamanu_reference_drugs_id.262b5ed3f6", "test.tamanu.source_not_null_tamanu_reference_drugs_is_sensitive.e5bd778894", "test.tamanu.source_not_null_tamanu_reference_drugs_reference_data_id.69bff85f87", "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at.573d9fdd62", "test.tamanu.source_not_null_tamanu_reference_drugs_updated_at_sync_tick.82d2c43485", "test.tamanu.source_unique_tamanu_reference_drugs_id.b18d9ebb13", "test.tamanu.source_unique_tamanu_reference_drugs_reference_data_id.ecedb99e2c"], "source.tamanu.tamanu.invoice_insurer_payments": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_.04f39ad92a", "test.tamanu.source_accepted_values_tamanu_invoice_insurer_payments_status__unpaid__paid__partial__rejected.b655cf463e", "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_created_at.8b24ac848c", "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_id.e4847e6d62", "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_insurer_id.d4af11cfdf", "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_invoice_payment_id.d5611881a3", "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_status.7ac01d0560", "test.tamanu.source_not_null_tamanu_invoice_insurer_payments_updated_at_sync_tick.4f3ee2ea02", "test.tamanu.source_relationships_tamanu_invoice_insurer_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.bb3f5a2cf7", "test.tamanu.source_unique_tamanu_invoice_insurer_payments_id.b447e82df0", "test.tamanu.source_unique_tamanu_invoice_insurer_payments_invoice_payment_id.7dc74551cc"], "source.tamanu.tamanu.procedures": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_.8b2aee60ac", "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_.357cfc4070", "test.tamanu.source_not_null_tamanu_procedures_created_at.04e3942886", "test.tamanu.source_not_null_tamanu_procedures_date.dcd844e127", "test.tamanu.source_not_null_tamanu_procedures_id.ba34e3de73", "test.tamanu.source_not_null_tamanu_procedures_updated_at.25bc26ecf8", "test.tamanu.source_not_null_tamanu_procedures_updated_at_sync_tick.2da29f5157", "test.tamanu.source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_.5a3ee51b82", "test.tamanu.source_relationships_tamanu_procedures_encounter_id__id__source_tamanu_encounters_.e6407dfa85", "test.tamanu.source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_.679ed5aba8", "test.tamanu.source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_.b1d682ce39", "test.tamanu.source_unique_tamanu_procedures_id.ed36ede291"], "source.tamanu.tamanu.roles": ["test.tamanu.source_not_null_tamanu_roles_id.a534c5d463", "test.tamanu.source_not_null_tamanu_roles_name.cfc8ac49ef", "test.tamanu.source_not_null_tamanu_roles_updated_at_sync_tick.7e4ea46e3f", "test.tamanu.source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_.5a5a1be407", "test.tamanu.source_unique_tamanu_roles_id.0ad588a58a"], "source.tamanu.tamanu.imaging_requests": ["test.tamanu.source_accepted_values_tamanu_imaging_requests_imaging_type__angiogram__colonoscopy__ctScan__ecg__echocardiogram__endoscopy__fluroscopy__holterMonitor__mammogram__orthopantomography__mri__stressTest__ultrasound__vascularStudy__xRay.b2d7a7ce17", "test.tamanu.source_accepted_values_tamanu_imaging_requests_status__pending__in_progress__completed__cancelled__deleted__entered_in_error.a9ecb8382a", "test.tamanu.source_not_null_tamanu_imaging_requests_created_at.d386c49d0f", "test.tamanu.source_not_null_tamanu_imaging_requests_display_id.7bf4017999", "test.tamanu.source_not_null_tamanu_imaging_requests_id.d663e704e6", "test.tamanu.source_not_null_tamanu_imaging_requests_requested_date.4fe72ce056", "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at.ea1a5d3b4f", "test.tamanu.source_not_null_tamanu_imaging_requests_updated_at_sync_tick.bde3718e92", "test.tamanu.source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_.ea8a5a0600", "test.tamanu.source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_.d4627e3b55", "test.tamanu.source_relationships_tamanu_imaging_requests_encounter_id__id__source_tamanu_encounters_.6e73984503", "test.tamanu.source_relationships_tamanu_imaging_requests_location_group_id__id__source_tamanu_location_groups_.5f80fa9caf", "test.tamanu.source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_.70fffaafa5", "test.tamanu.source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_.120db4235e", "test.tamanu.source_relationships_tamanu_imaging_results_imaging_request_id__id__source_tamanu_imaging_requests_.2549bf4069", "test.tamanu.source_unique_tamanu_imaging_requests_id.189883862e"], "source.tamanu.tamanu.reference_data": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_.8bc715362f", "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_.d6a8261230", "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_.e993598733", "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_manufacturer_id__id__source_tamanu_reference_data___type_manufacturer_.7fbca1adbc", "test.tamanu.dbt_utils_source_relationships_where_tamanu_certifiable_vaccines_vaccine_id__id__source_tamanu_reference_data___type_vaccine_.2a45c16791", "test.tamanu.dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_.677e6eaf1b", "test.tamanu.dbt_utils_source_relationships_where_tamanu_discharges_disposition_id__id__source_tamanu_reference_data___type_dischargeDisposition_.2fff0e5fc5", "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diagnoses_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.6536f09069", "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounter_diets_diet_id__id__source_tamanu_reference_data___type_diet_.e71c59d77d", "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_patient_billing_type_id__id__source_tamanu_reference_data___type_patientBillingType_.ecb4200032", "test.tamanu.dbt_utils_source_relationships_where_tamanu_encounters_referral_source_id__id__source_tamanu_reference_data___type_referralSource_.6759a4eea9", "test.tamanu.dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_.0a191fc0e4", "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_insurer_payments_insurer_id__id__source_tamanu_reference_data___type_insurer_.04f39ad92a", "test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_.0c32c0d3e1", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_sample_site_id__id__source_tamanu_reference_data___type_labSampleSite_.726d5f854e", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.1161021af0", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_laboratory_id__id__source_tamanu_reference_data___type_labTestLaboratory_.4ae8635507", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_lab_test_priority_id__id__source_tamanu_reference_data___type_labTestPriority_.15144cb13a", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_requests_specimen_type_id__id__source_tamanu_reference_data___type_specimenType_.b37e5b8f30", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_.f5578be7c6", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_types_lab_test_category_id__id__source_tamanu_reference_data___type_labTestCategory_.8034332af4", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_category_id__id__source_tamanu_reference_data___type_labTestCategory_.be7e43137f", "test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_tests_lab_test_method_id__id__source_tamanu_reference_data___type_labTestMethod_.b46161f1b5", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_contacts_relationship_id__id__source_tamanu_reference_data___type_contactRelationship_.98d8247d27", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_.7ace974f49", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_.1dea4f8138", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_.c7596dc8de", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_.f3a9b1a797", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_.27473a57dc", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.569a8c1cce", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_.db6437c554", "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_anaesthetic_id__id__source_tamanu_reference_data___type_drug_.8b2aee60ac", "test.tamanu.dbt_utils_source_relationships_where_tamanu_procedures_procedure_type_id__id__source_tamanu_reference_data___type_procedureType_.357cfc4070", "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_arrival_mode_id__id__source_tamanu_reference_data___type_arrivalMode_.26a3871e3a", "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_chief_complaint_id__id__source_tamanu_reference_data___type_triageReason_.3203451a40", "test.tamanu.dbt_utils_source_relationships_where_tamanu_triages_secondary_complaint_id__id__source_tamanu_reference_data___type_triageReason_.8c9e664e44", "test.tamanu.source_not_null_tamanu_reference_data_code.45bb74a969", "test.tamanu.source_not_null_tamanu_reference_data_created_at.929d48b0fb", "test.tamanu.source_not_null_tamanu_reference_data_id.558d36e056", "test.tamanu.source_not_null_tamanu_reference_data_name.92065a73ea", "test.tamanu.source_not_null_tamanu_reference_data_system_required.5345a25d20", "test.tamanu.source_not_null_tamanu_reference_data_type.be10d4a572", "test.tamanu.source_not_null_tamanu_reference_data_updated_at.2d38750dde", "test.tamanu.source_not_null_tamanu_reference_data_updated_at_sync_tick.c5ae94a272", "test.tamanu.source_relationships_tamanu_imaging_area_external_codes_area_id__id__source_tamanu_reference_data_.32280d3e7c", "test.tamanu.source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_.6afdf29a06", "test.tamanu.source_unique_tamanu_reference_data_id.f40209ddee"], "source.tamanu.tamanu.patient_issues": ["test.tamanu.source_not_null_tamanu_patient_issues_created_at.e6b6b24d67", "test.tamanu.source_not_null_tamanu_patient_issues_id.90df660f7f", "test.tamanu.source_not_null_tamanu_patient_issues_recorded_date.1adb9dcc27", "test.tamanu.source_not_null_tamanu_patient_issues_type.86926f7218", "test.tamanu.source_not_null_tamanu_patient_issues_updated_at.3d4ab948f0", "test.tamanu.source_not_null_tamanu_patient_issues_updated_at_sync_tick.b613106397", "test.tamanu.source_relationships_tamanu_patient_issues_patient_id__id__source_tamanu_patients_.d2d3f731fb", "test.tamanu.source_unique_tamanu_patient_issues_id.cc84a334be"], "source.tamanu.tamanu.sync_lookup_ticks": ["test.tamanu.source_not_null_tamanu_sync_lookup_ticks_lookup_end_tick.2552341359", "test.tamanu.source_not_null_tamanu_sync_lookup_ticks_source_start_tick.4b0254a181", "test.tamanu.source_unique_tamanu_sync_lookup_ticks_lookup_end_tick.f4830d30b3"], "source.tamanu.tamanu.settings": ["test.tamanu.source_accepted_values_tamanu_settings_scope__global__central__facility.5ddc355de8", "test.tamanu.source_not_null_tamanu_settings_created_at.8ad3e239a6", "test.tamanu.source_not_null_tamanu_settings_id.5ec7f45b36", "test.tamanu.source_not_null_tamanu_settings_key.83ad9711e6", "test.tamanu.source_not_null_tamanu_settings_scope.64d1f26cf2", "test.tamanu.source_not_null_tamanu_settings_updated_at.9dc40b301e", "test.tamanu.source_not_null_tamanu_settings_updated_at_sync_tick.9e782f5b11", "test.tamanu.source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_.bf1a10aebe", "test.tamanu.source_unique_tamanu_settings_id.6bf47c8849"], "source.tamanu.tamanu.lab_test_panel_requests": ["test.tamanu.source_not_null_tamanu_lab_test_panel_requests_created_at.8a393e3d79", "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_encounter_id.ffb89736d8", "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_id.41fa505d02", "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_lab_test_panel_id.e533aeba03", "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at.f165e4a05b", "test.tamanu.source_not_null_tamanu_lab_test_panel_requests_updated_at_sync_tick.c176776d9d", "test.tamanu.source_relationships_tamanu_lab_requests_lab_test_panel_request_id__id__source_tamanu_lab_test_panel_requests_.2905d1bd3a", "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_encounter_id__id__source_tamanu_encounters_.01f5be3602", "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_.1bf2e5a1ff", "test.tamanu.source_unique_tamanu_lab_test_panel_requests_id.fa501ddd2c"], "source.tamanu.tamanu.vitals": ["test.tamanu.source_not_null_tamanu_vitals_created_at.16b6f3a14f", "test.tamanu.source_not_null_tamanu_vitals_date_recorded.0d32b23c9f", "test.tamanu.source_not_null_tamanu_vitals_id.18a9bbf45f", "test.tamanu.source_not_null_tamanu_vitals_updated_at.a07980dfdb", "test.tamanu.source_not_null_tamanu_vitals_updated_at_sync_tick.9962306ac1", "test.tamanu.source_unique_tamanu_vitals_id.fd030294af"], "source.tamanu.tamanu.imaging_type_external_codes": ["test.tamanu.source_not_null_tamanu_imaging_type_external_codes_code.527d0ff6f5", "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_created_at.e2ccce310c", "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_id.ad31be3508", "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_imaging_type_code.6104c70b98", "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at.f2a8814402", "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_updated_at_sync_tick.447d3995ee", "test.tamanu.source_not_null_tamanu_imaging_type_external_codes_visibility_status.3ef76c80ff", "test.tamanu.source_unique_tamanu_imaging_type_external_codes_id.99627516fd"], "source.tamanu.tamanu.contributing_death_causes": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_contributing_death_causes_condition_id__id__source_tamanu_reference_data___type_diagnosis_.677e6eaf1b", "test.tamanu.source_not_null_tamanu_contributing_death_causes_condition_id.7888faae6b", "test.tamanu.source_not_null_tamanu_contributing_death_causes_id.0c8b2503cb", "test.tamanu.source_not_null_tamanu_contributing_death_causes_patient_death_data_id.d0b021dec5", "test.tamanu.source_not_null_tamanu_contributing_death_causes_time_after_onset.aaabeca43d", "test.tamanu.source_not_null_tamanu_contributing_death_causes_updated_at_sync_tick.082b545b7a", "test.tamanu.source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_.404540bf0a", "test.tamanu.source_unique_tamanu_contributing_death_causes_id.626611e2fa"], "source.tamanu.tamanu.user_login_attempts": ["test.tamanu.source_not_null_tamanu_user_login_attempts_created_at.6e8a042c51", "test.tamanu.source_not_null_tamanu_user_login_attempts_id.41946400e6", "test.tamanu.source_not_null_tamanu_user_login_attempts_outcome.75b959648c", "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at.d3d764c50c", "test.tamanu.source_not_null_tamanu_user_login_attempts_updated_at_sync_tick.4f8f310f05", "test.tamanu.source_not_null_tamanu_user_login_attempts_user_id.51a52b5106", "test.tamanu.source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_.caa8944999", "test.tamanu.source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_.e19bccc1a5", "test.tamanu.source_unique_tamanu_user_login_attempts_id.5f14bcd808"], "source.tamanu.tamanu.notes_legacy": ["test.tamanu.source_not_null_tamanu_notes_legacy_content.88552a0676", "test.tamanu.source_not_null_tamanu_notes_legacy_created_at.1614bfff1e", "test.tamanu.source_not_null_tamanu_notes_legacy_date.ebfcb3c49c", "test.tamanu.source_not_null_tamanu_notes_legacy_id.0ca554e30e", "test.tamanu.source_not_null_tamanu_notes_legacy_record_id.e04f2d4fd5", "test.tamanu.source_not_null_tamanu_notes_legacy_record_type.c368d7d085", "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at.9cb08b5b1d", "test.tamanu.source_not_null_tamanu_notes_legacy_updated_at_sync_tick.935e8256d0", "test.tamanu.source_unique_tamanu_notes_legacy_id.b36a7a24dd"], "source.tamanu.tamanu.users": ["test.tamanu.dbt_utils_source_accepted_range_tamanu_users_device_registration_quota__0.fdd0e2e704", "test.tamanu.source_not_null_tamanu_users_created_at.7bde2fabde", "test.tamanu.source_not_null_tamanu_users_device_registration_quota.06b86bd62e", "test.tamanu.source_not_null_tamanu_users_display_name.86d7ca2504", "test.tamanu.source_not_null_tamanu_users_email.c9dd9cef8c", "test.tamanu.source_not_null_tamanu_users_id.7a4497a05a", "test.tamanu.source_not_null_tamanu_users_role.553b7aa11f", "test.tamanu.source_not_null_tamanu_users_updated_at.63853dad90", "test.tamanu.source_not_null_tamanu_users_updated_at_sync_tick.ddaa25a636", "test.tamanu.source_not_null_tamanu_users_visibility_status.48d8ce74c3", "test.tamanu.source_relationships_logs__tamanu_changes_updated_by_user_id__id__source_tamanu_users_.7c9053d465", "test.tamanu.source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_.b2920f6fec", "test.tamanu.source_relationships_tamanu_death_revert_logs_reverted_by_id__id__source_tamanu_users_.953c559e54", "test.tamanu.source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_.b7e1d90812", "test.tamanu.source_relationships_tamanu_discharges_discharger_id__id__source_tamanu_users_.1e9379ede1", "test.tamanu.source_relationships_tamanu_encounter_diagnoses_clinician_id__id__source_tamanu_users_.98d7d9c464", "test.tamanu.source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_.fbf272ed47", "test.tamanu.source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_.b2d555c7b6", "test.tamanu.source_relationships_tamanu_encounters_examiner_id__id__source_tamanu_users_.1a33a59a12", "test.tamanu.source_relationships_tamanu_imaging_requests_completed_by_id__id__source_tamanu_users_.d4627e3b55", "test.tamanu.source_relationships_tamanu_imaging_requests_requested_by_id__id__source_tamanu_users_.120db4235e", "test.tamanu.source_relationships_tamanu_imaging_results_completed_by_id__id__source_tamanu_users_.cf92796113", "test.tamanu.source_relationships_tamanu_invoice_discounts_applied_by_user_id__id__source_tamanu_users_.4ec462b6c3", "test.tamanu.source_relationships_tamanu_invoice_items_ordered_by_user_id__id__source_tamanu_users_.a5aadc15a8", "test.tamanu.source_relationships_tamanu_invoice_payments_updated_by_user_id__id__source_tamanu_users_.11aa785c7b", "test.tamanu.source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_.9e7a2bec9f", "test.tamanu.source_relationships_tamanu_lab_request_logs_updated_by_id__id__source_tamanu_users_.86e7966883", "test.tamanu.source_relationships_tamanu_lab_requests_collected_by_id__id__source_tamanu_users_.fa7e746896", "test.tamanu.source_relationships_tamanu_lab_requests_requested_by_id__id__source_tamanu_users_.332337a1bd", "test.tamanu.source_relationships_tamanu_note_items_author_id__id__source_tamanu_users_.1029ad90a3", "test.tamanu.source_relationships_tamanu_note_items_on_behalf_of_id__id__source_tamanu_users_.35728438ca", "test.tamanu.source_relationships_tamanu_notes_author_id__id__source_tamanu_users_.d295cc11d5", "test.tamanu.source_relationships_tamanu_notes_on_behalf_of_id__id__source_tamanu_users_.8b38421ee7", "test.tamanu.source_relationships_tamanu_one_time_logins_user_id__id__source_tamanu_users_.93741528ac", "test.tamanu.source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_.12e92239d7", "test.tamanu.source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_.1464fe93d6", "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_clinician_id__id__source_tamanu_users_.1928169432", "test.tamanu.source_relationships_tamanu_patient_program_registration_conditions_deletion_clinician_id__id__source_tamanu_users_.329bc7b403", "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_.660ded928b", "test.tamanu.source_relationships_tamanu_procedures_anaesthetist_id__id__source_tamanu_users_.5a3ee51b82", "test.tamanu.source_relationships_tamanu_procedures_physician_id__id__source_tamanu_users_.b1d682ce39", "test.tamanu.source_relationships_tamanu_refresh_tokens_user_id__id__source_tamanu_users_.ba625319c2", "test.tamanu.source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_.53887ef192", "test.tamanu.source_relationships_tamanu_report_requests_requested_by_user_id__id__source_tamanu_users_.11b6b8f5c4", "test.tamanu.source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_.2aef705f04", "test.tamanu.source_relationships_tamanu_templates_created_by_id__id__source_tamanu_users_.e25012c12c", "test.tamanu.source_relationships_tamanu_triages_practitioner_id__id__source_tamanu_users_.9341ff1138", "test.tamanu.source_relationships_tamanu_user_login_attempts_user_id__id__source_tamanu_users_.e19bccc1a5", "test.tamanu.source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_.7c5a5dd055", "test.tamanu.source_unique_tamanu_users_email.e8d696ebe0", "test.tamanu.source_unique_tamanu_users_id.b46294f196"], "source.tamanu.tamanu.location_assignments": ["test.tamanu.source_not_null_tamanu_location_assignments_created_at.df3be173f2", "test.tamanu.source_not_null_tamanu_location_assignments_date.41611197a6", "test.tamanu.source_not_null_tamanu_location_assignments_end_time.1d084e0550", "test.tamanu.source_not_null_tamanu_location_assignments_id.f9c655fff8", "test.tamanu.source_not_null_tamanu_location_assignments_location_id.4ec3093145", "test.tamanu.source_not_null_tamanu_location_assignments_start_time.3eaa8dd9bd", "test.tamanu.source_not_null_tamanu_location_assignments_updated_at.31f65e2832", "test.tamanu.source_not_null_tamanu_location_assignments_updated_at_sync_tick.b44f74a24f", "test.tamanu.source_not_null_tamanu_location_assignments_user_id.49ff1e2e9a", "test.tamanu.source_unique_tamanu_location_assignments_id.d7960bf1a5"], "source.tamanu.tamanu.survey_screen_components": ["test.tamanu.source_not_null_tamanu_survey_screen_components_created_at.e0b4cb2d3f", "test.tamanu.source_not_null_tamanu_survey_screen_components_id.f2559a7214", "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at.87177a4413", "test.tamanu.source_not_null_tamanu_survey_screen_components_updated_at_sync_tick.ac240e6aaa", "test.tamanu.source_unique_tamanu_survey_screen_components_id.83c6daf387"], "source.tamanu.tamanu.tasks": ["test.tamanu.source_not_null_tamanu_tasks_created_at.75a1e0c186", "test.tamanu.source_not_null_tamanu_tasks_due_time.786df1eb28", "test.tamanu.source_not_null_tamanu_tasks_encounter_id.a10fb48922", "test.tamanu.source_not_null_tamanu_tasks_id.5bf790bd4a", "test.tamanu.source_not_null_tamanu_tasks_name.2bd48eee09", "test.tamanu.source_not_null_tamanu_tasks_request_time.23dfcbcfc2", "test.tamanu.source_not_null_tamanu_tasks_requested_by_user_id.952e010b84", "test.tamanu.source_not_null_tamanu_tasks_status.bac3beba06", "test.tamanu.source_not_null_tamanu_tasks_task_type.4d57fb7d6d", "test.tamanu.source_not_null_tamanu_tasks_updated_at.6e16335296", "test.tamanu.source_not_null_tamanu_tasks_updated_at_sync_tick.1b04cf33ee", "test.tamanu.source_unique_tamanu_tasks_id.78245a380c"], "source.tamanu.tamanu.imaging_request_areas": ["test.tamanu.source_not_null_tamanu_imaging_request_areas_area_id.e9e04e2311", "test.tamanu.source_not_null_tamanu_imaging_request_areas_created_at.bbbd373fe1", "test.tamanu.source_not_null_tamanu_imaging_request_areas_id.3b96eae2fd", "test.tamanu.source_not_null_tamanu_imaging_request_areas_imaging_request_id.c75e5d81dd", "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at.aab4a9c280", "test.tamanu.source_not_null_tamanu_imaging_request_areas_updated_at_sync_tick.cdbd0a0462", "test.tamanu.source_relationships_tamanu_imaging_request_areas_area_id__id__source_tamanu_reference_data_.6afdf29a06", "test.tamanu.source_relationships_tamanu_imaging_request_areas_imaging_request_id__id__source_tamanu_imaging_requests_.ea8a5a0600", "test.tamanu.source_unique_tamanu_imaging_request_areas_id.b9f4c605b2"], "source.tamanu.tamanu.assets": ["test.tamanu.source_accepted_values_tamanu_assets_type__image_png__image_svg.4ac901bedb", "test.tamanu.source_not_null_tamanu_assets_data.58f7384f54", "test.tamanu.source_not_null_tamanu_assets_id.5903661f6e", "test.tamanu.source_not_null_tamanu_assets_name.9ccba2d3d2", "test.tamanu.source_not_null_tamanu_assets_type.a71e515992", "test.tamanu.source_not_null_tamanu_assets_updated_at_sync_tick.6baf11bd0b", "test.tamanu.source_unique_tamanu_assets_id.0b004e27a6"], "source.tamanu.tamanu.reference_drug_facilities": ["test.tamanu.source_not_null_tamanu_reference_drug_facilities_created_at.8b63abec3a", "test.tamanu.source_not_null_tamanu_reference_drug_facilities_facility_id.5012dd6aea", "test.tamanu.source_not_null_tamanu_reference_drug_facilities_reference_drug_id.358fa51efa", "test.tamanu.source_not_null_tamanu_reference_drug_facilities_stock_status.290bc96370", "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at.978a5d4017", "test.tamanu.source_not_null_tamanu_reference_drug_facilities_updated_at_sync_tick.26b8e76f96"], "source.tamanu.tamanu.patient_vrs_data": ["test.tamanu.source_not_null_tamanu_patient_vrs_data_id.4cc64fcbe6", "test.tamanu.source_not_null_tamanu_patient_vrs_data_is_deleted_by_remote.37fb7ca437", "test.tamanu.source_relationships_tamanu_patient_vrs_data_patient_id__id__source_tamanu_patients_.a8a8eb7561", "test.tamanu.source_unique_tamanu_patient_vrs_data_id.23cca07715"], "source.tamanu.tamanu.encounter_pause_prescriptions": ["test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_created_at.ad1eb449bc", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_encounter_prescription_id.fbd245146d", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_id.e57a9fc1b3", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_duration.dbd59b4962", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_end_date.7bc8a722ce", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_start_date.e8ca98a8ab", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_pause_time_unit.d2004436c1", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at.b6f63cea98", "test.tamanu.source_not_null_tamanu_encounter_pause_prescriptions_updated_at_sync_tick.242bd8180f", "test.tamanu.source_unique_tamanu_encounter_pause_prescriptions_id.41bdc9747d"], "source.tamanu.tamanu.pharmacy_orders": ["test.tamanu.source_not_null_tamanu_pharmacy_orders_created_at.c5c0ae80b6", "test.tamanu.source_not_null_tamanu_pharmacy_orders_date.d54f107a00", "test.tamanu.source_not_null_tamanu_pharmacy_orders_encounter_id.5425699795", "test.tamanu.source_not_null_tamanu_pharmacy_orders_facility_id.9a63aff904", "test.tamanu.source_not_null_tamanu_pharmacy_orders_id.a04c130d73", "test.tamanu.source_not_null_tamanu_pharmacy_orders_is_discharge_prescription.3adc7ce103", "test.tamanu.source_not_null_tamanu_pharmacy_orders_ordering_clinician_id.51e116019a", "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at.5cbf7e3b7d", "test.tamanu.source_not_null_tamanu_pharmacy_orders_updated_at_sync_tick.bc9433fa8e", "test.tamanu.source_unique_tamanu_pharmacy_orders_id.8a0e450c16"], "source.tamanu.tamanu.portal_survey_assignments": ["test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_at.368a678108", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_assigned_by_id.0e7bb7620f", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_created_at.28c46a0f38", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_facility_id.635b864bd0", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_id.493854cb01", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_patient_id.4d329cbe3d", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_status.cbc3f2b455", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_survey_id.4c38bb901d", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at.fba08a91b8", "test.tamanu.source_not_null_tamanu_portal_survey_assignments_updated_at_sync_tick.71bac26d85", "test.tamanu.source_unique_tamanu_portal_survey_assignments_id.07592792ba"], "source.tamanu.tamanu.lab_test_panel_lab_test_types": ["test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_created_at.a16be69527", "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id.35608ab0f8", "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_lab_test_type_id.69ea8c29b8", "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_order.d0f90d653c", "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at.92a5a89a02", "test.tamanu.source_not_null_tamanu_lab_test_panel_lab_test_types_updated_at_sync_tick.539440bb36", "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_.930e94d56c", "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_type_id__id__source_tamanu_lab_test_types_.ca4f2c354a"], "source.tamanu.tamanu.programs": ["test.tamanu.source_not_null_tamanu_programs_created_at.9b5a061fef", "test.tamanu.source_not_null_tamanu_programs_id.30041338c4", "test.tamanu.source_not_null_tamanu_programs_updated_at.1fdd112a50", "test.tamanu.source_not_null_tamanu_programs_updated_at_sync_tick.b90cb49ae9", "test.tamanu.source_relationships_tamanu_surveys_program_id__id__source_tamanu_programs_.fa85daf635", "test.tamanu.source_unique_tamanu_programs_id.62a81a7e37"], "source.tamanu.tamanu.sync_device_ticks": ["test.tamanu.source_not_null_tamanu_sync_device_ticks_device_id.6e51235a41", "test.tamanu.source_not_null_tamanu_sync_device_ticks_persisted_at_sync_tick.70f0dcb68a", "test.tamanu.source_unique_tamanu_sync_device_ticks_persisted_at_sync_tick.fad79e2999"], "source.tamanu.tamanu.sync_sessions": ["test.tamanu.source_not_null_tamanu_sync_sessions_created_at.0c852b71e6", "test.tamanu.source_not_null_tamanu_sync_sessions_id.0f66f04bf1", "test.tamanu.source_not_null_tamanu_sync_sessions_last_connection_time.c7679203ab", "test.tamanu.source_not_null_tamanu_sync_sessions_parameters.f21c74e9cb", "test.tamanu.source_not_null_tamanu_sync_sessions_start_time.10e3f256db", "test.tamanu.source_not_null_tamanu_sync_sessions_updated_at.807ac1b19c", "test.tamanu.source_unique_tamanu_sync_sessions_id.889d1d85c3"], "source.tamanu.tamanu.invoice_patient_payments": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_invoice_patient_payments_method_id__id__source_tamanu_reference_data___type_paymentMethod_.0c32c0d3e1", "test.tamanu.source_not_null_tamanu_invoice_patient_payments_created_at.2612097232", "test.tamanu.source_not_null_tamanu_invoice_patient_payments_id.a2e9c179c4", "test.tamanu.source_not_null_tamanu_invoice_patient_payments_invoice_payment_id.b24d465eaf", "test.tamanu.source_not_null_tamanu_invoice_patient_payments_method_id.49c2b4bb2d", "test.tamanu.source_not_null_tamanu_invoice_patient_payments_updated_at_sync_tick.9cbc6365e6", "test.tamanu.source_relationships_tamanu_invoice_patient_payments_invoice_payment_id__id__source_tamanu_invoice_payments_.e12c61546e", "test.tamanu.source_unique_tamanu_invoice_patient_payments_id.31f94704f5", "test.tamanu.source_unique_tamanu_invoice_patient_payments_invoice_payment_id.6379289247"], "source.tamanu.tamanu.locations": ["test.tamanu.source_accepted_values_tamanu_locations_visibility_status__current__historical.8ec0690204", "test.tamanu.source_not_null_tamanu_locations_code.5c9a7f01c2", "test.tamanu.source_not_null_tamanu_locations_id.406e448574", "test.tamanu.source_not_null_tamanu_locations_name.b6c0a3d9c2", "test.tamanu.source_not_null_tamanu_locations_updated_at_sync_tick.3e72adcac5", "test.tamanu.source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_.894dbd0b29", "test.tamanu.source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_.c9d4f477fb", "test.tamanu.source_relationships_tamanu_encounters_location_id__id__source_tamanu_locations_.37f810a377", "test.tamanu.source_relationships_tamanu_encounters_planned_location_id__id__source_tamanu_locations_.b6110183f5", "test.tamanu.source_relationships_tamanu_imaging_requests_location_id__id__source_tamanu_locations_.70fffaafa5", "test.tamanu.source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_.def8603286", "test.tamanu.source_relationships_tamanu_locations_location_group_id__id__source_tamanu_location_groups_.351ebd459e", "test.tamanu.source_relationships_tamanu_procedures_location_id__id__source_tamanu_locations_.679ed5aba8", "test.tamanu.source_unique_tamanu_locations_code.dffad8f5ce", "test.tamanu.source_unique_tamanu_locations_id.09af17ade1"], "source.tamanu.tamanu.portal_users": ["test.tamanu.source_not_null_tamanu_portal_users_created_at.dd512de83d", "test.tamanu.source_not_null_tamanu_portal_users_email.46b31ee79f", "test.tamanu.source_not_null_tamanu_portal_users_id.5d79991deb", "test.tamanu.source_not_null_tamanu_portal_users_patient_id.f2014094b2", "test.tamanu.source_not_null_tamanu_portal_users_status.1904f1c6d7", "test.tamanu.source_not_null_tamanu_portal_users_updated_at.5a6d07bf8a", "test.tamanu.source_not_null_tamanu_portal_users_updated_at_sync_tick.b6190d5108", "test.tamanu.source_unique_tamanu_portal_users_email.4ffb54b9ac", "test.tamanu.source_unique_tamanu_portal_users_id.2af5302ce1"], "source.tamanu.tamanu.invoice_item_finalised_insurances": ["test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_coverage_value_final.21d527ca7b", "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_created_at.c2d663353d", "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_id.c00db5ebff", "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_insurance_plan_id.61feb9231c", "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_invoice_item_id.705d63f383", "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at.eaa471bbcf", "test.tamanu.source_not_null_tamanu_invoice_item_finalised_insurances_updated_at_sync_tick.b75138b334", "test.tamanu.source_unique_tamanu_invoice_item_finalised_insurances_id.7d268a7e0a"], "source.tamanu.tamanu.task_templates": ["test.tamanu.source_not_null_tamanu_task_templates_created_at.dc5ea6d6ea", "test.tamanu.source_not_null_tamanu_task_templates_id.0933c9bcea", "test.tamanu.source_not_null_tamanu_task_templates_reference_data_id.7d5a72304e", "test.tamanu.source_not_null_tamanu_task_templates_updated_at.4ff8103b44", "test.tamanu.source_not_null_tamanu_task_templates_updated_at_sync_tick.91bfaac2c6", "test.tamanu.source_unique_tamanu_task_templates_id.f452d2227f", "test.tamanu.source_unique_tamanu_task_templates_reference_data_id.7d4341b2a8"], "source.tamanu.tamanu.attachments": ["test.tamanu.source_not_null_tamanu_attachments_data.d8f00c841e", "test.tamanu.source_not_null_tamanu_attachments_id.89138b8f9e", "test.tamanu.source_not_null_tamanu_attachments_type.3fa788a0f1", "test.tamanu.source_not_null_tamanu_attachments_updated_at_sync_tick.964e5f600d", "test.tamanu.source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_.422a5cdedd", "test.tamanu.source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_.eff1df818f", "test.tamanu.source_unique_tamanu_attachments_id.58d67f1227"], "source.tamanu.tamanu.translated_strings": ["test.tamanu.source_not_null_tamanu_translated_strings_created_at.07e267913e", "test.tamanu.source_not_null_tamanu_translated_strings_language.5db2b5e2e8", "test.tamanu.source_not_null_tamanu_translated_strings_string_id.7e37c8c4ad", "test.tamanu.source_not_null_tamanu_translated_strings_updated_at.d1e4d3b582", "test.tamanu.source_not_null_tamanu_translated_strings_updated_at_sync_tick.25a430f1e2"], "source.tamanu.tamanu.survey_responses": ["test.tamanu.source_not_null_tamanu_survey_responses_created_at.49ae85efe6", "test.tamanu.source_not_null_tamanu_survey_responses_id.89723bde14", "test.tamanu.source_not_null_tamanu_survey_responses_updated_at.1ac4070914", "test.tamanu.source_not_null_tamanu_survey_responses_updated_at_sync_tick.d413782924", "test.tamanu.source_relationships_tamanu_referrals_survey_response_id__id__source_tamanu_survey_responses_.36148d215d", "test.tamanu.source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_.f49aacfe3d", "test.tamanu.source_relationships_tamanu_survey_responses_encounter_id__id__source_tamanu_encounters_.5fa54101ad", "test.tamanu.source_relationships_tamanu_survey_responses_survey_id__id__source_tamanu_surveys_.f0ce4a9c90", "test.tamanu.source_relationships_tamanu_survey_responses_user_id__id__source_tamanu_users_.2aef705f04", "test.tamanu.source_unique_tamanu_survey_responses_id.7d37627ac3"], "source.tamanu.tamanu.devices": ["test.tamanu.source_not_null_tamanu_devices_created_at.f353e449ee", "test.tamanu.source_not_null_tamanu_devices_id.5c11d14906", "test.tamanu.source_not_null_tamanu_devices_last_seen_at.940293bbb4", "test.tamanu.source_not_null_tamanu_devices_registered_by_id.99c3580040", "test.tamanu.source_not_null_tamanu_devices_scopes.a34bba28b6", "test.tamanu.source_not_null_tamanu_devices_updated_at.9667683ae2", "test.tamanu.source_relationships_tamanu_devices_registered_by_id__id__source_tamanu_users_.b7e1d90812", "test.tamanu.source_relationships_tamanu_user_login_attempts_device_id__id__source_tamanu_devices_.caa8944999", "test.tamanu.source_unique_tamanu_devices_id.0507752158"], "source.tamanu.tamanu.patient_invoice_insurance_plans": ["test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_created_at.558236cf0c", "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_id.67fd40be6c", "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_invoice_insurance_plan_id.2ce603fd96", "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_patient_id.88ff695295", "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at.46249b6ee1", "test.tamanu.source_not_null_tamanu_patient_invoice_insurance_plans_updated_at_sync_tick.0c00fa1166", "test.tamanu.source_unique_tamanu_patient_invoice_insurance_plans_id.d4e0a2e211"], "source.tamanu.tamanu.patient_death_data": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause1_condition_id__id__source_tamanu_reference_data___type_diagnosis_.7ace974f49", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause2_condition_id__id__source_tamanu_reference_data___type_diagnosis_.1dea4f8138", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_antecedent_cause3_condition_id__id__source_tamanu_reference_data___type_diagnosis_.c7596dc8de", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_last_surgery_reason_id__id__source_tamanu_reference_data___type_diagnosis_.f3a9b1a797", "test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_death_data_primary_cause_condition_id__id__source_tamanu_reference_data___type_diagnosis_.27473a57dc", "test.tamanu.source_not_null_tamanu_patient_death_data_clinician_id.419275886d", "test.tamanu.source_not_null_tamanu_patient_death_data_id.61b8d549ff", "test.tamanu.source_not_null_tamanu_patient_death_data_is_final.f258620126", "test.tamanu.source_not_null_tamanu_patient_death_data_patient_id.fa93535dcf", "test.tamanu.source_not_null_tamanu_patient_death_data_updated_at_sync_tick.74f83a5b18", "test.tamanu.source_relationships_tamanu_contributing_death_causes_patient_death_data_id__id__source_tamanu_patient_death_data_.404540bf0a", "test.tamanu.source_relationships_tamanu_death_revert_logs_death_data_id__id__source_tamanu_patient_death_data_.a370a6342c", "test.tamanu.source_relationships_tamanu_patient_death_data_clinician_id__id__source_tamanu_users_.12e92239d7", "test.tamanu.source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_.d81577e3c0", "test.tamanu.source_relationships_tamanu_patient_death_data_patient_id__id__source_tamanu_patients_.2640b3d741", "test.tamanu.source_unique_tamanu_patient_death_data_id.2155f2b6c6"], "source.tamanu.tamanu.procedure_assistant_clinicians": ["test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_created_at.6b6e8d8caf", "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_id.5e29573c0c", "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_procedure_id.d372d78257", "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at.29771b97a5", "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_updated_at_sync_tick.874770378e", "test.tamanu.source_not_null_tamanu_procedure_assistant_clinicians_user_id.1c73aa9d80", "test.tamanu.source_unique_tamanu_procedure_assistant_clinicians_id.c47366f5e6"], "source.tamanu.tamanu.user_facilities": ["test.tamanu.source_not_null_tamanu_user_facilities_id.b28d1c6ab3", "test.tamanu.source_not_null_tamanu_user_facilities_updated_at_sync_tick.14851edb16", "test.tamanu.source_unique_tamanu_user_facilities_id.30936aeb5a"], "source.tamanu.tamanu.document_metadata": ["test.tamanu.source_accepted_values_tamanu_document_metadata_source__patient_letter__uploaded.d562bb3947", "test.tamanu.source_not_null_tamanu_document_metadata_attachment_id.73279e3459", "test.tamanu.source_not_null_tamanu_document_metadata_document_uploaded_at.3e699cede3", "test.tamanu.source_not_null_tamanu_document_metadata_id.df7500e31c", "test.tamanu.source_not_null_tamanu_document_metadata_name.1e7e44b11e", "test.tamanu.source_not_null_tamanu_document_metadata_source.c7dde3dea4", "test.tamanu.source_not_null_tamanu_document_metadata_type.ad3c33203c", "test.tamanu.source_not_null_tamanu_document_metadata_updated_at_sync_tick.818184c71a", "test.tamanu.source_relationships_tamanu_document_metadata_attachment_id__id__source_tamanu_attachments_.422a5cdedd", "test.tamanu.source_relationships_tamanu_document_metadata_department_id__id__source_tamanu_departments_.5942352785", "test.tamanu.source_relationships_tamanu_document_metadata_encounter_id__id__source_tamanu_encounters_.58f844c909", "test.tamanu.source_relationships_tamanu_document_metadata_patient_id__id__source_tamanu_patients_.697577ed3b", "test.tamanu.source_unique_tamanu_document_metadata_id.25fbd602e6"], "source.tamanu.tamanu.procedure_type_surveys": ["test.tamanu.source_not_null_tamanu_procedure_type_surveys_created_at.f34e2e523c", "test.tamanu.source_not_null_tamanu_procedure_type_surveys_id.846fa7b74b", "test.tamanu.source_not_null_tamanu_procedure_type_surveys_procedure_type_id.05c245e1bc", "test.tamanu.source_not_null_tamanu_procedure_type_surveys_survey_id.8490b1ab3d", "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at.b5a09d255c", "test.tamanu.source_not_null_tamanu_procedure_type_surveys_updated_at_sync_tick.d37ec82a41", "test.tamanu.source_unique_tamanu_procedure_type_surveys_id.4813977d15"], "source.tamanu.tamanu.administered_vaccines": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_administered_vaccines_not_given_reason_id__id__source_tamanu_reference_data___type_vaccineNotGivenReason_.8bc715362f", "test.tamanu.source_accepted_values_tamanu_administered_vaccines_injection_site__left_arm__right_arm__left_thigh__right_thigh__oral__other.a34597923c", "test.tamanu.source_accepted_values_tamanu_administered_vaccines_status__DUE__GIVEN__HISTORICAL__MISSED__NOT_GIVEN__OVERDUE__RECORDED_IN_ERROR__SCHEDULED__UNKNOWN__UPCOMING.8b8a9d77fd", "test.tamanu.source_not_null_tamanu_administered_vaccines_created_at.311e25104e", "test.tamanu.source_not_null_tamanu_administered_vaccines_id.71c049c95c", "test.tamanu.source_not_null_tamanu_administered_vaccines_status.3bf7e20f14", "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at.81a714c41e", "test.tamanu.source_not_null_tamanu_administered_vaccines_updated_at_sync_tick.1f4a79d8c1", "test.tamanu.source_relationships_tamanu_administered_vaccines_encounter_id__id__source_tamanu_encounters_.1ab396ce2d", "test.tamanu.source_relationships_tamanu_administered_vaccines_scheduled_vaccine_id__id__source_tamanu_scheduled_vaccines_.7bc6d9cb6e", "test.tamanu.source_unique_tamanu_administered_vaccines_id.1b16daae05"], "source.tamanu.tamanu.report_definition_versions": ["test.tamanu.source_accepted_values_tamanu_report_definition_versions_status__draft__published.7b945f9a74", "test.tamanu.source_not_null_tamanu_report_definition_versions_id.aeefc85efc", "test.tamanu.source_not_null_tamanu_report_definition_versions_status.b2ccf6ba31", "test.tamanu.source_not_null_tamanu_report_definition_versions_updated_at_sync_tick.c11a1df762", "test.tamanu.source_not_null_tamanu_report_definition_versions_user_id.c3351f91fd", "test.tamanu.source_not_null_tamanu_report_definition_versions_version_number.a1c7832d22", "test.tamanu.source_relationships_tamanu_report_definition_versions_report_definition_id__id__source_tamanu_report_definitions_.b208147bc2", "test.tamanu.source_relationships_tamanu_report_definition_versions_user_id__id__source_tamanu_users_.53887ef192", "test.tamanu.source_relationships_tamanu_report_requests_report_definition_version_id__id__source_tamanu_report_definition_versions_.c9440b513d", "test.tamanu.source_unique_tamanu_report_definition_versions_id.fc34f6d49c"], "source.tamanu.tamanu.sync_lookup": ["test.tamanu.source_not_null_tamanu_sync_lookup_data.aadfed61f6", "test.tamanu.source_not_null_tamanu_sync_lookup_id.e77326bde2", "test.tamanu.source_not_null_tamanu_sync_lookup_is_deleted.356b4fa211", "test.tamanu.source_not_null_tamanu_sync_lookup_is_lab_request.dbe4ce8b63", "test.tamanu.source_not_null_tamanu_sync_lookup_record_id.39e7bce4d2", "test.tamanu.source_not_null_tamanu_sync_lookup_record_type.f0bc60b21f", "test.tamanu.source_not_null_tamanu_sync_lookup_updated_at_sync_tick.902ae4ae9c", "test.tamanu.source_relationships_tamanu_sync_lookup_encounter_id__id__source_tamanu_encounters_.f3141bec3e", "test.tamanu.source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_.c67a117f63", "test.tamanu.source_relationships_tamanu_sync_lookup_patient_id__id__source_tamanu_patients_.07efccc886", "test.tamanu.source_unique_tamanu_sync_lookup_id.dc05d15b43"], "source.tamanu.tamanu.encounter_prescriptions": ["test.tamanu.source_not_null_tamanu_encounter_prescriptions_created_at.777fb22523", "test.tamanu.source_not_null_tamanu_encounter_prescriptions_encounter_id.ea618fdd05", "test.tamanu.source_not_null_tamanu_encounter_prescriptions_id.3be49c8399", "test.tamanu.source_not_null_tamanu_encounter_prescriptions_is_selected_for_discharge.621eb1bc4b", "test.tamanu.source_not_null_tamanu_encounter_prescriptions_prescription_id.485995235b", "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at.cc684b1350", "test.tamanu.source_not_null_tamanu_encounter_prescriptions_updated_at_sync_tick.b07eb557ab", "test.tamanu.source_unique_tamanu_encounter_prescriptions_id.6371d45cc1"], "source.tamanu.tamanu.notifications": ["test.tamanu.source_not_null_tamanu_notifications_created_at.8d2ded1ce7", "test.tamanu.source_not_null_tamanu_notifications_created_time.5a54e4d785", "test.tamanu.source_not_null_tamanu_notifications_id.04c2f24f06", "test.tamanu.source_not_null_tamanu_notifications_metadata.054778f4a5", "test.tamanu.source_not_null_tamanu_notifications_status.74f6b456fc", "test.tamanu.source_not_null_tamanu_notifications_type.a007c8bb26", "test.tamanu.source_not_null_tamanu_notifications_updated_at.ae82c65f62", "test.tamanu.source_not_null_tamanu_notifications_updated_at_sync_tick.9098dc98f2", "test.tamanu.source_not_null_tamanu_notifications_user_id.72a5473ae9", "test.tamanu.source_unique_tamanu_notifications_id.51d3db417b"], "source.tamanu.tamanu.reference_medication_templates": ["test.tamanu.source_not_null_tamanu_reference_medication_templates_created_at.f610fc9916", "test.tamanu.source_not_null_tamanu_reference_medication_templates_frequency.af51280e00", "test.tamanu.source_not_null_tamanu_reference_medication_templates_id.f4e40f0746", "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_ongoing.a2332da0d1", "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_prn.6fb35e8eed", "test.tamanu.source_not_null_tamanu_reference_medication_templates_is_variable_dose.13556de3df", "test.tamanu.source_not_null_tamanu_reference_medication_templates_medication_id.050df86e27", "test.tamanu.source_not_null_tamanu_reference_medication_templates_reference_data_id.655683c6a0", "test.tamanu.source_not_null_tamanu_reference_medication_templates_route.a182c49081", "test.tamanu.source_not_null_tamanu_reference_medication_templates_units.692f7068eb", "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at.b43c9d5e62", "test.tamanu.source_not_null_tamanu_reference_medication_templates_updated_at_sync_tick.cd13e259c4", "test.tamanu.source_unique_tamanu_reference_medication_templates_id.9c50848c51"], "source.tamanu.tamanu.patient_conditions": ["test.tamanu.source_not_null_tamanu_patient_conditions_created_at.deda3b580a", "test.tamanu.source_not_null_tamanu_patient_conditions_id.5d2e0fb3a9", "test.tamanu.source_not_null_tamanu_patient_conditions_recorded_date.91d95abca2", "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at.1dc42ed219", "test.tamanu.source_not_null_tamanu_patient_conditions_updated_at_sync_tick.2e7535fcbb", "test.tamanu.source_unique_tamanu_patient_conditions_id.1b1daf4d86"], "source.tamanu.tamanu.survey_response_answers": ["test.tamanu.source_not_null_tamanu_survey_response_answers_created_at.6a14b3247f", "test.tamanu.source_not_null_tamanu_survey_response_answers_id.a1a5252fba", "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at.e9d87e13d5", "test.tamanu.source_not_null_tamanu_survey_response_answers_updated_at_sync_tick.23337bdabf", "test.tamanu.source_relationships_tamanu_survey_response_answers_data_element_id__id__source_tamanu_program_data_elements_.a34b366f2b", "test.tamanu.source_relationships_tamanu_survey_response_answers_response_id__id__source_tamanu_survey_responses_.f49aacfe3d", "test.tamanu.source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_.345fc6ff26", "test.tamanu.source_unique_tamanu_survey_response_answers_id.9ab12c2f4a"], "source.tamanu.tamanu.reference_data_relations": ["test.tamanu.source_not_null_tamanu_reference_data_relations_created_at.c605cb5fd3", "test.tamanu.source_not_null_tamanu_reference_data_relations_id.6816cc32f5", "test.tamanu.source_not_null_tamanu_reference_data_relations_type.16a6b96610", "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at.1731c2aeb8", "test.tamanu.source_not_null_tamanu_reference_data_relations_updated_at_sync_tick.b7d71eb49b", "test.tamanu.source_unique_tamanu_reference_data_relations_id.0fd94d2b7e"], "source.tamanu.tamanu.task_template_designations": ["test.tamanu.source_not_null_tamanu_task_template_designations_created_at.c02e7baa62", "test.tamanu.source_not_null_tamanu_task_template_designations_designation_id.08e232161f", "test.tamanu.source_not_null_tamanu_task_template_designations_id.b21ed442a4", "test.tamanu.source_not_null_tamanu_task_template_designations_task_template_id.7cd91a06a9", "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at.8c60186f8d", "test.tamanu.source_not_null_tamanu_task_template_designations_updated_at_sync_tick.a7118edaf1", "test.tamanu.source_unique_tamanu_task_template_designations_id.d2b5b4576a"], "source.tamanu.tamanu.permissions": ["test.tamanu.source_not_null_tamanu_permissions_id.6ee02405bb", "test.tamanu.source_not_null_tamanu_permissions_noun.e00a302536", "test.tamanu.source_not_null_tamanu_permissions_role_id.de3cb0b624", "test.tamanu.source_not_null_tamanu_permissions_updated_at_sync_tick.cb90c585be", "test.tamanu.source_not_null_tamanu_permissions_verb.7e7206e395", "test.tamanu.source_relationships_tamanu_permissions_role_id__id__source_tamanu_roles_.5a5a1be407", "test.tamanu.source_unique_tamanu_permissions_id.f42c77c5be"], "source.tamanu.tamanu.patient_field_definition_categories": ["test.tamanu.source_not_null_tamanu_patient_field_definition_categories_created_at.aca434dbf3", "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_id.a80a45d121", "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_name.a7913c1d45", "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at.f6f9f3ee6a", "test.tamanu.source_not_null_tamanu_patient_field_definition_categories_updated_at_sync_tick.e345b399c6", "test.tamanu.source_relationships_tamanu_patient_field_definitions_category_id__id__source_tamanu_patient_field_definition_categories_.d67c1014d6", "test.tamanu.source_unique_tamanu_patient_field_definition_categories_id.7b788d0c37"], "source.tamanu.tamanu.medication_administration_record_doses": ["test.tamanu.source_not_null_tamanu_medication_administration_record_doses_created_at.d2ae234e45", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_amount.331e93abb3", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_dose_index.c22ff9799c", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_by_user_id.65d6a1441b", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_given_time.1ccce1a649", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_id.a52e3aa0c8", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_mar_id.5c2f68633d", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_recorded_by_user_id.a78608d49f", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at.3bad2c9822", "test.tamanu.source_not_null_tamanu_medication_administration_record_doses_updated_at_sync_tick.fc7397bf69", "test.tamanu.source_unique_tamanu_medication_administration_record_doses_id.433dfbdead"], "source.tamanu.tamanu.facilities": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_facilities_catchment_id__id__source_tamanu_reference_data___type_catchment_.0a191fc0e4", "test.tamanu.source_accepted_values_tamanu_facilities_visibility_status__current__historical.1f32aa4a9d", "test.tamanu.source_not_null_tamanu_facilities_code.55fbf8c36c", "test.tamanu.source_not_null_tamanu_facilities_id.ad186295b9", "test.tamanu.source_not_null_tamanu_facilities_is_sensitive.83efc1299f", "test.tamanu.source_not_null_tamanu_facilities_name.9ac276f33d", "test.tamanu.source_not_null_tamanu_facilities_updated_at_sync_tick.5ebc0505a1", "test.tamanu.source_relationships_tamanu_departments_facility_id__id__source_tamanu_facilities_.632d512530", "test.tamanu.source_relationships_tamanu_discharges_facility_address__street_address__source_tamanu_facilities_.298b48d81f", "test.tamanu.source_relationships_tamanu_discharges_facility_name__name__source_tamanu_facilities_.1fe0fe6f7f", "test.tamanu.source_relationships_tamanu_discharges_facility_town__city_town__source_tamanu_facilities_.68747350e4", "test.tamanu.source_relationships_tamanu_location_groups_facility_id__id__source_tamanu_facilities_.ecb02b7330", "test.tamanu.source_relationships_tamanu_locations_facility_id__id__source_tamanu_facilities_.def8603286", "test.tamanu.source_relationships_tamanu_patient_birth_data_birth_facility_id__id__source_tamanu_facilities_.41f2b0a645", "test.tamanu.source_relationships_tamanu_patient_death_data_facility_id__id__source_tamanu_facilities_.d81577e3c0", "test.tamanu.source_relationships_tamanu_patient_facilities_facility_id__id__source_tamanu_facilities_.8a454e3fea", "test.tamanu.source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_.e70f29b144", "test.tamanu.source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_.0915c99f9a", "test.tamanu.source_relationships_tamanu_report_requests_facility_id__id__source_tamanu_facilities_.ce7ace92aa", "test.tamanu.source_relationships_tamanu_settings_facility_id__id__source_tamanu_facilities_.bf1a10aebe", "test.tamanu.source_relationships_tamanu_sync_lookup_facility_id__id__source_tamanu_facilities_.c67a117f63", "test.tamanu.source_unique_tamanu_facilities_id.9e454badf4"], "source.tamanu.tamanu.encounter_history": ["test.tamanu.source_accepted_values_tamanu_encounter_history_encounter_type__admission__clinic__imaging__emergency__observation__triage__surveyResponse__vaccination.af58070d62", "test.tamanu.source_not_null_tamanu_encounter_history_change_type.53d3e33bca", "test.tamanu.source_not_null_tamanu_encounter_history_created_at.d7d91fd2e8", "test.tamanu.source_not_null_tamanu_encounter_history_date.5840578e29", "test.tamanu.source_not_null_tamanu_encounter_history_department_id.2bf94ddc1c", "test.tamanu.source_not_null_tamanu_encounter_history_encounter_id.5d9223d72c", "test.tamanu.source_not_null_tamanu_encounter_history_encounter_type.a7b6e21a3c", "test.tamanu.source_not_null_tamanu_encounter_history_examiner_id.96fc96334d", "test.tamanu.source_not_null_tamanu_encounter_history_id.98f4907b32", "test.tamanu.source_not_null_tamanu_encounter_history_location_id.5b7796abc8", "test.tamanu.source_not_null_tamanu_encounter_history_updated_at.cafd8d5cb6", "test.tamanu.source_not_null_tamanu_encounter_history_updated_at_sync_tick.6ea4b7b4cd", "test.tamanu.source_relationships_tamanu_encounter_history_actor_id__id__source_tamanu_users_.fbf272ed47", "test.tamanu.source_relationships_tamanu_encounter_history_department_id__id__source_tamanu_departments_.cc3dcc54fd", "test.tamanu.source_relationships_tamanu_encounter_history_encounter_id__id__source_tamanu_encounters_.98ae5b7d3b", "test.tamanu.source_relationships_tamanu_encounter_history_examiner_id__id__source_tamanu_users_.b2d555c7b6", "test.tamanu.source_relationships_tamanu_encounter_history_location_id__id__source_tamanu_locations_.c9d4f477fb", "test.tamanu.source_unique_tamanu_encounter_history_id.b5104bb3a4"], "source.tamanu.tamanu.patient_program_registrations": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_program_registrations_village_id__id__source_tamanu_reference_data___type_village_.db6437c554", "test.tamanu.source_not_null_tamanu_patient_program_registrations_clinician_id.f5eec02863", "test.tamanu.source_not_null_tamanu_patient_program_registrations_created_at.b6bbcb66a6", "test.tamanu.source_not_null_tamanu_patient_program_registrations_date.ee77ca5f67", "test.tamanu.source_not_null_tamanu_patient_program_registrations_id.3e27cbc953", "test.tamanu.source_not_null_tamanu_patient_program_registrations_patient_id.21a8bab832", "test.tamanu.source_not_null_tamanu_patient_program_registrations_program_registry_id.c9b21e72ac", "test.tamanu.source_not_null_tamanu_patient_program_registrations_registration_status.f99db0e260", "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at.7b0cb3a4d3", "test.tamanu.source_not_null_tamanu_patient_program_registrations_updated_at_sync_tick.6e539b8d2d", "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinical_status_id__id__source_tamanu_program_registry_clinical_statuses_.f60ae13805", "test.tamanu.source_relationships_tamanu_patient_program_registrations_clinician_id__id__source_tamanu_users_.660ded928b", "test.tamanu.source_relationships_tamanu_patient_program_registrations_facility_id__id__source_tamanu_facilities_.e70f29b144", "test.tamanu.source_relationships_tamanu_patient_program_registrations_patient_id__id__source_tamanu_patients_.edaef8726f", "test.tamanu.source_relationships_tamanu_patient_program_registrations_program_registry_id__id__source_tamanu_program_registries_.ca26255395", "test.tamanu.source_relationships_tamanu_patient_program_registrations_registering_facility_id__id__source_tamanu_facilities_.0915c99f9a", "test.tamanu.source_unique_tamanu_patient_program_registrations_id.82d7fead9b"], "source.tamanu.tamanu.lab_test_panels": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_lab_test_panels_category_id__id__source_tamanu_reference_data___type_labTestCategory_.f5578be7c6", "test.tamanu.source_not_null_tamanu_lab_test_panels_code.41611b6a55", "test.tamanu.source_not_null_tamanu_lab_test_panels_created_at.da26e7a248", "test.tamanu.source_not_null_tamanu_lab_test_panels_id.11a6b51e6b", "test.tamanu.source_not_null_tamanu_lab_test_panels_name.3fdd4c9c83", "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at.b4f58197df", "test.tamanu.source_not_null_tamanu_lab_test_panels_updated_at_sync_tick.bd90caed16", "test.tamanu.source_not_null_tamanu_lab_test_panels_visibility_status.482b848a4d", "test.tamanu.source_relationships_tamanu_lab_test_panel_lab_test_types_lab_test_panel_id__id__source_tamanu_lab_test_panels_.930e94d56c", "test.tamanu.source_relationships_tamanu_lab_test_panel_requests_lab_test_panel_id__id__source_tamanu_lab_test_panels_.1bf2e5a1ff", "test.tamanu.source_unique_tamanu_lab_test_panels_id.509550e62b"], "source.tamanu.tamanu.appointments": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_appointment_type_id__id__source_tamanu_reference_data___type_appointmentType_.d6a8261230", "test.tamanu.dbt_utils_source_relationships_where_tamanu_appointments_booking_type_id__id__source_tamanu_reference_data___type_bookingType_.e993598733", "test.tamanu.source_accepted_values_tamanu_appointments_status__Confirmed__Arrived__Assessed__Seen__No_show__Cancelled.2b51753ed0", "test.tamanu.source_not_null_tamanu_appointments_id.d1a6de3ce4", "test.tamanu.source_not_null_tamanu_appointments_is_high_priority.3c2beccb9c", "test.tamanu.source_not_null_tamanu_appointments_status.3078c54556", "test.tamanu.source_not_null_tamanu_appointments_type_legacy.cd7aaf3419", "test.tamanu.source_not_null_tamanu_appointments_updated_at_sync_tick.fc1a99ab76", "test.tamanu.source_relationships_tamanu_appointments_clinician_id__id__source_tamanu_users_.b2920f6fec", "test.tamanu.source_relationships_tamanu_appointments_location_group_id__id__source_tamanu_location_groups_.b603c9c40f", "test.tamanu.source_relationships_tamanu_appointments_location_id__id__source_tamanu_locations_.894dbd0b29", "test.tamanu.source_relationships_tamanu_appointments_patient_id__id__source_tamanu_patients_.994c2060a5", "test.tamanu.source_unique_tamanu_appointments_id.5632c4fc60"], "source.tamanu.tamanu.patient_family_histories": ["test.tamanu.dbt_utils_source_relationships_where_tamanu_patient_family_histories_diagnosis_id__id__source_tamanu_reference_data___type_diagnosis_.569a8c1cce", "test.tamanu.source_not_null_tamanu_patient_family_histories_created_at.8ee5173bfa", "test.tamanu.source_not_null_tamanu_patient_family_histories_id.d2d0e80b7f", "test.tamanu.source_not_null_tamanu_patient_family_histories_recorded_date.ec1039e1d3", "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at.c710d3b7b3", "test.tamanu.source_not_null_tamanu_patient_family_histories_updated_at_sync_tick.eff3f46718", "test.tamanu.source_relationships_tamanu_patient_family_histories_patient_id__id__source_tamanu_patients_.3f50556d92", "test.tamanu.source_relationships_tamanu_patient_family_histories_practitioner_id__id__source_tamanu_users_.1464fe93d6", "test.tamanu.source_unique_tamanu_patient_family_histories_id.403e2d1751"], "source.tamanu.tamanu.ips_requests": ["test.tamanu.source_not_null_tamanu_ips_requests_created_at.28215c9764", "test.tamanu.source_not_null_tamanu_ips_requests_created_by.943d0fec8d", "test.tamanu.source_not_null_tamanu_ips_requests_email.29f30a58bf", "test.tamanu.source_not_null_tamanu_ips_requests_id.82d75ba779", "test.tamanu.source_not_null_tamanu_ips_requests_patient_id.b5ad6ea558", "test.tamanu.source_not_null_tamanu_ips_requests_status.680fa2f376", "test.tamanu.source_not_null_tamanu_ips_requests_updated_at.b1c150635e", "test.tamanu.source_not_null_tamanu_ips_requests_updated_at_sync_tick.72991067d9", "test.tamanu.source_relationships_tamanu_ips_requests_created_by__id__source_tamanu_users_.9e7a2bec9f", "test.tamanu.source_unique_tamanu_ips_requests_id.3f494ccf34"], "source.tamanu.tamanu.user_recently_viewed_patients": ["test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_created_at.60a2cd8b3e", "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_id.0772796918", "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_patient_id.3c02c3c6e8", "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_updated_at.f76b5440b3", "test.tamanu.source_not_null_tamanu_user_recently_viewed_patients_user_id.8e3a703839", "test.tamanu.source_unique_tamanu_user_recently_viewed_patients_id.723cf05c7a"], "source.tamanu.tamanu.sync_queued_devices": ["test.tamanu.source_not_null_tamanu_sync_queued_devices_created_at.ca84df51b3", "test.tamanu.source_not_null_tamanu_sync_queued_devices_facility_ids.1c565eb9fd", "test.tamanu.source_not_null_tamanu_sync_queued_devices_id.8a7ff7ff9d", "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_seen_time.e49db9d307", "test.tamanu.source_not_null_tamanu_sync_queued_devices_last_synced_tick.ebca46f7d5", "test.tamanu.source_not_null_tamanu_sync_queued_devices_updated_at.3c113842b4", "test.tamanu.source_not_null_tamanu_sync_queued_devices_urgent.cdd3e5fe6d", "test.tamanu.source_unique_tamanu_sync_queued_devices_id.6c914cf2fe"], "source.tamanu.tamanu.patient_secondary_ids": ["test.tamanu.source_not_null_tamanu_patient_secondary_ids_id.c12a4d4ff4", "test.tamanu.source_not_null_tamanu_patient_secondary_ids_patient_id.b8437631c2", "test.tamanu.source_not_null_tamanu_patient_secondary_ids_type_id.1c5040f680", "test.tamanu.source_not_null_tamanu_patient_secondary_ids_updated_at_sync_tick.f04774a463", "test.tamanu.source_not_null_tamanu_patient_secondary_ids_value.ecfec42154", "test.tamanu.source_not_null_tamanu_patient_secondary_ids_visibility_status.687573a37f", "test.tamanu.source_unique_tamanu_patient_secondary_ids_id.3ac199e68c"], "source.tamanu.tamanu.lab_request_attachments": ["test.tamanu.source_not_null_tamanu_lab_request_attachments_attachment_id.6a6139cc22", "test.tamanu.source_not_null_tamanu_lab_request_attachments_created_at.b587e22da8", "test.tamanu.source_not_null_tamanu_lab_request_attachments_id.6f2075f317", "test.tamanu.source_not_null_tamanu_lab_request_attachments_lab_request_id.15bc6fc2df", "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at.ce5b0e489b", "test.tamanu.source_not_null_tamanu_lab_request_attachments_updated_at_sync_tick.a0d8b0a6ba", "test.tamanu.source_relationships_tamanu_lab_request_attachments_attachment_id__id__source_tamanu_attachments_.eff1df818f", "test.tamanu.source_relationships_tamanu_lab_request_attachments_lab_request_id__id__source_tamanu_lab_requests_.8995368506", "test.tamanu.source_relationships_tamanu_lab_request_attachments_replaced_by_id__id__source_tamanu_lab_request_attachments_.5c53ecfc7d", "test.tamanu.source_unique_tamanu_lab_request_attachments_id.b7eb3f1eb1"], "source.tamanu.tamanu.vital_logs": ["test.tamanu.source_accepted_values_tamanu_vital_logs_reason_for_change__incorrect_patient__incorrect_value__other__recorded_in_error.f8319959ff", "test.tamanu.source_not_null_tamanu_vital_logs_answer_id.a061b3580d", "test.tamanu.source_not_null_tamanu_vital_logs_created_at.1c50457539", "test.tamanu.source_not_null_tamanu_vital_logs_date.19b648a68b", "test.tamanu.source_not_null_tamanu_vital_logs_id.2865672c8c", "test.tamanu.source_not_null_tamanu_vital_logs_updated_at.fad4900972", "test.tamanu.source_not_null_tamanu_vital_logs_updated_at_sync_tick.8257970877", "test.tamanu.source_relationships_tamanu_vital_logs_answer_id__id__source_tamanu_survey_response_answers_.345fc6ff26", "test.tamanu.source_relationships_tamanu_vital_logs_recorded_by_id__id__source_tamanu_users_.7c5a5dd055", "test.tamanu.source_unique_tamanu_vital_logs_id.3a1b593bf4"]}, "group_map": {}, "saved_queries": {}, "semantic_models": {}, "unit_tests": {}, "functions": {}}