Data Import sample files
Data Import mappings are referenced to assist in understanding the data mapping capabilities of the Data Import component.
- Basic SQL knowledge
- A functioning Data Import command line utility to run the samples
- Familiarity with the structure and content of Data Import mapping (.properties) files
- A basic knowledge of the Counter Fraud database table
- Importing data and setting up data relationships
See Medical Provider Fraud data ingestion for an example.
- Populating stereotype tables before importing the records that require stereotypes
The Medical Provider Fraud content pack (CFAR file) includes a file named MPF_Stereotypes.sql, which shows how stereotypes are set up. This file is run during the deployment of the Medical Provider Fraud usecase. See the MPF_Stereotypes.sql example.
- Statement modifiers:
- ACTION_MATCH and SKIP_IF_NULL:
This example skips this block if the DIAGNOSIS_ID_SRC_PK value
is null. If DIAGNOSIS_ID_SRC_PK is not null, and
the value is not in the database, it inserts; if the value is in the
database, it updates.
EVENT.EVENT_REFERENCE = DIAGNOSIS_ID_SRC_PK USING ACTION_MATCH_SKIP_IF_NULL "TRIM (%1)" - ACTION_FK: This example causes an insert into
the CFFACT.xxxxxxxxxxxxxxxxxx table
if that value does not already exist. This maintains a reference between
the EVENT_ID and the external DIAGNOSIS_ID_SRC_PK.
EVENT.EVENT_ID = CFM_DIAGNOSIS_VW.DIAGNOSIS_ID_SRC_PK USING ACTION_FK event,5005 "%1" - SKIP_IF_NULL: This example inserts a new record,
if the value of CLAIM_ID_SRC_PK is not null; otherwise,
the block is skipped.
EVENT_PROPERTY.VALUE = CFM_DIAGNOSIS_VW.CLAIM_ID_SRC_PK USING ACTION_SKIP_IF_NULL "TRIM (%1)"
- ACTION_MATCH and SKIP_IF_NULL:
This example skips this block if the DIAGNOSIS_ID_SRC_PK value
is null. If DIAGNOSIS_ID_SRC_PK is not null, and
the value is not in the database, it inserts; if the value is in the
database, it updates.
- QL data conversion operator:
- TIMESTAMP_FORMAT: This example converts the INVOICE_CREATED_DATE field into a specific time stamp format of MM/DD/YYYY HH12:MI AM.
TRANSACTION_RECORDS.BUSINESS_TIMESTAMP = CFM_INVOICE_VW.INVOICE_CREATED_DATE USING ACTION \ "COALESCE (%1, TIMESTAMP_FORMAT ('01/01/1950 12:00 AM', 'MM/DD/YYYY HH12:MI AM'))" - Creating properties for business objects:
- This example creates a new property of type "invoice_number," sets the value of that property to the incoming field INVOICE_NUMBER, and then links this property to the transaction associated to the field INVOICE_ID_SRC_PK.
BEGIN TRANSACTION_PROPERTY.VALUE = CFM_INVOICE_VW.INVOICE_NUMBER USING ACTION_SKIP_IF_NULL "TRIM (%1)" TRANSACTION_PROPERTY.TRANSACTION_ID = CFM_INVOICE_VW.INVOICE_ID_SRC_PK USING ACTION_MATCH \ "(SELECT OBJECT_ID FROM CFFACT.REFERENCE_KEY \ WHERE REMOTE_KEY = %1 AND SYSTEM_ID = 5004 AND OBJECT_TYPE_ID = (SELECT OBJECT_TYPE_ID FROM CFFACT.OBJECT_TYPE \ WHERE STEREOTYPE = 'transaction'))" TRANSACTION_PROPERTY.TXN_PROPERTY_TYPE_ID = CFM_INVOICE_VW.INVOICE_NUMBER USING ACTION_MATCH \ "(SELECT TXN_PROPERTY_TYPE_ID FROM CFFACT.TRANSACTION_PROPERTY_TYPE WHERE STEREOTYPE = 'invoice_number')" END - Creating stereotypes from the input data:
- This example creates a new stereotype, if it does not exist (ACTION_MATCH) with a specific format of diag.ICD.<ICD_INDICATOR value>.<DIAGNOSIS_CODE value>, or diag.ICD.unspec.<DIAGNOSIS_CODE value> depending on the value of ICD_INDICATOR.
REFERENCE_FACT.STEREOTYPE = CFM_DIAGNOSIS_VW.ICD_INDICATOR, CFM_DIAGNOSIS_VW.DIAGNOSIS_CODE USING ACTION_MATCH "CONCAT \ ('diag.ICD', CONCAT (COALESCE (TRIM (%1), 'unspec'), CONCAT ('.', TRIM (%2))))" - Creating entries in more than one Counter Fraud table per CSV line:
- Each BEGIN/END block performs an operation on a table per incoming line of data. Thus, the below two blocks are creating records in two different tables.
BEGIN TRANSACTION_ROLE.PARTY_ID = CFM_INVOICE_VW.PATIENT_ID_SRC_PK USING ACTION_SKIP_IF_NULL \ "(SELECT OBJECT_ID FROM CFFACT.REFERENCE_KEY \ WHERE REMOTE_KEY = %1 AND SYSTEM_ID = 5001 AND OBJECT_TYPE_ID = \ (SELECT OBJECT_TYPE_ID FROM CFFACT.OBJECT_TYPE WHERE STEREOTYPE = 'party'))" TRANSACTION_ROLE.TRANSACTION_ID = CFM_INVOICE_VW.INVOICE_ID_SRC_PK USING ACTION_MATCH \ "(SELECT OBJECT_ID FROM CFFACT.REFERENCE_KEY \ WHERE REMOTE_KEY = %1 AND SYSTEM_ID = 5004 AND OBJECT_TYPE_ID = \ (SELECT OBJECT_TYPE_ID FROM CFFACT.OBJECT_TYPE WHERE STEREOTYPE = 'transaction'))" TRANSACTION_ROLE.TXN_ROLE_TYPE_ID = CFM_INVOICE_VW.PATIENT_ID_SRC_PK USING ACTION_MATCH \ "(SELECT TXN_ROLE_TYPE_ID FROM CFFACT.TRANSACTION_ROLE_TYPE WHERE STEREOTYPE = 'invoice_patient')" END BEGIN TRANSACTION_DISPOSITION.DISPOSITION_REASON = CFM_INVOICE_VW.PATIENT_STATUS USING ACTION_SKIP_IF_NULL \ "TRIM (%1)" TRANSACTION_DISPOSITION.TRANSACTION_ID = CFM_INVOICE_VW.INVOICE_ID_SRC_PK USING ACTION_MATCH \ "(SELECT OBJECT_ID FROM CFFACT.REFERENCE_KEY \ WHERE REMOTE_KEY = %1 AND SYSTEM_ID = 5004 AND OBJECT_TYPE_ID = \ (SELECT OBJECT_TYPE_ID FROM CFFACT.OBJECT_TYPE WHERE STEREOTYPE = 'transaction'))" TRANSACTION_DISPOSITION.TRANSACTION_DISPOSITION_TYPE_ID = CFM_INVOICE_VW.PATIENT_STATUS USING ACTION_MATCH \ "(SELECT TRANSACTION_DISPOSITION_TYPE_ID FROM CFFACT.TRANSACTION_DISPOSITION_TYPE \ WHERE STEREOTYPE = 'patient_status')" END
- If you need to use dynamic IDs and your input data has a unique
column, then you can assign the input unique ID to a non-primary column
and then reference that column when you link properties.
For example, assume that you are inserting into the PARTY table and need to assign properties. If your input CSV has columns Uniq_ID, Prop_One, and Prop_Two, then the following mapping statements assign the input Uniq_ID to the REGISTERED_NUMBER column, and reference the REGISTERED_NUMBER column when attaching properties:
# Sample fragment on using non-primary columns to link across tables: # Input columns include: ...,Uniq_ID,Prop_One,Prop_Two,... # #-Create PARTY, note PARTY.PARTY_ID not referenced PARTY.REGISTERED_NUMBER = Uniq_id ... #- Create property for the party, locate correct PARTY_ID by Uniq_id PARTY_PROPERTY.PARTY_ID = Uniq_id USING ACTION "(Select PARTY_ID from CFFACT.PARTY where REGISTERED_NUMBER = %1)" PARTY_PROPERTY.VALUE = Prop_One ... - If you need to use dynamic IDs and your input data does not have
a unique column, you can use the DB2 GET_HASH_VALUE() function to
create a unique key. You can also use the function to use that unique
key when inserting related objects.
The following file snip shows the relevant mapping file.
# File party_dynamic_id.properties # Input columns are: #Name,Function,Title,Work_Phone,Work_Address,Gender,Tenure,Since,Segment,On_List,RelationshipToBank # PARTY - use seven values to create a unique number PARTY.REGISTERED_NUMBER=Name,Function,Title,Work_Phone,Work_Address,Gender,Tenure USING ACTION "\ CAST(DBMS_UTILITY.GET_HASH_VALUE(%1||%2||%3||%4||%5||%6||%7,1,1073741824) AS VARCHAR(50))" # Attach Tenure as a Party Property, use seven values to link across... PARTY_PROPERTY.PARTY_ID = Name,Function,Title,Work_Phone,Work_Address,Gender,Tenure USING ACTION "\ (SELECT PARTY_ID from CFFACT.PARTY where REGISTERED_NUMBER = \ CAST(DBMS_UTILITY.GET_HASH_VALUE(%1||%2||%3||%4||%5||%6||%7,1,1073741824) AS VARCHAR(50))\ )" PARTY_PROPERTY.VALUE = Tenure USING ACTION "%1" PARTY_PROPERTY.PARTY_PROPERTY_TYPE_ID = Name USING ACTION "\ (SELECT PARTY_PROPERTY_TYPE_ID FROM CFFACT.PARTY_PROPERTY_TYPE WHERE STEREOTYPE = 'tenure')" PARTY_PROPERTY.PROPERTY_FORM_ID = Name USING ACTION "\ (SELECT PROPERTY_FORM_ID FROM CFFACT.PROPERTY_FORM WHERE STEREOTYPE = 'string')"Several items to note about this mapping are:- Seven input columns are concatenated as input to the hash function.
- The hash output is cast to varchar(50), as that is the type of PARTY.REGISTERED_NUMBER.
- The value of PARTY.PARTY_ID is assigned by Counter Fraud.
- The link from PARTY_PROPERTIES to PARTY is done using a select for PARTY_ID with a WHERE clause for the hashed value.
- Depending on your input data, you might have hash collisions. If your data has rows that match the columns you provide in the hash function then you should either add columns until hash collisions do not occur, remove the duplicate input data, or use ACTION_MATCH to have an upsert.
MPF_Stereotypes.sql example
--
-- Licensed Materials - Property of IBM
--
-- PID 5725-P56
--
-- (C) Copyright IBM Corp. 2013, 2015 All rights reserved.
--
-- US Government Users Restricted Rights - Use, duplication or
-- disclosure restricted by GSA ADP Schedule Contract with
-- IBM Corp.
--
-- DISCLAIMER OF WARRANTIES. The following code is sample code
-- created by IBM Corporation. This sample code is part of
-- IBM Counter Fraud
Management and is warranted to perform its
-- intended function only if used unmodified. If you modify
-- this code then it is considered provided "AS IS", without
-- warranty of any kind. Notwithstanding the foregoing, IBM
-- shall not be liable for any damages arising out of your use
-- of the sample code, even if they have been advised of the
-- possibility of such damages.
--
--
-- Common/Shared Stereotype Definitions used in Medical Provider Fraud detection
--
--
-- Reference Facts
--
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Procedure code classification', 'Classification hierarchy for procedure codes', 'procedure_class', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Procedure code range', 'Procedure code ranges used in CFM', 'procedure_code_range', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Procedure code', 'Procedure codes used in CFM', 'procedure_code', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Diagnosis to Treatment Mapping', 'Mapping of diagnostic codes to valid procedure or treatment codes', 'diag_proc_mapping', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Treatment Duration Cost', 'Max treatment: duration in days, Cost in local currency', 'duration_cost', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Admission Type', 'Admission Type', 'admission_type', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Invoice Condition', 'Invoice Condition', 'invoice_condition', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Reason for Visit', 'Reason for Visit', 'reason_for_visit', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Source System', 'Source System', 'source_system', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Type of Care', 'Type of invoiced care', 'care_type', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Diagnosis code', 'Diagnosis codes used in CFM', 'diagnosis_code', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Place of Service', 'The location where services were rendered', 'place_code', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'ICD Standard Procedure Map', 'ICD Standard Procedure Map', 'icd_procedure', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Condition Modifier', 'Provides additional information about the rendered procedure or service', 'condition_modifier', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'Billing Code', 'Billing Code', 'billing_code', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_FACT_TYPE', 'National Drug Code', 'National Drug Code', 'ndc_code', null);
-- dimensions of the diagnosis and procedure or treatment codes
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Lower Range value', 'Lower range value for medical code', 'lower_range_value', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Upper Range value', 'Upper range value for medical code', 'upper_range_value', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Diagnosis Procedure combination', 'Diagnosis and procedur / treatment combinations', 'combination', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Valid', 'Valid combination', 'valid', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Invalid', 'Invalid combination', 'invalid', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Questionable', 'Questionable combination', 'questionable', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Geography', 'Geography, region, or area', 'geography', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Treatment Duration', 'Treatment Duration (in days)', 'treatment_duration', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFREFFACT', 'REFERENCE_DIMENSION_TYPE', 'Treatment Cost', 'Maximum cost of treatment', 'treatment_cost', null);
--
-- FACT stereotypes
--
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Plan Name', 'Plan or Program Name','plan_or_program_name', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Amendment Reason', null, 'amendment_reason', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Total Coverage Amount', null, 'total_coverage_amount', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Contents covered Amount', null, 'contents_coverage', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Property coverage Amount', null, 'property_coverage', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Liability coverage Amount', null, 'liability_coverage', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Vehicles covered', 'List of vehicles covered', 'vehicles_covered', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Drivers covered', 'List of drivers covered', 'drivers_covered', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Excluded drivers', null, 'excluded_drivers', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Beneficiaries on policy', null, 'beneficiaries_on_policy', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Premium Amount', null, 'premium', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Deductibles', null, 'deductibles', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Renewal date', null, 'renewal_date', null, 'datetime', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Count of covered vehicles', null, 'count_covered_vehicles', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Count of covered drivers', null, 'count_covered_drivers', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Payment Method', null, 'payment_method', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Payment Acount', null, 'payment_amount', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Payment Frequency', null, 'payment_frequency', null, 'string', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','MEDICARE','MEDICARE','medicare',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','MEDICAID','MEDICAID','medicaid',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','TRICARE','TRICARE','tricare',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','CHAMPVA','CHAMPVA','champva',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','GROUP','GROUP','group_insurance',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','FECA','FECA','feca',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_PURPOSE','OTHER','OTHER','other_insurance',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_ROLE_TYPE', 'Policy Holder', null, 'policy_holder', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_STATUS', 'Active', null, 'active', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_STATUS', 'New', 'Identifies an account that has been newly created, but is not yet active for transactional use', 'new', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_STATUS', 'Pending', null, 'pending', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_STATUS', 'Suspended', 'Identifies an account for which no customer initiated operations may be conducted. For example, if the organization was notified of the death of a customer, the relevant account would be suspended pending settlement of the estate.', 'suspended', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_STATUS', 'Inactive', null, 'inactive', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_STATUS', 'Closed', null, 'closed', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_TYPE', 'Health Insurance', null, 'health_ins', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_TYPE', 'Policy', 'Generic Insurance policy', 'policy', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ACCOUNT_TYPE', 'Workers Comp policy', null, 'workers_comp', null);
-- Reasons for a medical "visit"
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'CHANNEL', 'Office', 'Claim / invoice came from office visit', 'office', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'CHANNEL', 'Hospital', 'Claim / invoice came from hospital visit', 'hospital', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'CHANNEL', 'Health Services', 'Claim / invoice came from visit to government or locally provided service', 'health_services', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'CHANNEL', 'Urgent Care', 'Claim / invoice came from a visit to an urgent (after hours) care facility', 'urgent_care', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Loss Description', null, 'loss_description', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Damaged Status', 'Status of damaged object', 'status_damaged_object', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Witness Count', null, 'witness_count', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Police report', 'Police report number', 'police_report_number', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'EMS Involved', 'EMS involved', 'ems_involved', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Car Towed?', 'Car was towed from scene', 'car_towed', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Insured at fault', null, 'insured_at_fault', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Insured driver id', null, 'insured_driver_id', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Report Filed', 'Police report filed', 'policeReportFiled', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Vehicle count', 'Number vehicles involved', 'numberOfVehiclesInvolved', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Vehicles damaged', 'Number of vehicles involved', 'numberOfVehiclesDamaged', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'People count', 'Number of people involved', 'numberOfPeopleInvolved', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'People injured', 'Number of people injured', 'numberOfPeopleInjured', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Witness count', 'Number of Witnesses', 'numberOfWitnesses', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Independent witness count', null, 'numberOfIndependentWitnesses', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Alarm triggered', 'Alarm system triggered indicator', 'alarmSystemTriggeredIndicator', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Forced entry?', 'Forced entry', 'forcedEntryIndicator', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Traveling or moving', null, 'travelingIndicator', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Theft indicator', null, 'theftIndicator', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Excluded drivers?', null, 'excludedDriverIndicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Unlisted driver?', null, 'unlistedDriverIndicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Married Driver?', null, 'marriedDriverIndicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Rental car?', 'Rental car indicator', 'carRentalIndicator', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Parked', 'Insured vehicle was parked', 'insuredVehicleWasParked', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'New with No Lien', 'New (vehicle) with no lien', 'newVehicleWithNoLien', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Other vehicle new?', null, 'otherVehicleWasNew', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Deceased Pets','Number of Deceased Pets', 'numberOfDeceasedPets', null, 'integer', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Damaged object location', 'Location of damaged object', 'locationOfDamagedObject', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Diagnosis Claim ID', 'Globally unique ID for the claim to which the diagnosis applies', 'claim_diagnosis', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Current illness/injury/pregnancy qualifier', 'Qualifier to indicate which date is provided [CMS-1500:14 QUAL]', 'current_qualifier', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Referring Provider Address Global Identifier', 'Identifies the address of the provider who referred, ordered, or supervised services or supplies on the claim ', 'referring_provider_address_reference', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'ICD Indicator', 'ICD indicator { 9 | 0 } [CMS-1500:21]', 'icd_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Diagnosis Code', 'Diagnosis or Nature Of Injury [CMS-1500:21]', 'diagnosis_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Diagnosis Code', 'Diagnosis or Nature Of Injury [CMS-1500:21]', 'diagnosis_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure Claim ID', 'Globally unique ID for the claim to which the procedure applies', 'claim_procedure', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Place of Service Code', 'Place of service 2-digit code [CMS-1500:24B]', 'place_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Emergency indicator', 'Emergency indicator (Y | N) [CMS-1500:24C]', 'emergency_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure/Supplies/Services Standard', 'Procedure, Supplies, Services - { CPT | HCPCS | ...} [CMS-1500:24D]', 'procedure_standard', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure/Supplies/Services Code', 'Procedure, Supplies, Services - code [CMS-1500:24D]', 'procedure_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure/Supplies/Services Modifier 1', 'Procedure, Supplies, Services - Modifier [CMS-1500:24D]', 'first_condition_modifier', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure/Supplies/Services Modifier 2', 'Procedure, Supplies, Services - Modifier [CMS-1500:24D]', 'second_condition_modifier', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure/Supplies/Services Modifier 3', 'Procedure, Supplies, Services - Modifier [CMS-1500:24D]', 'third_condition_modifier', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure/Supplies/Services Modifier 4', 'Procedure, Supplies, Services - Modifier [CMS-1500:24D]', 'fourth_condition_modifier', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure Changes', 'Procedure Charges [CMS-1500:24F]', 'procedure_charges', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Number of Units', 'Days or units [CMS-1500:24G]', 'unit_count', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Units of Service', 'Unit designator; GR==grams, ML==milliliter, ... (Days is default, if null use default) [CMS-1500:24G]', 'service_unit', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'EPSDT', 'Early and Periodic Screening, Diagnostic, and Treatment (Y | N) [CMS-1500:24H]', 'epsdt_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Family Plan', 'Family Plan (Y | N) [CMS-1500:24H]', 'family_plan_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Frequency of Care', 'Sequence of this bill in this episode of care', 'billing_sequence', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Revenue Episode Code', 'Revenue or episode related billing code', 'billing_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Eligible Charges', 'Eligible Charges', 'eligible_charges', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Service Facility Address Global Identifier', 'Identifies the address of the provider who referred, ordered, or supervised services or supplies on the claim ', 'service_facility_address_reference', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'Procedure Renderer Address Global Identifier', 'Identifies the address of the the facility where services were rendered', 'procedure_renderer_address_reference', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'EVENT_PROPERTY_TYPE', 'National Drug Code', 'National Drug Code', 'ndc_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_RELATIONSHIP_TYPE', 'Diagnosis Procedure', null, 'diagnosis_procedure', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_ROLE_TYPE', 'Referring Provider', 'Referring provider or other source', 'referring_provider', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_ROLE_TYPE', 'Rendering Provider', 'Rendering Provider ID [CMS-1500:24J]', 'procedure_renderer', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_ROLE_TYPE', 'Service Facility', 'Service Facility Location address identifier', 'service_facility', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_STATUS', 'Active', null, 'active', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_STATUS', 'Inactive', null, 'inactive', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Injury', 'Injury resulting in a claim or medical treatment', 'injury', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Party Profiling', 'Profile aggregation based on parties', 'profile_exec_party', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Invoice Profiling', 'Profile aggregation based on transactions', 'profile_exec_invoice', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Procedure Profiling', 'Profile aggregation based on events', 'profile_exec_procedure', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Diagnosis Profiling', 'Profile aggregation based on events', 'profile_exec_diagnosis', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Policy Profiling', 'Profile aggregation based on account', 'profile_exec_policy', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Diagnosis', 'Medical diagnosis', 'diagnosis', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'EVENT_TYPE', 'Procedure','Procedure performed in determining a diagnosis or in treatment (procedure, prescription, drug, supply) of the same.','procedure',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'EVENT_TYPE', 'Medical Provider Scoring', 'Event to score a Medical Provider', 'medical_provider_scoring', NULL );
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'GROUP_PROPERTY_TYPE', 'Group Type', 'The Parent Group Type for Peer Groups', 'group_type', null, 'string', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'National Provider Identifier', 'National Provider Identifier', 'npi', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'Professional License', 'Professional License', 'pro_license', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'DEA Identification', 'DEA Identification', 'dea_id', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'Vendor Identification', 'Vendor Identification', 'vendor_id', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'Social Security Number', 'Social Security Number', 'ssn', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'Medicare Identification', 'Medicare Identification', 'hicn', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'IDENTIFICATION_TYPE', 'Employer Identification', 'Employer Identification', 'employer_id', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'ORGANIZATION_TYPE', 'Insurer', null, 'insurer', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Owner', null, 'owner', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Operator', null, 'operator', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Employed', null, 'employed', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Privileges', null, 'privileges', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Pay to Provider', 'Pay to Provider', 'pay_to_provider', NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Rendering Provider', 'Rendering Provider', 'rendering_provider', NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Referring Provider', 'Referring Provider', 'referring_provider', NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Rendering Physician', 'Rendering Physician', 'rendering_physician', NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Billing Provider', 'Billing Provider', 'billing_provider', NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PARTY_RELATIONSHIP_TYPE', 'Operating Provider', 'Operating Provider', 'operating_provider', NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'PARTY_TYPE', 'Medical Provider', 'Medical doctor or other licensed provider', 'medical_provider', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'PARTY_TYPE', 'Attorney', 'Licensed practicing attorney', 'attorney', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'PARTY_TYPE', 'Patient', 'Insured patient', 'patient', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'PARTY_TYPE', 'Insured', 'Insured', 'insured', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE( 'CFFACT', 'PARTY_TYPE', 'Patient/Insured', 'Insured or patient', 'patient_insured', NULL );
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PHYSICAL_OBJECT_AGREEMENT_TYPE', 'Bill of sale', null, 'bill_of_sale', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PHYSICAL_OBJECT_PROPERTY_TYPE', 'Engine size', 'Engine block size', 'engine', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PHYSICAL_OBJECT_PROPERTY_TYPE', 'Engine Immobilizer', null, 'engine_immobilizer', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PHYSICAL_OBJECT_PROPERTY_TYPE', 'Prior alert', 'Prior alert exists', 'prior_alert', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PHYSICAL_OBJECT_PROPERTY_TYPE', 'Prior Salvage', 'Prior salvage object', 'prior_salvage', null, 'boolean', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PHYSICAL_OBJECT_PROPERTY_TYPE', 'State of Registration', 'State of Registration', 'registered_state', null, 'string', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PHYSICAL_OBJECT_REGISTRATION_TYPE', 'Driver License', null, 'license', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'PHYSICAL_OBJECT_TYPE', 'Vehicle', null, 'vehicle', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_TYPE', 'Claim', 'Claim transactions', 'claim', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_TYPE', 'Invoice', 'Invoice against a claim', 'invoice', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'ACCOUNT_PROPERTY_TYPE', 'Plan or Program Name', 'Plan or Program Name', 'plan_or_program_name', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PARTY_PROPERTY_TYPE', 'Relationship to Insured', 'Relationship to Insured', 'insured_relationship', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PARTY_PROPERTY_TYPE', 'Effective End Date', 'Effective End Date', 'effective_end', null, 'datetime', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'PARTY_PROPERTY_TYPE', 'Effective Start Date', 'Effective Start Date', 'effective_start', null, 'datetime', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'SYSTEM_TYPE', 'Default', 'Core Counterfraud System', 'default', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ACCOUNT_REFERENCE_TYPE', 'Invoice Policy', 'Policy associated with invoice', 'invoice_policy', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT','TRANSACTION_DISPOSITION_TYPE','Reason for visit','The reason for the visit','reason_for_visit',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT','TRANSACTION_DISPOSITION_TYPE','Patient Status','Discharge status of patient','patient_status',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT','TRANSACTION_DISPOSITION_TYPE','Full Payment','Payment at least equal to Total Charge','payment_full',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT','TRANSACTION_DISPOSITION_TYPE','No Payment','No payment','payment_none',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT','TRANSACTION_DISPOSITION_TYPE','Partial Payment','Payment less than Total Charge','payment_partial',NULL);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_EVENT_RELATIONSHIP_TYPE', 'Invoice Diagnosis', 'Invoice-to-diagnosis link', 'invoice_diagnosis', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_EVENT_RELATIONSHIP_TYPE', 'Invoice Procedure', 'Invoice-to-procedure link', 'invoice_procedure', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Invoice Number', 'Invoice primary key from source system', 'invoice_number', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Invoice Claim Reference', 'Globally unique ID for the claim to which an invoice is associated', 'claim_invoice', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Policy Group Number', 'The policy, group, or FECA number of the insured as it appears on the health care identification card of the insured', 'policy_group_number', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Other Invoice Claim Reference', 'Globally unique ID for the other claim to which an invoice is associated', 'other_claim_invoice', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Insurance Plan Name', 'The name of the plan or program for the insured party', 'insurance_plan_name', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Other Insurance Plan Indicator', 'Indicates whether the patient has other insurance coverage', 'other_plan_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Other Policy Group Number', 'The policy or group number for the other policy that may cover the patient', 'other_policy_group_number', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Other Insurance Plan Name', 'The plan or program name for the other policy that may cover the patient', 'other_insurance_plan_name', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Employment Related', 'Indicates whether the condition is related to the job or workplace of the patient', 'employment_related', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Auto Accident Related', 'Indicates whether the condition of the patient is the result of an automobile accident', 'auto_accident_related', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Other Accident Related', 'Indicates whether the condition of the patient is the result of an non-automobile accident', 'other_accident_related', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Outside Lab Indicator', 'Indicates whether services have been rendered by an independent provider', 'outside_lab_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Outside Lab Charges', 'Related costs for services rendered by an independent provider', 'outside_lab_charges', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Resubmission Code', 'The code for a previously submitted claim or encounter', 'resubmission_code', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Original Claim Reference', 'Globally unique ID for the original claim to which an invoice is associated', 'original_claim_invoice', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Prior Authorization Number', 'The payer assigned number authorizing the services', 'prior_authorization_number', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Accept Assignment Indicator', 'Indicates whether the provider agrees to accept assignment under the terms of the program of the payer', 'accept_assignment_indicator', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Biller Address Reference', 'Globally unique ID for the address of the provider that issued the bill for the services rendered', 'biller_address_reference', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Payee Address Reference', 'Globally unique ID for the address of the provider that is to be paid for the services rendered', 'payee_address_reference', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Source System', 'The payer assigned code for the source system of the invoice', 'source_system', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Eligible Charges', 'Eligible Charges', 'eligible_charges', null, 'float', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Type of Care', 'Inpatient, Outpatient, Pharmacy, Dental, Professional', 'care_type', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Cause of loss', 'Cause of loss', 'cause', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Date of loss', 'Date of loss event', 'date_of_loss', null, 'datetime', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Loss description', null, 'loss_description', null, 'string', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'TRANSACTION_PROPERTY_TYPE', 'Medical expenses', null, 'medical_expenses', null, 'string', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Invoice Policy', 'Policy pertaining to invoice', 'invoice_insured', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Other Invoice Policy', 'Other policy pertaining to invoice', 'invoice_other_insured', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Invoice Patient', 'Patient pertaining to invoice', 'invoice_patient', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Billing Provider', 'Globally unique ID for the provider that issued the bill for the services rendered', 'invoice_biller', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Payee Provider', 'Globally unique ID for the provider that is to be paid for the services rendered [CMS-1500:33]', 'invoice_payee', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Driver', 'Driver involved', 'driver', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Adjuster', null, 'adjuster', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_ROLE_TYPE', 'Loss event notification', 'Loss event notified by...', 'notified_by', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_RELATIONSHIP_TYPE', 'Claim Invoice', null, 'claim_invoice', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_RELATIONSHIP_TYPE', 'Other Claim Invoice', null, 'other_claim_invoice', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_RELATIONSHIP_TYPE', 'Original Claim Invoice', null, 'original_claim_invoice', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_STATUS', 'Active', null, 'active', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'TRANSACTION_STATUS', 'Inactive', null, 'inactive', null);
CALL CFFACT.CF_DEFINE_CODE_TYPE('CFFACT', 'WATCHLIST_DISPOSITION', 'Active', 'Active', 'active', null);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'City Name', 'City name','city', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'Country Code', 'International Telecommunications Union country letter code (almost always 3 letters)','country', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'Doing-Business-As Name', 'Doing-business-as name. Operating name of business as opposed to legal name.','dba', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'Incorporated Indicator', 'Indicates whether the business is incorporated [Y | N]','incorporated', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'Phone Number', 'Primary phone number','phone', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'Postal Code', 'Postal code','postal_code', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'State Code', '2-Letter USPS state code ','state', NULL, 'string', NULL);
CALL CFFACT.CF_DEFINE_PROP_TYPE('CFFACT', 'WATCHLIST_ITEM_PROPERTY_TYPE', 'Street Address', 'Street address','street_address', NULL, 'string', NULL);