I have a set of fhir resources in the following form:
<Basic>
<meta>
<versionId value="1.0"/>
<lastUpdated value="2016-11-18T10:26:51Z"/>
<profile value="http://stelar.org/StructureDefinition/stelar/profile/anthropometry"/>
</meta>
<text>
<status value="generated"/>
</text>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/const-sourceIdentifier">
<cohortName value="TEST"/>
<datasetName value="SEATONJEAug14A1"/>
<archetypeName value="Abdo20wks"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/const-resourceTags">
<valueString value="SEATON"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/anthropometryType">
<valueCoding value="AnthropometricMeasure"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/subjectNo">
<valueString value="5375"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/methodOfFollowUp">
<valueCoding value="FollowUpMethod.ClinicVisit"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/followUp">
<valueCoding value="FollowUp.SNRecruitment"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/variableLabel">
<valueString value="Abdominal girth 20 week fetal scan (mm)"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/AIW">
<valueDouble value="1841.0"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/subject">
<valueCoding value="Person.StudySubject"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/clinicalType">
<valueCoding value="ClinicalMeasurement.AnthropometricMeasure"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/dataSource">
<valueCoding value="DataSource.ClinicalMeasurement"/>
</extension>
<extension url="http://stelar.org/StructureDefinition/stelar/extension/dataAnthropometricMeasure"/>
</Basic>
I have many similarly structured resources where a few constants change on them, such as the value of http://stelar.org/StructureDefinition/stelar/extension/dataSource. How would I go about constructing a query to search for resources which had a dataSource of 'DataSource.ClinicalMeasurement'.
I've read the documentation about searching, however there doesn't seem to be any mention of searching extensions.
As a side note I've had to base all of my data around the Basic resource type and use extensions for reasons that are a bit too unrelated to bring up here.
You can define your own SearchParameter instance that defines how to query using any element or combination of element - extension or core. And you can use your server's Conformance resource to identify the SearchParameters you support and what names should be used for those search parameters.