简体   繁体   English

如何使用扩展在 FHIR 中添加其他字段?

[英]How to add additional fields in FHIR using Extensions?

I have a payload for Claim .我有Claim的有效载荷。
I want to add an additional field LOB ( Line of business ) using extension , and POST it to FHIR Server, and then search the resource using that field like:我想使用extension添加一个附加字段LOB业务线),并将其发布到 FHIR 服务器,然后使用该字段搜索资源,例如:
GET: http://fhir_server/Claim?lob=value
In the payload I have added the extension block:在有效负载中,我添加了扩展块:

{
    "resourceType": "Claim",
    "status": "active",
    "extension" : [{
        "url" : "<i entered some random url>",
        "valueString" : "MAPD"
    }],
    "identifier": [{
                    "value": "TEST"
                }],
    "type": {
        "coding": [{
            "system": "http://terminology.hl7.org/CodeSystem/claim-type",
            "code": "institutional"
        }]
    },
    "use": "claim",
    "patient": {
        "reference": "f8d8477c-1ef4-4878-abed-51e514bfd91f",
        "display": "John_Smith"
    },
    "billablePeriod": {
        "start": "1957-04-12T21:08:35+05:30",
        "end": "1957-04-12T21:23:35+05:30"
    },
    "created": "1957-04-12T21:23:35+05:30",
    "provider": {
        "reference": "urn:uuid:Organization",
        "display": "PCP79032"
    },
    "priority": {
        "coding": [{
            "system": "http://terminology.hl7.org/CodeSystem/processpriority",
            "code": "normal"
        }]
    },
    "facility": {
        "reference": "Location",
        "display": "PCP79032"
    },
    "diagnosis": [{
        "sequence": 1,
        "diagnosisReference": {
            "reference": "0316a0c4-0e46-e3fa-a7bf-9e4f3b9c9e92"
        }
    }, {
        "sequence": 2,
        "diagnosisReference": {
            "reference": "932432b0-ac67-0f7a-1382-26c48050c62f"
        }
    }],
    "insurance": [{
        "sequence": 1,
        "focal": true,
        "coverage": {
            "display": "Blue Cross Blue Shield"
        }
    }],
    "item": [{
        "sequence": 1,
        "productOrService": {
            "coding": [{
                "system": "http://snomed.info/sct",
                "code": "162673000",
                "display": "General examination of patient (procedure)"
            }],
            "text": "General examination of patient (procedure)"
        },
        "encounter": [{
            "reference": "67062d00-2531-3ebd-8558-1de2fd3e5aab"
        }]
    }, {
        "sequence": 2,
        "diagnosisSequence": [1],
        "productOrService": {
            "coding": [{
                "system": "http://snomed.info/sct",
                "code": "713458007",
                "display": "Lack of access to transportation (finding)"
            }],
            "text": "Lack of access to transportation (finding)"
        }
    }, {
        "sequence": 3,
        "diagnosisSequence": [2],
        "productOrService": {
            "coding": [{
                "system": "http://snomed.info/sct",
                "code": "73595000",
                "display": "Stress (finding)"
            }],
            "text": "Stress (finding)"
        }
    }],
    "total": {
        "value": 786.3299999999999,
        "currency": "USD"
    }
}

and created a SearchParameter using POST:并使用 POST 创建了一个SearchParameter

{
    "resourceType" : "SearchParameter",
    "id": "21761828-b929-416a-8813-d3646cf288f4",
    "name": "lob",
    "status": "active",
    "url" : "https://fhir_server/StructureDefinition/f971fc4998167948838f8a8831ea914c",
    "description": "Returns a Claim with extension.valueString matching the specified one in request.",
    "code" : "lob",
    "base" : [ "Claim" ],
    "type" : "string",
    "expression": "Claim.extension.where(url ='https://fhir_server/StructureDefinition/f971fc4998167948838f8a8831ea914c').value.string"
}

but while fetching the result (GET: https://fhirserver/Claim?lob=MAPD) , I am getting the full dataset instead of the filtered result.但是在获取结果(GET: https://fhirserver/Claim?lob=MAPD)​​ 时,我得到的是完整的数据集而不是过滤后的结果。
I also did a $reindex on the /Claim/<resource_id>/$reindex , but its not listing the field lob .我还在/Claim/<resource_id>/$reindex $reindex上做了一个$reindex ,但它没有列出字段lob
Am I missing something ?我错过了什么吗?

Servers need to be configured to support new search parameters - you can't search by arbitrary elements, only by specific SearchParameters the server supports.服务器需要配置为支持新的搜索参数 - 您不能通过任意元素进行搜索,只能通过服务器支持的特定 SearchParameters 进行搜索。 That's true for both searching on extensions as well as core elements.这对于搜索扩展和核心元素都是正确的。 You'll have to work with the owner of the server to support your desired search capability.您必须与服务器所有者合作以支持所需的搜索功能。 Did you try posting on http://chat.fhir.org to find out if there was a non-extension mechanism to represent "line of business" on a Claim?您是否尝试在http://chat.fhir.org上发帖以了解是否存在代表索赔的“业务线”的非扩展机制?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM