Sha256: 073d36b44102d5dee1a2bfd49f145979f954d9bf85f62ffbab6247b11ef3ed92

Contents?: true

Size: 1.31 KB

Versions: 26

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

# See HL7 spec http://pacs.hk/Doc/HL7/Hl7V231.pdf

xml = builder

xml.LabOrder do
  # xml.ReceivingLocation do
  #   xml.Code ""
  #   xml.Description # request.pathology_lab.name
  # end
  xml.PlacerId request.placer_id
  # xml.FillerId "??ORC:3 Labs Order Id"
  # xml.OrderedBy do
  #   xml.Code "unknown"
  #   xml.Description request.requestor_name
  # end
  # xml.OrderItem do
  #   xml.comment! "Code TODO: LOIN code for request E.g. MB from 'OBR|1|^PCS|09B0099478^LA|FBC^FULL BLOOD COUNT^MB|..'"
  #   xml.Code
  # end
  xml.OrderCategory do
    xml.Code request.description.code
  end
  xml.SpecimenCollectedTime request.requested_at&.iso8601
  # xml.SpecimenReceivedTime "TODO"
  xml.SpecimenSource request.description.bottle_type
  # xml.Duration "OBR:27.3 but no available in the example messages I have"

  xml.ResultItems do
    render partial: "renalware/api/ukrdc/patients/lab_orders/result_item",
           collection: request.observations,
           as: :observation,
           locals: { builder: builder, patient: patient }
  end

  # xml.PatientClass do
  #   xml.CodingStandard "HL7_0004"
  #   xml.Code "e.g. I for Inpatient"
  #   xml.Description "e.g. Inpatient"
  # end
  xml.EnteredOn request.requested_at.iso8601
  # xml.EnteredAt do
  #   xml.code "location code here"
  # end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
renalware-core-2.0.101 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.100 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.99 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.98 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.97 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.96 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.95 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.94 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.93 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.92 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.91 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.90 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.89 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.88 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.87 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.86 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.85 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.84 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.83 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
renalware-core-2.0.82 app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder