カスタム リソースに問題があります。私は、外部データベースから臨床情報にアクセスするための安らかなサーバーを実行しています。また、カスタム属性を持つ MyAppointment というカスタム リソースがあります。私の質問は、クライアントが私のWebサービスを使用するとき、クライアントがこれを行うために私のMyAppointment.classと同じクラスをコードに持つ必要があるということです:
// Create a client (only needed once)
FhirContext ctx = new FhirContext();
IGenericClient client = ctx.newRestfulGenericClient("http://localhost:8080/restful-server-example/fhir");
// Invoke the client
Bundle bundle = client.search().forResource(Appointment.class)
.where(new StringClientParam("patient").matches().value("1232"))
.where(new StringClientParam("fechaDesde").matches().value("2"))
.where(new StringClientParam("fechaHasta").matches().value("2"))
.execute();
**MyAppointment** appo= (**MyAppointment**) bundle.getEntry().get(0).getResource();
そうでない場合、クライアントはどのようにしてカスタム リソースを取得できますか?
ありがとう