All files / src constants.js

100% Statements 5/5
100% Branches 0/0
100% Functions 0/0
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 9010x                                                                                                         10x                                 10x                     10x         10x      
exports.ISSUE = {
  SEVERITY: {
    FATAL: 'fatal',
    ERROR: 'error',
    WARNING: 'warning',
    INFO: 'information',
  },
  // Codes defined here: https://www.hl7.org/fhir/valueset-issue-type.html
  CODE: {
    // Invalid can be seen as a parent essentially to these, see Level on above url
    // This means structure, required, value, and invariant, are all also invalid
    // you can send invalid back or something more specific
    INVALID: 'invalid',
    STRUCTURE: 'structure',
    REQUIRED: 'required',
    VALUE: 'value',
    INVARIANT: 'invariant',
    // Security is parent of login, unknown, expired, forbidden, and surpressed
    SECURITY: 'security',
    LOGIN: 'login',
    UNKNOWN: 'unknown',
    EXPIRED: 'expired',
    FORBIDDEN: 'forbidden',
    SUPPRESSED: 'surpressed',
    // Procesing has no parent/children
    PROCESSING: 'processing',
    // Not Supported is parent of duplicate, not found, and too long
    NOT_SUPPORTED: 'not-supported',
    DUPLICATE: 'duplicate',
    NOT_FOUND: 'not-found',
    TOO_LONG: 'too-long',
    // Code invalid is parent of extension, too costly, business rule, conflict, and incomplete
    CODE_INVALID: 'code-invalid',
    EXTENSION: 'extension',
    TOO_COSTLY: 'too-costly',
    BUSINESS_RULE: 'business-rule',
    CONFLICT: 'conflict',
    INCOMPLETE: 'incomplete',
    // Transient is parent of lock error, no store, exception, timeout, and throttled
    TRANSIENT: 'transient',
    LOCK_ERROR: 'lock-error',
    NO_STORE: 'no-store',
    EXCEPTION: 'exception',
    TIMEOUT: 'timeout',
    THROTTLED: 'throttled',
    // Informational has no parent/children
    INFORMATIONAL: 'informational',
  },
};
 
/**
 * Interactions Types.  Also the name of the controller methods
 */
exports.INTERACTIONS = {
  SEARCH: 'search',
  SEARCH_BY_ID: 'searchById',
  SEARCH_BY_VID: 'searchByVersionId',
  HISTORY: 'history',
  HISTORY_BY_ID: 'historyById',
  CREATE: 'create',
  UPDATE: 'update',
  DELETE: 'remove',
  PATCH: 'patch',
  OPERATIONS_POST: 'operationsPost',
  OPERATIONS_GET: 'operationsGet',
};
 
/**
 * These are currently the only versions we support
 */
exports.VERSIONS = {
  '1_0_2': '1_0_2',
  '2_0_0': '2_0_0',
  '3_0_1': '3_0_1',
  '4_0_0': '4_0_0',
  '4_0_1': '4_0_1',
};
 
/**
 * Custom events we support
 */
exports.EVENTS = {
  AUDIT: 'audit-event',
  PROVENANCE: 'provenance',
};
 
exports.RESOURCES = {
  PRACTITIONER: 'practitioner',
};