text: ﻿if not exists(select 1 from [dbo].[_SearchParam])
  BEGIN
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Resource', '_id', 'http://hl7.org/fhir/SearchParameter/Resource-id', 'Logical id of this artifact', '3', 'f:Resource/f:id', 'Resource.id', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Resource', '_lastUpdated', 'http://hl7.org/fhir/SearchParameter/Resource-lastUpdated', 'When the resource version last changed', '1', 'f:Resource/f:meta/f:lastUpdated', 'Resource.meta.lastUpdated', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Resource', '_profile', 'http://hl7.org/fhir/SearchParameter/Resource-profile', 'Profiles this resource claims to conform to', '7', 'f:Resource/f:meta/f:profile', 'Resource.meta.profile', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Resource', '_security', 'http://hl7.org/fhir/SearchParameter/Resource-security', 'Security Labels applied to this resource', '3', 'f:Resource/f:meta/f:security', 'Resource.meta.security', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Resource', '_tag', 'http://hl7.org/fhir/SearchParameter/Resource-tag', 'Tags applied to this resource', '3', 'f:Resource/f:meta/f:tag', 'Resource.meta.tag', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'base', 'http://hl7.org/fhir/SearchParameter/SearchParameter-base', 'The resource type(s) this search parameter applies to', '3', 'f:SearchParameter/f:base', 'SearchParameter.base', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'code', 'http://hl7.org/fhir/SearchParameter/SearchParameter-code', 'Code used in URL', '3', 'f:SearchParameter/f:code', 'SearchParameter.code', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'component', 'http://hl7.org/fhir/SearchParameter/SearchParameter-component', 'Defines how the part works', '4', 'f:SearchParameter/f:component/f:definition', 'SearchParameter.component.definition', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'date', 'http://hl7.org/fhir/SearchParameter/SearchParameter-date', 'The search parameter publication date', '1', 'f:SearchParameter/f:date', 'SearchParameter.date', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'derived-from', 'http://hl7.org/fhir/SearchParameter/SearchParameter-derived-from', 'Original Definition for the search parameter', '7', 'f:SearchParameter/f:derivedFrom', 'SearchParameter.derivedFrom', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'description', 'http://hl7.org/fhir/SearchParameter/SearchParameter-description', 'The description of the search parameter', '2', 'f:SearchParameter/f:description', 'SearchParameter.description', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'jurisdiction', 'http://hl7.org/fhir/SearchParameter/SearchParameter-jurisdiction', 'Intended jurisdiction for the search parameter', '3', 'f:SearchParameter/f:jurisdiction', 'SearchParameter.jurisdiction', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'name', 'http://hl7.org/fhir/SearchParameter/SearchParameter-name', 'Computationally friendly name of the search parameter', '2', 'f:SearchParameter/f:name', 'SearchParameter.name', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'publisher', 'http://hl7.org/fhir/SearchParameter/SearchParameter-publisher', 'Name of the publisher of the search parameter', '2', 'f:SearchParameter/f:publisher', 'SearchParameter.publisher', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'status', 'http://hl7.org/fhir/SearchParameter/SearchParameter-status', 'The current status of the search parameter', '3', 'f:SearchParameter/f:status', 'SearchParameter.status', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'target', 'http://hl7.org/fhir/SearchParameter/SearchParameter-target', 'Types of resource (if a resource reference)', '3', 'f:SearchParameter/f:target', 'SearchParameter.target', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'type', 'http://hl7.org/fhir/SearchParameter/SearchParameter-type', 'number | date | string | token | reference | composite | quantity | uri', '3', 'f:SearchParameter/f:type', 'SearchParameter.type', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'url', 'http://hl7.org/fhir/SearchParameter/SearchParameter-url', 'The uri that identifies the search parameter', '7', 'f:SearchParameter/f:url', 'SearchParameter.url', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('SearchParameter', 'version', 'http://hl7.org/fhir/SearchParameter/SearchParameter-version', 'The business version of the search parameter', '3', 'f:SearchParameter/f:version', 'SearchParameter.version', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'authored-on', 'http://hl7.org/fhir/SearchParameter/Task-authored-on', 'Search by creation date', '1', 'f:Task/f:authoredOn', 'Task.authoredOn', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'based-on', 'http://hl7.org/fhir/SearchParameter/Task-based-on', 'Search by requests this task is based on', '4', 'f:Task/f:basedOn', 'Task.basedOn', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'business-status', 'http://hl7.org/fhir/SearchParameter/Task-business-status', 'Search by business status', '3', 'f:Task/f:businessStatus', 'Task.businessStatus', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'code', 'http://hl7.org/fhir/SearchParameter/Task-code', 'Search by task code', '3', 'f:Task/f:code', 'Task.code', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'context', 'http://hl7.org/fhir/SearchParameter/Task-context', 'Search by encounter or episode', '4', 'f:Task/f:context', 'Task.context', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'focus', 'http://hl7.org/fhir/SearchParameter/Task-focus', 'Search by task focus', '4', 'f:Task/f:focus', 'Task.focus', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'group-identifier', 'http://hl7.org/fhir/SearchParameter/Task-group-identifier', 'Search by group identifier', '3', 'f:Task/f:groupIdentifier', 'Task.groupIdentifier', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'identifier', 'http://hl7.org/fhir/SearchParameter/Task-identifier', 'Search for a task instance by its business identifier', '3', 'f:Task/f:identifier', 'Task.identifier', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'intent', 'http://hl7.org/fhir/SearchParameter/Task-intent', 'Search by task intent', '3', 'f:Task/f:intent', 'Task.intent', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'modified', 'http://hl7.org/fhir/SearchParameter/Task-modified', 'Search by last modification date', '1', 'f:Task/f:lastModified', 'Task.lastModified', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'organization', 'http://hl7.org/fhir/SearchParameter/Task-organization', 'Search by responsible organization', '4', 'f:Task/f:requester/f:onBehalfOf', 'Task.requester.onBehalfOf', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'owner', 'http://hl7.org/fhir/SearchParameter/Task-owner', 'Search by task owner', '4', 'f:Task/f:owner', 'Task.owner', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'part-of', 'http://hl7.org/fhir/SearchParameter/Task-part-of', 'Search by task this task is part of', '4', 'f:Task/f:partOf', 'Task.partOf', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'patient', 'http://hl7.org/fhir/SearchParameter/Task-patient', 'Search by patient', '4', 'f:Task/f:for', 'Task.for', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'performer', 'http://hl7.org/fhir/SearchParameter/Task-performer', 'Search by recommended type of performer (e.g., Requester, Performer, Scheduler).', '3', 'f:Task/f:performerType', 'Task.performerType', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'period', 'http://hl7.org/fhir/SearchParameter/Task-period', 'Search by period Task is/was underway', '1', 'f:Task/f:executionPeriod', 'Task.executionPeriod', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'priority', 'http://hl7.org/fhir/SearchParameter/Task-priority', 'Search by task priority', '3', 'f:Task/f:priority', 'Task.priority', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'requester', 'http://hl7.org/fhir/SearchParameter/Task-requester', 'Search by task requester', '4', 'f:Task/f:requester/f:agent', 'Task.requester.agent', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'status', 'http://hl7.org/fhir/SearchParameter/Task-status', 'Search by task status', '3', 'f:Task/f:status', 'Task.status', '1', '1', '2018-09-04 10:52:10 +08:00');
      INSERT INTO [dbo].[_SearchParam] ([Resource], [Name], [Url], [Description], [Type], [XPath], [Expression], [IsIndexed], [Status], [LastUpdated]) VALUES ('Task', 'subject', 'http://hl7.org/fhir/SearchParameter/Task-subject', 'Search by subject', '4', 'f:Task/f:for', 'Task.for', '1', '1', '2018-09-04 10:52:10 +08:00');
  END