def seed_pathology_observations_for(patient:)
      log "Adding Pathology Observations (OBX) for #{patient}" do
        file_path = file_path_for(patient: patient, file_name: "pathology_obx.csv")
        observations = []

        CSV.foreach(file_path, headers: true) do |row|
          request = Pathology::ObservationRequest.find(row["request_id"])
          observations << Pathology::Observation.new(
            request: request,
            description: Pathology::ObservationDescription.find_by!(code: row["description"]),
            result: row["result"],
            observed_at: request.requested_at + 24.hours,
            comment: row["comment"]
          )
        end
        Pathology::Observation.import! observations
      end
    end
def seed_pathology_observations_for(patient:)
      log "Adding Pathology Observations (OBX) for #{patient}" do
        file_path = file_path_for(patient: patient, file_name: "pathology_obx.csv")
        observations = []

        CSV.foreach(file_path, headers: true) do |row|
          request = Pathology::ObservationRequest.find(row["request_id"])
          observations << Pathology::Observation.new(
            request: request,
            description: Pathology::ObservationDescription.find_by!(code: row["description"]),
            result: row["result"],
            observed_at: request.requested_at + 24.hours,
            comment: row["comment"]
          )
        end
        Pathology::Observation.import! observations
      end
    end
rubocop:disable Metrics/MethodLength, Metrics/AbcSize