如何连接 NPHIES FHIR OBB(测试)服务器以便提交资格/预授权/索赔等。
许多公司构建了与 FHIR 服务器配合使用的工具。
那些正在使用 Firely - .NET SDK 的人,请单击此链接查看文档。
为了将请求发送到 NPHIES OBB SERVER,您需要传递用户名、密码和内容类型
username: xxxxx
password: yyyyy
content-type: application/fhir+json
检查以下代码以向 NPHIES - OBB FHIR 服务器发送请求
using (var handler = new HttpClientEventHandler())
{
handler.OnBeforeRequest += (sender, e) =>
{
e.RawRequest.Content.Headers.ContentType.CharSet = "";
e.RawRequest.Content.Headers.Remove("Content-Type"); // "{application/json; charset=utf-8}"
e.RawRequest.Content.Headers.Add("Content-Type", "application/fhir+json");
e.RawRequest.Content.Headers.Add("Username", xxxx);
e.RawRequest.Content.Headers.Add("Password", yyyy);
};
handler.OnAfterResponse += (sender, e) =>
{
};
using (FhirClient fhirClient = new FhirClient(
nphiesServerURL, new FhirClientSettings() { PreferredFormat = ResourceFormat.Json},handler))
{
Bundle responseBundle = fhirClient.Transaction(bundle);
}
}
嗨,我需要有关上述主题的帮助。你能帮我吗