Daily QA: BB by CBCT Database Query

Back to Database Queries

Note that this query is in Sequel Server syntax.

         
        SELECT TOP (10)
          "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
          "bbByCBCT"."offset_mm",               -- section
          "bbByCBCT"."planX_mm",                -- expected X position in RTPLAN
          "bbByCBCT"."planY_mm",                -- expected Y position in RTPLAN
          "bbByCBCT"."planZ_mm",                -- expected Z position in RTPLAN
          "bbByCBCT"."cbctX_mm",                -- measured BB X position in CBCT
          "bbByCBCT"."cbctY_mm",                -- measured BB Y position in CBCT
          "bbByCBCT"."cbctZ_mm",                -- measured BB Z position in CBCT
          "bbByCBCT"."tableXlateral_mm",        -- table position in X dimension / lateral
          "bbByCBCT"."tableYvertical_mm",       -- table position in Y dimension / vertical
          "bbByCBCT"."tableZlongitudinal_mm"    -- table position in Z dimension / longitudinal
        FROM
          "bbByCBCT",
          "institution",
          "machine",
          "machineType",
          "multileafCollimator",
          "output"
        WHERE
              ("bbByCBCT"."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";