{
  "version": "0310",
  "label": "Trama FUA SIS 3.1",
  "resumen": {
    "filename": "RESUMEN.TXT",
    "slug": "resumen",
    "label": "Resumen del paquete",
    "mandatory": true,
    "fields": [
      { "name": "anio", "label": "Año", "ref": "1", "size": 4, "mandatory": "S", "type": "int" },
      { "name": "mes", "label": "Mes", "ref": "2", "size": 2, "mandatory": "S", "type": "int" },
      { "name": "envio", "label": "Número de envío", "ref": "3", "size": 5, "mandatory": "S", "type": "int" },
      { "name": "archivo", "label": "Nombre del archivo", "ref": "4", "size": 0, "mandatory": "S", "type": "text" },
      { "name": "version_trama", "label": "Versión de la trama", "ref": "5", "size": 4, "mandatory": "S", "type": "text" },
      { "name": "total_atencion", "label": "Total de atenciones", "ref": "6", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_smi", "label": "Total de registros SMI", "ref": "7", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_diagnosticos", "label": "Total de diagnósticos", "ref": "8", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_medicamentos", "label": "Total de medicamentos", "ref": "9", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_insumos", "label": "Total de insumos", "ref": "10", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_procedimientos", "label": "Total de procedimientos", "ref": "11", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_servicios", "label": "Total de servicios adicionales", "ref": "12", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_recien_nacidos", "label": "Total de recién nacidos", "ref": "13", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_gastos_transporte", "label": "Total de gastos de transporte", "ref": "14", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_gastos_viaticos", "label": "Total de viáticos", "ref": "15", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "total_gastos_otros", "label": "Total de otros gastos", "ref": "16", "size": 0, "mandatory": "S", "type": "int" },
      { "name": "aplicativo", "label": "Nombre del aplicativo", "ref": "17", "size": 0, "mandatory": "S", "type": "text" },
      { "name": "aplicativo_version", "label": "Versión del aplicativo", "ref": "18", "size": 0, "mandatory": "S", "type": "text" },
      { "name": "envio_version", "label": "Versión de envío", "ref": "19", "size": 0, "mandatory": "S", "type": "text" },
      { "name": "responsable_doc_tipo", "label": "Tipo de documento del responsable", "ref": "20", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "DNI", "3": "CE" } },
      { "name": "responsable_doc_numero", "label": "Número de documento del responsable", "ref": "21", "size": 9, "mandatory": "S", "type": "text" }
    ]
  },
  "tramas": {
    "ATENCION.TXT": {
      "filename": "ATENCION.TXT",
      "slug": "atencion",
      "label": "Atenciones",
      "mandatory": true,
      "fields": [
        { "name": "id", "label": "Identificador de la atención", "ref": "ate#1", "size": 10, "mandatory": "S", "type": "int", "key": true },
        { "name": "ipress_codigo", "label": "Código RENAES de la IPRESS", "ref": "ate#2", "size": 8, "mandatory": "S", "type": "text", "key": true, "catalog": "RENAES" },
        { "name": "fua_lote", "label": "Lote del FUA", "ref": "ate#3", "size": 2, "mandatory": "S", "type": "text", "key": true },
        { "name": "fua_numero", "label": "Número de FUA", "ref": "ate#4", "size": 4, "mandatory": "S", "type": "text", "key": true },
        { "name": "ipress_categoria", "label": "Categoría de la IPRESS", "ref": "ate#5", "size": 2, "mandatory": "S", "type": "text", "catalog": "CategoriaEESS" },
        { "name": "ipress_nivel", "label": "Nivel de la IPRESS", "ref": "ate#6", "size": 10, "mandatory": "S", "type": "text" },
        { "name": "punto_digitacion", "label": "Punto de digitación", "ref": "ate#7", "size": 1, "mandatory": "S", "type": "int" },
        { "name": "componente", "label": "Componente del asegurado", "ref": "ate#8", "size": 3, "mandatory": "N", "type": "int", "catalog": "Componentes" },
        { "name": "contrato_disa", "label": "DISA del contrato", "ref": "ate#9", "size": 2, "mandatory": "C", "type": "text", "catalog": "Disa" },
        { "name": "contrato_lote", "label": "Lote del contrato", "ref": "ate#10", "size": 2, "mandatory": "S", "type": "text" },
        { "name": "contrato_numero", "label": "Número del contrato", "ref": "ate#11", "size": 9, "mandatory": "S", "type": "text" },
        { "name": "contrato_secuencia", "label": "Correlativo del integrante", "ref": "ate#12", "size": 2, "mandatory": "C", "type": "int" },
        { "name": "contrato_tabla", "label": "Tipo de tabla del contrato", "ref": "ate#13", "size": 1, "mandatory": "S", "type": "text" },
        { "name": "contrato_id", "label": "Identificador del contrato", "ref": "ate#14", "size": 10, "mandatory": "S", "type": "int" },
        { "name": "plan_cobertura", "label": "Plan de cobertura", "ref": "ate#15", "size": 2, "mandatory": "N", "type": "int" },
        { "name": "grupo_poblacional", "label": "Grupo poblacional", "ref": "ate#16", "size": 2, "mandatory": "N", "type": "text", "catalog": "GrupoFocalizadoSisFoh" },
        { "name": "doc_tipo", "label": "Tipo de documento", "ref": "ate#17", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "DNI", "2": "Sin DNI", "3": "CE", "4": "CUI", "7": "CNV", "8": "Cédula" }, "catalog": "TipoDocIdentidad" },
        { "name": "doc_numero", "label": "Número de documento", "ref": "ate#18", "size": 10, "mandatory": "C", "type": "text" },
        { "name": "apellido_paterno", "label": "Apellido paterno", "ref": "ate#19", "size": 70, "mandatory": "C", "type": "text" },
        { "name": "apellido_materno", "label": "Apellido materno", "ref": "ate#20", "size": 70, "mandatory": "C", "type": "text" },
        { "name": "nombres", "label": "Nombres", "ref": "ate#21", "size": 70, "mandatory": "S", "type": "text" },
        { "name": "fecha_nacimiento", "label": "Fecha de nacimiento", "ref": "ate#22", "size": 10, "mandatory": "S", "type": "date" },
        { "name": "sexo", "label": "Sexo", "ref": "ate#23", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "0": "Femenino", "1": "Masculino" } },
        { "name": "ubigeo", "label": "Ubigeo del asegurado", "ref": "ate#24", "size": 6, "mandatory": "S", "type": "text" },
        { "name": "historia_clinica", "label": "Historia clínica", "ref": "ate#25", "size": 20, "mandatory": "S", "type": "text" },
        { "name": "tipo", "label": "Tipo de atención", "ref": "ate#26", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "0": "Sin Tipo", "1": "Ambulatorio", "2": "Referencia", "3": "Emergencia" } },
        { "name": "condicion_materna", "label": "Condición materna", "ref": "ate#27", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "0": "No Gestante", "1": "Gestante", "2": "Puérpera" } },
        { "name": "modalidad_atencion", "label": "Modalidad de atención", "ref": "ate#28", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "Directa", "2": "Alto Costo", "3": "Caso Especial", "4": "Sepelio", "5": "Traslado Emergencia", "6": "Carta Garantía" } },
        { "name": "autoriza_numero", "label": "Número de autorización", "ref": "ate#29", "size": 15, "mandatory": "C", "type": "text" },
        { "name": "autoriza_monto", "label": "Monto autorizado (soles)", "ref": "ate#30", "size": 13, "mandatory": "C", "type": "decimal", "decimals": 4 },
        { "name": "fecha_atencion", "label": "Fecha y hora de la atención", "ref": "ate#31", "size": 16, "mandatory": "S", "type": "datetime" },
        { "name": "personal_origen", "label": "Origen del personal que atiende", "ref": "ate#32", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "Establecimiento", "2": "Itinerante", "3": "Más Salud", "4": "Oferta Flexible", "5": "Telesalud" } },
        { "name": "referencia_renaes", "label": "RENAES de referencia de origen", "ref": "ate#33", "size": 10, "mandatory": "C", "type": "text" },
        { "name": "referencia_numero", "label": "Número de hoja de referencia", "ref": "ate#34", "size": 20, "mandatory": "C", "type": "text" },
        { "name": "prestacion", "label": "Prestación principal", "ref": "ate#35", "size": 3, "mandatory": "S", "type": "text", "catalog": "Servicios" },
        { "name": "lugar_atencion", "label": "Lugar de atención", "ref": "ate#36", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "Intramural", "2": "Extramural" } },
        { "name": "destino_asegurado", "label": "Destino del asegurado", "ref": "ate#37", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "0": "Sin destino", "1": "Alta", "2": "Citado", "3": "Ref. Emergencia", "4": "Ref. Consulta Externa", "5": "Ref. Apoyo Dx", "6": "Contrareferido", "7": "Fallecido", "8": "Hospitalizado", "9": "Corte Admin", "A": "Contraref. Curado", "B": "Contraref. Mejorado", "C": "Contraref. Fallecido" } },
        { "name": "hospitalizacion_ingreso", "label": "Fecha de ingreso a hospitalización", "ref": "ate#38", "size": 10, "mandatory": "C", "type": "date" },
        { "name": "hospitalizacion_alta", "label": "Fecha de alta de hospitalización", "ref": "ate#39", "size": 10, "mandatory": "C", "type": "date" },
        { "name": "refcon_renaes", "label": "RENAES de IPRESS de ref./contraref.", "ref": "ate#40", "size": 10, "mandatory": "C", "type": "text" },
        { "name": "refcon_numero", "label": "Número de hoja de ref./contraref.", "ref": "ate#41", "size": 20, "mandatory": "C", "type": "text" },
        { "name": "fecha_parto", "label": "Fecha de parto (o probable)", "ref": "ate#42", "size": 10, "mandatory": "C", "type": "date" },
        { "name": "grupo_riesgo_hvb", "label": "Grupo de riesgo vacuna HVB", "ref": "ate#43", "size": 2, "mandatory": "N", "type": "int", "catalog": "GrupoRiesgo" },
        { "name": "fecha_fallecimiento", "label": "Fecha de fallecimiento", "ref": "ate#44", "size": 10, "mandatory": "N", "type": "date" },
        { "name": "oferta_flexible_renaes", "label": "RENAES de IPRESS oferta flexible", "ref": "ate#45", "size": 10, "mandatory": "C", "type": "text" },
        { "name": "etnia", "label": "Etnia", "ref": "ate#46", "size": 10, "mandatory": "N", "type": "text", "catalog": "Etnia" },
        { "name": "iafas_codigo", "label": "Código de IAFAS", "ref": "ate#47", "size": 1, "mandatory": "N", "type": "text", "catalog": "InstitucionSeguros" },
        { "name": "iafas_seguro", "label": "Seguro de la IAFAS", "ref": "ate#48", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "ups_codigo", "label": "Código UPS", "ref": "ate#49", "size": 6, "mandatory": "N", "type": "text", "catalog": "Ups" },
        { "name": "fecha_corte_admin", "label": "Fecha de corte administrativo", "ref": "ate#50", "size": 10, "mandatory": "C", "type": "date" },
        { "name": "autoriza_vinc_udr", "label": "UDR de autorización vinculada", "ref": "ate#51", "size": 3, "mandatory": "N", "type": "text", "catalog": "Udr" },
        { "name": "autoriza_vinc_lote", "label": "Lote de autorización vinculada", "ref": "ate#52", "size": 2, "mandatory": "N", "type": "text" },
        { "name": "autoriza_vinc_secuencia", "label": "Secuencia de autorización vinculada", "ref": "ate#53", "size": 6, "mandatory": "N", "type": "text" },
        { "name": "fua_vinc_codigo", "label": "DISA o RENAES del FUA vinculado", "ref": "ate#54", "size": 8, "mandatory": "N", "type": "text" },
        { "name": "fua_vinc_lote", "label": "Lote del FUA vinculado", "ref": "ate#55", "size": 2, "mandatory": "N", "type": "text" },
        { "name": "fua_vinc_numero", "label": "Número del FUA vinculado", "ref": "ate#56", "size": 8, "mandatory": "N", "type": "text" },
        { "name": "responsable_doc_tipo", "label": "Tipo de documento del responsable", "ref": "ate#57", "size": 2, "mandatory": "S", "type": "enum", "enumValues": { "1": "DNI", "3": "CE", "11": "PTP" } },
        { "name": "responsable_doc_numero", "label": "Número de documento del responsable", "ref": "ate#58", "size": 9, "mandatory": "S", "type": "text" },
        { "name": "responsable_personal_tipo", "label": "Tipo de personal de salud", "ref": "ate#59", "size": 2, "mandatory": "S", "type": "int", "catalog": "TipoPersonalSalud" },
        { "name": "responsable_especialidad", "label": "Especialidad del responsable", "ref": "ate#60", "size": 3, "mandatory": "N", "type": "int", "catalog": "Especialidad" },
        { "name": "responsable_es_egresado", "label": "¿Egresado?", "ref": "ate#61", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "0": "Egresado", "1": "No egresado" } },
        { "name": "responsable_colegiatura", "label": "Colegiatura", "ref": "ate#62", "size": 6, "mandatory": "N", "type": "int" },
        { "name": "responsable_rne", "label": "RNE", "ref": "ate#63", "size": 6, "mandatory": "N", "type": "int" },
        { "name": "digitador_doc_tipo", "label": "Tipo de documento del digitador", "ref": "ate#64", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "DNI", "3": "CE" } },
        { "name": "digitador_doc_numero", "label": "Número de documento del digitador", "ref": "ate#65", "size": 9, "mandatory": "S", "type": "text" },
        { "name": "fecha_registro", "label": "Fecha y hora de registro", "ref": "ate#66", "size": 16, "mandatory": "S", "type": "datetime" },
        { "name": "observacion", "label": "Observación", "ref": "ate#67", "size": 250, "mandatory": "N", "type": "text" },
        { "name": "aplicativo_version", "label": "Versión del aplicativo", "ref": "ate#68", "size": 9, "mandatory": "N", "type": "text" },
        { "name": "siteds_autoriza", "label": "Autorización SITEDS", "ref": "ate#69", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "fua_admin_inicio", "label": "Fecha-hora inicio FUA administrativo", "ref": "ate#70", "size": 16, "mandatory": "N", "type": "datetime" },
        { "name": "fua_admin_fin", "label": "Fecha-hora fin FUA administrativo", "ref": "ate#71", "size": 16, "mandatory": "N", "type": "datetime" },
        { "name": "casa_materna_motivo", "label": "Motivo de ingreso a casa materna", "ref": "ate#72", "size": 1, "mandatory": "N", "type": "text", "catalog": "MotivoIngresoCasaMaterna" },
        { "name": "casa_materna_codigo", "label": "Código de casa materna", "ref": "ate#73", "size": 10, "mandatory": "N", "type": "text", "catalog": "CasaMaterna" }
      ]
    },
    "ATENCIONDIA.TXT": {
      "filename": "ATENCIONDIA.TXT",
      "slug": "diagnosticos",
      "label": "Diagnósticos",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "dia#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "codigo", "label": "Código CIE-10", "ref": "dia#2", "size": 10, "mandatory": "S", "type": "text", "key": true, "catalog": "Diagnósticos" },
        { "name": "correlativo", "label": "Correlativo del diagnóstico", "ref": "dia#3", "size": 2, "mandatory": "S", "type": "int", "key": true },
        { "name": "movimiento", "label": "Tipo según movimiento", "ref": "dia#4", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "I": "Ingreso", "E": "Egreso" }, "key": true },
        { "name": "clasificacion", "label": "Clasificación del diagnóstico", "ref": "dia#5", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "Definitivo", "2": "Presuntivo", "4": "Repetido" } }
      ]
    },
    "ATENCIONMED.TXT": {
      "filename": "ATENCIONMED.TXT",
      "slug": "medicamentos",
      "label": "Medicamentos",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "med#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "codigo", "label": "Código del medicamento", "ref": "med#2", "size": 13, "mandatory": "S", "type": "text", "key": true, "catalog": "Medicamentos" },
        { "name": "diagnostico_correlativo", "label": "Correlativo del diagnóstico", "ref": "med#3", "size": 2, "mandatory": "S", "type": "int", "fk": { "file": "ATENCIONDIA.TXT", "field": "correlativo" } },
        { "name": "cantidad_prescrita", "label": "Cantidad prescrita", "ref": "med#4", "size": 10, "mandatory": "S", "type": "int" },
        { "name": "cantidad_entregada", "label": "Cantidad entregada", "ref": "med#5", "size": 10, "mandatory": "N", "type": "int" },
        { "name": "fecha_petitorio", "label": "Fecha de petitorio", "ref": "med#6", "size": 10, "mandatory": "N", "type": "date" },
        { "name": "numero_petitorio", "label": "Número de documento de petitorio", "ref": "med#7", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "lote", "label": "Lote del medicamento", "ref": "med#8", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "serie", "label": "Número de serie", "ref": "med#9", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "registro_sanitario", "label": "Registro sanitario", "ref": "med#10", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "fecha_vencimiento", "label": "Fecha de vencimiento", "ref": "med#11", "size": 10, "mandatory": "N", "type": "date" },
        { "name": "datos_adicionales", "label": "Datos adicionales (D.A. 360-MINSA)", "ref": "med#12", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "S": "Sí contiene", "N": "No contiene" } }
      ]
    },
    "ATENCIONINS.TXT": {
      "filename": "ATENCIONINS.TXT",
      "slug": "insumos",
      "label": "Insumos",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "ins#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "codigo", "label": "Código del insumo", "ref": "ins#2", "size": 5, "mandatory": "S", "type": "text", "key": true, "catalog": "Insumos" },
        { "name": "diagnostico_correlativo", "label": "Correlativo del diagnóstico", "ref": "ins#3", "size": 2, "mandatory": "S", "type": "int", "fk": { "file": "ATENCIONDIA.TXT", "field": "correlativo" } },
        { "name": "cantidad_prescrita", "label": "Cantidad prescrita", "ref": "ins#4", "size": 10, "mandatory": "S", "type": "int" },
        { "name": "cantidad_entregada", "label": "Cantidad entregada", "ref": "ins#5", "size": 10, "mandatory": "N", "type": "int" },
        { "name": "lote", "label": "Lote del insumo", "ref": "ins#6", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "serie", "label": "Número de serie", "ref": "ins#7", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "registro_sanitario", "label": "Registro sanitario", "ref": "ins#8", "size": 20, "mandatory": "N", "type": "text" },
        { "name": "fecha_vencimiento", "label": "Fecha de vencimiento", "ref": "ins#9", "size": 10, "mandatory": "N", "type": "date" },
        { "name": "datos_adicionales", "label": "Datos adicionales (D.A. 360-MINSA)", "ref": "ins#10", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "S": "Sí contiene", "N": "No contiene" } }
      ]
    },
    "ATENCIONPRO.TXT": {
      "filename": "ATENCIONPRO.TXT",
      "slug": "procedimientos",
      "label": "Procedimientos",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "pro#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "codigo", "label": "Código CPMS", "ref": "pro#2", "size": 15, "mandatory": "S", "type": "text", "key": true, "catalog": "CPMS" },
        { "name": "diagnostico_correlativo", "label": "Correlativo del diagnóstico", "ref": "pro#3", "size": 2, "mandatory": "S", "type": "int", "fk": { "file": "ATENCIONDIA.TXT", "field": "correlativo" } },
        { "name": "cantidad_prescrita", "label": "Cantidad prescrita", "ref": "pro#4", "size": 10, "mandatory": "S", "type": "int" },
        { "name": "cantidad_entregada", "label": "Cantidad entregada", "ref": "pro#5", "size": 10, "mandatory": "S", "type": "int" },
        { "name": "resultado", "label": "Resultado del procedimiento", "ref": "pro#6", "size": 50, "mandatory": "N", "type": "text" }
      ]
    },
    "ATENCIONSER.TXT": {
      "filename": "ATENCIONSER.TXT",
      "slug": "servicios",
      "label": "Servicios adicionales",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "ser#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "codigo", "label": "Código del servicio", "ref": "ser#2", "size": 3, "mandatory": "S", "type": "text", "key": true, "catalog": "Servicios" }
      ]
    },
    "ATENCIONSMI.TXT": {
      "filename": "ATENCIONSMI.TXT",
      "slug": "smi",
      "label": "Actividades preventivas (SMI)",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "smi#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "codigo", "label": "Código de actividad preventiva", "ref": "smi#2", "size": 3, "mandatory": "S", "type": "text", "key": true, "catalog": "ActividadesPreventivas" },
        { "name": "resultado", "label": "Resultado", "ref": "smi#3", "size": 19, "mandatory": "S", "type": "text" }
      ]
    },
    "ATENCIONRN.TXT": {
      "filename": "ATENCIONRN.TXT",
      "slug": "recien_nacidos",
      "label": "Recién nacidos",
      "mandatory": true,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "rn#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "correlativo", "label": "Correlativo del RN", "ref": "rn#2", "size": 2, "mandatory": "S", "type": "int", "key": true },
        { "name": "doc_tipo", "label": "Tipo de documento", "ref": "rn#3", "size": 1, "mandatory": "S", "type": "enum", "enumValues": { "1": "DNI", "7": "CNV", "0": "Contrato SIS" } },
        { "name": "doc_numero", "label": "Número de documento", "ref": "rn#4", "size": 10, "mandatory": "N", "type": "text" },
        { "name": "contrato_disa", "label": "DISA del contrato", "ref": "rn#5", "size": 3, "mandatory": "N", "type": "text" },
        { "name": "contrato_formato", "label": "Formato del contrato", "ref": "rn#6", "size": 2, "mandatory": "N", "type": "text" },
        { "name": "contrato_numero", "label": "Número del contrato", "ref": "rn#7", "size": 9, "mandatory": "N", "type": "text" },
        { "name": "contrato_secuencia", "label": "Secuencia del contrato", "ref": "rn#8", "size": 2, "mandatory": "N", "type": "int" },
        { "name": "apellido_paterno", "label": "Apellido paterno", "ref": "rn#9", "size": 40, "mandatory": "C", "type": "text" },
        { "name": "apellido_materno", "label": "Apellido materno", "ref": "rn#10", "size": 40, "mandatory": "C", "type": "text" },
        { "name": "primer_nombre", "label": "Primer nombre", "ref": "rn#11", "size": 35, "mandatory": "C", "type": "text" },
        { "name": "segundo_nombre", "label": "Segundo nombre", "ref": "rn#12", "size": 35, "mandatory": "N", "type": "text" },
        { "name": "registro_afiliacion_id", "label": "Id de registro de afiliación", "ref": "rn#13", "size": 10, "mandatory": "N", "type": "int" },
        { "name": "tabla_id", "label": "Identificador de tabla", "ref": "rn#14", "size": 1, "mandatory": "N", "type": "text" }
      ]
    },
    "ATENCIONTRA.TXT": {
      "filename": "ATENCIONTRA.TXT",
      "slug": "gastos_transporte",
      "label": "Gastos de transporte",
      "mandatory": false,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "rgt#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "correlativo", "label": "Correlativo del gasto", "ref": "rgt#2", "size": 3, "mandatory": "S", "type": "int", "key": true },
        { "name": "codigo", "label": "Código de gasto", "ref": "rgt#3", "size": 4, "mandatory": "S", "type": "text", "catalog": "GastoTransporte" },
        { "name": "pasajeros", "label": "Número de pasajeros", "ref": "rgt#4", "size": 2, "mandatory": "N", "type": "int" },
        { "name": "cantidad", "label": "Cantidad", "ref": "rgt#5", "size": 2, "mandatory": "S", "type": "int" },
        { "name": "precio_unitario", "label": "Precio unitario (soles)", "ref": "rgt#6", "size": 18, "mandatory": "S", "type": "decimal", "decimals": 2 },
        { "name": "costo_total", "label": "Costo total (soles)", "ref": "rgt#7", "size": 18, "mandatory": "S", "type": "decimal", "decimals": 2 }
      ]
    },
    "ATENCIONVIA.TXT": {
      "filename": "ATENCIONVIA.TXT",
      "slug": "gastos_viaticos",
      "label": "Viáticos",
      "mandatory": false,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "rgv#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "correlativo", "label": "Correlativo del gasto", "ref": "rgv#2", "size": 3, "mandatory": "S", "type": "int", "key": true },
        { "name": "codigo", "label": "Código de gasto", "ref": "rgv#3", "size": 4, "mandatory": "S", "type": "text", "catalog": "GastoViatico" },
        { "name": "dias_uso", "label": "Días de uso", "ref": "rgv#4", "size": 2, "mandatory": "N", "type": "int" },
        { "name": "comisionados", "label": "Número de comisionados", "ref": "rgv#5", "size": 2, "mandatory": "N", "type": "int" },
        { "name": "costo_total", "label": "Costo total (soles)", "ref": "rgv#6", "size": 18, "mandatory": "S", "type": "decimal", "decimals": 2 }
      ]
    },
    "ATENCIONOTRG.TXT": {
      "filename": "ATENCIONOTRG.TXT",
      "slug": "gastos_otros",
      "label": "Otros gastos",
      "mandatory": false,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "rgo#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "correlativo", "label": "Correlativo del gasto", "ref": "rgo#2", "size": 3, "mandatory": "S", "type": "int", "key": true },
        { "name": "codigo", "label": "Código de gasto", "ref": "rgo#3", "size": 4, "mandatory": "S", "type": "text", "catalog": "OtrosGastos" },
        { "name": "cantidad", "label": "Cantidad", "ref": "rgo#4", "size": 3, "mandatory": "S", "type": "int" },
        { "name": "dias_alimentacion", "label": "Días de alimentación", "ref": "rgo#5", "size": 3, "mandatory": "N", "type": "int" },
        { "name": "precio_unitario", "label": "Precio unitario (soles)", "ref": "rgo#6", "size": 18, "mandatory": "S", "type": "decimal", "decimals": 2 },
        { "name": "costo_total", "label": "Costo total (soles)", "ref": "rgo#7", "size": 18, "mandatory": "S", "type": "decimal", "decimals": 2 }
      ]
    },
    "ATENCIONNOAFI.TXT": {
      "filename": "ATENCIONNOAFI.TXT",
      "slug": "no_afiliados",
      "label": "Pacientes no afiliados SIS",
      "mandatory": false,
      "parent": { "file": "ATENCION.TXT", "localField": "atencion_id", "parentField": "id" },
      "fields": [
        { "name": "atencion_id", "label": "Id atención", "ref": "ans#1", "size": 10, "mandatory": "S", "type": "int", "key": true, "fk": { "file": "ATENCION.TXT", "field": "id" } },
        { "name": "formato_disa", "label": "DISA del formato", "ref": "ans#2", "size": 3, "mandatory": "N", "type": "text", "catalog": "Disa" },
        { "name": "formato_lote", "label": "Lote del formato", "ref": "ans#3", "size": 1, "mandatory": "N", "type": "text" },
        { "name": "formato_numero", "label": "Número del formato", "ref": "ans#4", "size": 9, "mandatory": "N", "type": "text" },
        { "name": "fecha_afiliacion", "label": "Fecha de afiliación", "ref": "ans#5", "size": 10, "mandatory": "N", "type": "date" },
        { "name": "doc_tipo", "label": "Tipo de documento", "ref": "ans#6", "size": 1, "mandatory": "N", "type": "enum", "enumValues": { "1": "DNI", "3": "CE" } },
        { "name": "doc_numero", "label": "Número de documento", "ref": "ans#7", "size": 9, "mandatory": "N", "type": "text" },
        { "name": "fecha_nacimiento", "label": "Fecha de nacimiento", "ref": "ans#8", "size": 10, "mandatory": "N", "type": "date" },
        { "name": "sexo", "label": "Sexo", "ref": "ans#9", "size": 1, "mandatory": "N", "type": "enum", "enumValues": { "0": "Femenino", "1": "Masculino" } },
        { "name": "telefono", "label": "Teléfono", "ref": "ans#10", "size": 30, "mandatory": "N", "type": "text" },
        { "name": "apellido_paterno", "label": "Apellido paterno", "ref": "ans#11", "size": 40, "mandatory": "C", "type": "text" },
        { "name": "apellido_materno", "label": "Apellido materno", "ref": "ans#12", "size": 40, "mandatory": "C", "type": "text" },
        { "name": "primer_nombre", "label": "Primer nombre", "ref": "ans#13", "size": 35, "mandatory": "N", "type": "text" },
        { "name": "segundo_nombre", "label": "Segundo nombre", "ref": "ans#14", "size": 35, "mandatory": "N", "type": "text" },
        { "name": "ubigeo", "label": "Ubigeo", "ref": "ans#15", "size": 6, "mandatory": "N", "type": "text" },
        { "name": "direccion", "label": "Dirección", "ref": "ans#16", "size": 100, "mandatory": "N", "type": "text" },
        { "name": "ipress_sis_codigo", "label": "Código SIS de la IPRESS", "ref": "ans#17", "size": 10, "mandatory": "N", "type": "text" },
        { "name": "apoderado_doc_tipo", "label": "Tipo de documento del apoderado", "ref": "ans#18", "size": 1, "mandatory": "N", "type": "enum", "enumValues": { "1": "DNI", "3": "CE" } },
        { "name": "apoderado_doc_numero", "label": "Número de documento del apoderado", "ref": "ans#19", "size": 9, "mandatory": "N", "type": "text" },
        { "name": "apoderado_nombre", "label": "Nombre del apoderado", "ref": "ans#20", "size": 100, "mandatory": "N", "type": "text" },
        { "name": "apoderado_relacion", "label": "Relación del apoderado", "ref": "ans#21", "size": 10, "mandatory": "N", "type": "int" },
        { "name": "digitador_doc_numero", "label": "DNI del digitador", "ref": "ans#22", "size": 8, "mandatory": "N", "type": "text" },
        { "name": "digitador_nombre", "label": "Nombre del digitador", "ref": "ans#23", "size": 100, "mandatory": "N", "type": "text" },
        { "name": "punto_digitacion", "label": "Punto de digitación", "ref": "ans#24", "size": 10, "mandatory": "N", "type": "int" },
        { "name": "udr", "label": "UDR", "ref": "ans#25", "size": 3, "mandatory": "N", "type": "text", "catalog": "Udr" },
        { "name": "periodo", "label": "Periodo (año)", "ref": "ans#26", "size": 4, "mandatory": "N", "type": "text" },
        { "name": "mes", "label": "Mes", "ref": "ans#27", "size": 2, "mandatory": "N", "type": "text" }
      ]
    }
  }
}
