LOC: Leaf Offset Correction Database Query

Back to Database Queries
         
        SELECT
          "institution"."name",                   -- anonymized name of institution
          "machine"."id",                         -- anonymized name of machine
          "machineType"."model",                  -- type of machine
          "multileafCollimator"."model",          -- HD or Millenium
          "output"."dataDate",                    -- time and date that data was collected
       -- "output"."analysisDate",                -- time and date that data was analyzed
          "leafOffsetCorrection"."section",       -- section
          "leafOffsetCorrection"."leafIndex",     -- leaf number
          "leafOffsetCorrection"."correction_mm"  -- correction in mm
        FROM
          public."leafOffsetCorrection",
          public."institution",
          public."machine",
          public."machineType",
          public."multileafCollimator",
          public."output"
        WHERE
              ("leafOffsetCorrection"."outputPK" = "output"."outputPK")
          AND ("output"."machinePK" = "machine"."machinePK")
          AND ("machine"."institutionPK" = "institution"."institutionPK")
          AND ("machine"."machineTypePK" = "machineType"."machineTypePK")
          AND ("machine"."multileafCollimatorPK" = "multileafCollimator"."multileafCollimatorPK")
        ORDER BY
          "institution"."name",
          "machine"."id",
          "output"."dataDate",
		  "leafOffsetCorrection"."section",
          "leafOffsetCorrection"."leafIndex"
        ASC LIMIT 10;