Created
April 9, 2017 20:48
-
-
Save jacobmischka/8d5d0a2dcf0b6567dfbe6a4a04f47bd6 to your computer and use it in GitHub Desktop.
schema types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From https://www.aqihq.org/qcdrDataSample/AQISchema.xsd | |
export const REQUIRED_FIELDS = [ | |
// RecordHeader | |
'PracticeID', | |
'CreatedBy', | |
'CreateDate', | |
// AnesthesiaRecord SETS | |
// 'Demographic', | |
// 'Procedure', | |
// 'AnesthesiaCase', | |
// 'PreOp', | |
// 'IntraOp', | |
// 'PostOp', | |
// Demographic | |
'PatientSex', | |
// Procedure | |
'FacilityID', | |
'ProcStatus', | |
// ProcedureLocation | |
'LocationType', | |
// CPTSet CONDITIONAL | |
// 'CPT', | |
// CPT CONDITIONAL | |
// 'CPTValue', | |
// AnesthesiaCase | |
'AnesthesiaRecordID', | |
// 'AnesthesiaStaffSet', | |
// 'AnesthesiaMethodSet', | |
// AnesthesiaStaffSet | |
// 'AnesthesiaStaff', | |
// AnesthesiaStaff | |
'NPI', | |
// MonitoringSet | |
// 'Monitor', | |
// AnesthesiaMethodSet | |
// 'AnesthesiaMethod', | |
// AnesthesiaMethod | |
'AnesthesiaCategory', | |
'AnesthesiaStartTime', | |
'AnesthesiaEndTime', | |
// AirwayManagementSet | |
'AirwayManagement', | |
// AirwayManagement | |
'AirwayManagementMethod', | |
// CPTAnessSet | |
'CPTAnes', | |
// CPTAnes | |
'CPTAnesValue', | |
// PreOp | |
'Age', | |
'ASAClass', | |
// ICD CONDITIONAL | |
// 'ICDValue', | |
// 'ICDVersion', | |
// PreRisk CONDITIONAL | |
// 'PreOPRiskName', | |
// PreLabData CONDITIONAL | |
// 'LabName', | |
// 'LabUnit', | |
// 'LabValue', | |
// 'LabDateTime', | |
// PostOp | |
'PaymentMethod', | |
// PaymentMethod | |
'PaymentCode' | |
// TODO: More that are conditionally required | |
]; | |
export const RACE_CODE_TYPE = [ | |
'American Indian or Alaska Native', | |
'Asian or Pacific Islander', | |
'Bi or Multi Racial', | |
'Black, not of Hispanic Origin', | |
'Hispanic, Black', | |
'Hispanic, Color Unknown', | |
'Hispanic, White', | |
'Middle Eastern', | |
'White, not of Hispanic Origin', | |
'OTHER', | |
'Unknown' | |
]; | |
export const PATIENT_SEX_CODE_TYPE = [ | |
'Male', | |
'Female', | |
'Missing', | |
'Unknown' | |
]; | |
export const ADMISSION_STATUS_CODE_TYPE = [ | |
'Ambulatory', | |
'Inpatient', | |
'Observation', | |
'Unknown' | |
]; | |
export const PROC_STATUS_CODE_TYPE = [ | |
'Elective', | |
'Emergency', | |
'Urgent', | |
'Unknown' | |
]; | |
export const TRANSFER_STATUS_CODE_TYPE = [ | |
'Ambulatory Surgical Center', | |
'Clinic Physician Office', | |
'Died', | |
'Extended Care Facility', | |
'Floor bed', | |
'Health Care Facility', | |
'Home without services', | |
'Home with services', | |
'Hospice', | |
'Hospital', | |
'Intensive Care Unit', | |
'Left against medical advice', | |
'Observation unit', | |
'Operating Room', | |
'Physician Referral', | |
'Same Facility', | |
'Telemetry/step-down unit', | |
'Transferred to another hospital', | |
'Other', | |
'Unknown' | |
]; | |
export const CPT_VALUE_TYPE = /[a-zA-Z0-9][0-9][0-9][0-9][a-zA-Z0-9]/; | |
export const CPT_MODIFIER_TYPE = /[a-zA-Z0-9]{2}/; | |
export const COVERAGE_CODE_TYPE = [ | |
'MD-ALONE', | |
'MD-DIRECTING', | |
'MD PRESENT BUT NOT DIRECTING', | |
'CRNA-ALONE', | |
'CRNA-DIRECTED', | |
'CRNA-SUPERVISING', | |
'CRNA-SUPERVISED', | |
'MD-SUPERVISING', | |
'MD-MD', | |
'PA-ALONE', | |
'PA-DIRECTED', | |
'CAA-DIRECTED' | |
]; | |
export const NPI_TYPE = /[0-9]{10}/; | |
export const STAFF_RESPONSIBILITY_CODE_TYPE = [ | |
'Supervisory', | |
'Monitoring', | |
'Administrative', | |
'In charge', | |
'Performing the case', | |
'Medically responsible' | |
]; | |
// Alt names: ProviderCredentialsCodeType, PROVIDER_CREDENTIALS_CODE_TYPE | |
export const STAFF_ROLE_CODE_TYPE = [ | |
'Advanced Practice Nurse', | |
'Anesthesiologist', | |
'Certified Anesthesiologist Assistant', | |
'Certified Registered Nurse Anesthetist', | |
'Dentist or Oral Surgeon', | |
'Fellow (Anesthesiology)', | |
'Surgeon', | |
'Physician Assistant', | |
'Podiatrist', | |
'Registered Nurse', | |
'Resident (Anesthesia)', | |
'Student Registered Nurse Anesthetist' | |
]; | |
export const MEDICAL_SPECIALTY_CODE_TYPE = [ | |
'Cardiac Surgery', | |
'Cardiology-EP', | |
'Cardiology-General', | |
'Cardiology-Interventional', | |
'Dental/oral', | |
'Dermatology', | |
'Endocrinology', | |
'Gastroenterology', | |
'General Medicine', | |
'General Surgery', | |
'Gynecology', | |
'Gyne-Onc', | |
'Infectious Disease', | |
'Neonatology', | |
'Nephrology', | |
'Neurology', | |
'Neurosurgery', | |
'Normal Newborn', | |
'Obstetrics', | |
'Oncology', | |
'Opthalmology', | |
'Orthopedics-Foot', | |
'Orthopedics-Hand/Wrist', | |
'Orthopedics-Major Joint', | |
'Orthopedics-Other', | |
'Orthopedics-Sports Med', | |
'Orthopedics-Trauma', | |
'Otolaryngology', | |
'Psychiatry', | |
'Rehabilitation', | |
'Respiratory', | |
'Rheumatology', | |
'Spine', | |
'Substance Abuse', | |
'Surgical Oncology', | |
'Thoracic Surgery', | |
'Transplant', | |
'Trauma', | |
'Ungroupable', | |
'Urology', | |
'Vascular' | |
]; | |
export const ANESTHESIA_CATEGORY_CODE_TYPE = [ | |
'General Anesthesia', | |
'Monitored Anesthesia Care', | |
'Neuraxial', | |
'Peripheral Nerve Block', | |
'Unknown', | |
'No Anesthesia Provided' | |
]; | |
export const ANESTHESIA_SUBCATEGORY_CODE_TYPE = [ | |
'Combined Spinal and Epidural', | |
'Epidural', | |
'Spinal', | |
'Inhalational General Anesthesia', | |
'Total Intravenous Anesthesia' | |
]; | |
export const ASA_CLASS_CODE_TYPE = [ | |
'I', | |
'IE', | |
'II', | |
'IIE', | |
'III', | |
'IIIE', | |
'IV', | |
'IVE', | |
'V', | |
'VE', | |
'VI', | |
'VIE', | |
'Unknown' | |
]; | |
export const PRE_ANESTH_STATUS_CODE_TYPE = [ | |
'Awake', | |
'Calm', | |
'Asleep', | |
'Confused', | |
'Unresponsive', | |
'Apprehensive', | |
'Uncooperative', | |
'Other', | |
'Unknown' | |
]; | |
export const ICD_VALUE_TYPE = [ | |
{pattern: /^(V\d{2}(\.\d{1,2})?|\d{3}(\.\d{1,2})?|E\d{3}(\.\d)?)$/, version: 9, subversion: 'CM'}, | |
{pattern: /^[A-TV-Z][0-9][A-Z0-9](\.[A-Z0-9]{1,4})?$/, version: 10, subversion: 'CM'}, | |
{pattern: /^\d{3,4}$/, version: 9, subversion: 'SG'}, | |
{pattern: /^[a-zA-Z0-9]{7}$/, version: 10, subversion: 'SG'} | |
]; | |
export const ICD_VERSION_TYPE = [ | |
9, | |
10 | |
]; | |
export const LAB_DATA_CATEGORY_CODE_TYPE = [ | |
'Blood bank', | |
'Chemistry', | |
'Cytology', | |
'Genetics', | |
'Hematology', | |
'Histology', | |
'Immunology', | |
'Microbiology', | |
'Other', | |
'Unknown' | |
]; | |
export const MONITORING_SOURCE_CODE_TYPE = [ | |
'Electronic', | |
'User entered', | |
'Other', | |
'Unknown' | |
]; | |
export const POST_OP_DISCHARGE_CODE_TYPE = [ | |
'Home or self care (routine discharge)', | |
'Short term general hospital or inpatient care', | |
'Skilled nursing facility (SNF)', | |
'Intermediate care facility (ICF)', | |
'Another type of institution', | |
'Home under care of organized home health service organization', | |
'Left against medical advice or discontinued care', | |
'Home under care of Home IV provider', | |
'Admitted as an inpatient to this hospital', | |
'Expired (i.e. dead)', | |
'Still patient or expected to return for outpatient services (i.e. still a patient)', | |
'Expired (i.e. died) at home', | |
'Expired (i.e. died) in a medical facility; e.g., hospital, SNF, ICF, or free standing hospice', | |
'Expired (i.e. died) - place unknown', | |
'Other', | |
'Unknown' | |
]; | |
export const PAYMENT_METHOD_CODE_TYPE = [ | |
'Charity', | |
'Commercial', | |
'Government: Medicaid', | |
'Government: Medicare Fee for Service - Part A', | |
'Government: Medicare Fee for Service - Part B', // The most important one | |
'Government: Medicare Fee for Service - Part C', | |
'Government: Military/Veterans', | |
'Government: Other', | |
'Other', | |
'Self-Pay', | |
'Unknown', | |
'Worker\'s Compensation' | |
]; | |
export const IC_CATEGORY_CODE_TYPE = [ | |
'MEDICAL DEVICE/EQUIPMENT', | |
'MEDICATION', | |
'INFRASTRUCTURE/SYSTEM', | |
'ASSESSMENT/DOCUMENTATION', | |
'RESPIRATORY/AIRWAY', | |
'CARDIOVASCULAR', | |
'PROCEDURE RELATED', | |
'OTHER', | |
'UNKNOWN' | |
]; | |
export const OUTCOME_NAMES = [ | |
'Acidemia', | |
'Acute Kidney Injury (AKI)', | |
'Adverse Drug Reaction', | |
'Airway obstruction', | |
'Airway Trauma', | |
'Amniotic Fluid Embolism', | |
'Anaphylaxis', | |
'Arrhythmia', | |
'Aspiration', | |
'Awareness', | |
'Bradycardia', | |
'Burn injury', | |
'Cannot ventilate', | |
'Cardiac arrest', | |
'Case Cancelled After Anesthesia Induction Time', | |
'Case Cancelled Before Anesthesia Induction Time', | |
'Case Cancelled Before Anesthesia Start Time', | |
'Case Delay', | |
'Central Line Placement Injury', | |
'Central Line-Associated Bloodstream Infection (CLABSI)', | |
'Cerebrovascular Accident', | |
'Coagulopathy', | |
'Coma', | |
'Corneal Injury', | |
'Death', | |
'Deep Vein Thrombosis', | |
'Delayed Emergence', | |
'Delirium', | |
'Difficult Intubation', | |
'Difficult Mask Ventilation', | |
'Electrolyte Abnormality', | |
'Emergence Delirium', | |
'Equipment/Device Failure or Malfunction', | |
'Failed Intubation', | |
'Fall', | |
'Fat Embolism', | |
'Hemodynamic Instability', | |
'High Spinal or Epidural', | |
'Hypercapnia', | |
'Hyperglycemia', | |
'Hypertensive Episode', | |
'Hyperthermia', | |
'Hypoglycemia', | |
'Hypotensive Episode', | |
'Hypoxemia', | |
'Inadequate pain control', | |
'Inadequate Reversal of Neuromuscular Block', | |
'Infection following Epidural or Spinal Anesthesia', | |
'Infection following Peripheral Nerve Block', | |
'Itching', | |
'IV Infiltration', | |
'Kidney Failure', | |
'Local Anesthetic Systemic Toxicity', | |
'Malignant Hyperthermia', | |
'Medication Error', | |
'Multiple Organ Failure', | |
'Myocardia Ischemia', | |
'Myocardial Infarction', | |
'OR Fire', | |
'Perioperative Visual Loss', | |
'Peripheral Neurologic Deficit after Regional Anesthesia', | |
'Pneumonia', | |
'Pneumothorax', | |
'Positioning Injury', | |
'Post-Discharge Nausea and Vomiting', | |
'Postdural Puncture Headache', | |
'Postoperative Cognitive Dysfunction', | |
'Post-Operative Nausea and Vomiting', | |
'Prolonged Neuromuscular Block', | |
'Pulmonary Edema', | |
'Pulmonary Embolus', | |
'Respiratory Arrest', | |
'Respiratory Failure', | |
'Seizure', | |
'Sepsis', | |
'Shivering', | |
'Skin or Mucous Membrane Injury', | |
'Spinal Cord Injury', | |
'Spinal Hematoma Following Spinal or Epidural Anesthesia', | |
'Surgical Site Infection (SSI)', | |
'Transfusion Reaction', | |
'Ulcer', | |
'Unanticipated Transfusion', | |
'Unplanned Conversion to General Anesthesia', | |
'Unplanned Dural Puncture', | |
'Unplanned Endobronchial Intubation', | |
'Unplanned Esophageal Intubation', | |
'Unplanned Hospital Admission', | |
'Unplanned Hypothermia', | |
'Unplanned ICU Admission', | |
'Unplanned Postoperative Ventilation', | |
'Unplanned Reintubation', | |
'Unplanned Reoperation', | |
'Unplanned Tracheal Extubation', | |
'Vascular injury', | |
'Venous Air Embolism', | |
'Ventilation for more than 24 hours Post Procedure', | |
'Wrong Patient', | |
'Wrong Procedure', | |
'Wrong Site Regional Anesthesia', | |
'Wrong Site Surgery' | |
]; | |
export const OUTCOME_ID_MAP = new Map(OUTCOME_NAMES.map((name, index) => | |
[name.toUpperCase(), index + 1] | |
)); | |
export const OUTCOME_TIME_FRAME_CODE_TYPE = [ | |
'PreOp', | |
'IntraOp', | |
'PACU', | |
'24 Hour', | |
'48 Hour', | |
'7 Days', | |
'30 Days', | |
'60 Days', | |
'90 Days', | |
'1 Year' | |
]; | |
export const OUTCOME_SEVERITY_CODE_TYPE = [ | |
'No Harm', | |
'Mild Harm', | |
'Moderate Harm', | |
'Severe Harm', | |
'Death' | |
]; | |
export const INTAKE_OUTPUT_DIRECTION_CODE_TYPE = [ | |
'Input', | |
'Output', | |
'Other', | |
'Unknown' | |
]; | |
export const INTUBATION_APPROACH_CODE_TYPE = [ | |
'Endoctracheal', | |
'Nasogastric', | |
'Nasotracheal', | |
'Fiberoptic', | |
'Tracheostomy', | |
'Speaking tracheostomy', | |
'Other', | |
'Unknown' | |
]; | |
export const ANESTHESIA_DETAILS_CATEGORY_CODE_TYPE = [ | |
'attempts', | |
'position', | |
'needle type', | |
'needle length', | |
'Other', | |
'Unknown' | |
]; | |
export const ZIP_CODE_TYPE = /[0-9]{5}(-[0-9]{4})?/; | |
export const TAX_ID_TYPE = /[0-9]{9}/; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment