The invention provides a safety syringe for extracting blood, with retractable or removable needle that can be retracted into the syringe body or removed after use and safety locks that lock the retractable needle in an extended position during use and in a retracted position after use to ensure that the syringe is not reused or that the needle is not inadvertently extended. A stationary frame has at least one rotating shaft with a shaft axis extending along the conveying path of the stationary frame, and a movable carriage configured to transport a load along the conveying path. A query window index structure is constructed that describes a geometry of the query window.