1. A computer-implemented method of providing a query service in an affinity domain, comprising: receiving a query including one or more template identifiers that indicate conformance with a standard related to content of a document; generating, using a processor, an expression including the one or more template identifiers to define a search of a registry of a healthcare data sharing system; performing, using a processor, the search of the registry according to the expression, wherein the search is configured to identify documents including the one or more template identifiers; and conveying the identified documents to an entity associated with the query.