CVS Pharmacy Inc. can’t dodge an antitrust lawsuit accusing it of requiring hospitals it deals with to use a subsidiary’s software for tracking drug inventory and managing regulatory compliance.

Sentry Data Systems Inc., which makes competing software, can proceed with its claims that CVS violated Section 1 of the Sherman Act by tying its contract pharmacy services to software developed by Wellpartner Inc., a Florida federal judge ruled April 3.

The software products sold by Sentry and Wellpartner, which CVS...