hapifhir / hapi-fhir

πŸ”₯ HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2k stars 1.31k forks source link

Device.property.valueQuanity error (spelling) #1124

Open brianreinhold opened 5 years ago

brianreinhold commented 5 years ago

Describe the bug Very simple. In the current FHIR build they have fixed the spelling error in Device.property.valueQuanity to Device.property.valueQuantity

To Reproduce Look at the current build in git hub under R4 model. Examine the Device class. Look at the property data type. Quantity is still spelled wrong.

Expected behavior valueQuantity instead of valueQuanity

Note: The IG guide validator uses the correct spelling and my uploader generates the wrong one requiring I hand edit the results every time.

restevez-chs commented 5 years ago

@brianreinhold i'd like to be able to help. i'm familiar with FHIR and now hoping to be able to contribute back by looking at the issue list.

i definitely see those spelling errors. they are spread across several files.

I would like to see the IG validate error that you see. Can you provide some steps that I can follow to duplicate the error.

brianreinhold commented 5 years ago

Ricardo,

Here is a Device resource generated that had a property element that was a quantity

{ "resourceType": "Device", "id": "phd-001C050400007825.001C05007825", "meta": { "profile": [ "http://hl7.org/fhir/uv/phd/StructureDefinition/PhdDevice" ] }, "identifier": [ { "type": { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaDeviceIdentifiers", "code": "SYSID" } ] }, "system": "urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680", "value": "00-1C-05-04-00-00-78-25" }, { "type": { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaDeviceIdentifiers", "code": "BTMAC" } ] }, "system": "http://hl7.org/fhir/sid/eui-48", "value": "00-1C-05-00-78-25" } ], "manufacturer": "Nonin Medical, Inc.", "serialNumber": "0400007825", "modelNumber": "Model 3150", "type": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "65573" } ], "text": "MDC_MOC_VMS_MDS_SIMP" }, "specialization": [ { "systemType": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "528388" } ], "text": "MDC_DEV_SPEC_PROFILE_PULS_OXIM: Pulse Oximeter" }, "version":"1" } ], "version": [ { "type": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "531976" } ], "text": "MDC_ID_PROD_SPEC_FW: Firmware revision" }, "value": "0.9C" }, { "type": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "532352" } ], "text": "MDC_REG_CERT_DATA_CONTINUA_VERSION: Continua version" }, "value": "1.0" } ], "property": [ { "type": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "532353" } ], "text": "MDC_REG_CERT_DATA_CONTINUA_CERT_DEV_LIST: certified device list as transport-specialization combo" }, "valueCode": [ { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaPHD", "code": "4" } ] } ] }, { "type": { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ASN1ToHL7", "code": "532354.0" } ], "text": "regulation-status" }, "valueCode": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0136", "code": "N" } ], "text": "Device is Regulated" } ] }, { "type": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "68220" } ], "text": "MDC_TIME_SYNC_PROTOCOL: Time synchronization protocol" }, "valueCode": [ { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "532224" } ], "text": "MDC_TIME_SYNC_NONE:" } ] }, { "type": { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ASN1ToHL7", "code": "68219.0" } ], "text": "mds-time-capab-real-time-clock" }, "valueCode": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0136", "code": "Y" } ], "text": "This field is set" } ] }, { "type": { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ASN1ToHL7", "code": "68219.1" } ], "text": "mds-time-capab-set-clock" }, "valueCode": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0136", "code": "Y" } ], "text": "This field is set" } ] }, { "type": { "coding": [ { "system": "http://hl7.org/fhir/uv/phd/CodeSystem/ASN1ToHL7", "code": "68219.2" } ], "text": "mds-time-capab-relative-time" }, "valueCode": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0136", "code": "Y" } ], "text": "This field is set" } ] }, { "type": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "68222" } ], "text": "MDC_TIME_RES_ABS: Time resolution" }, "valueQuanity": [ { "value": 1000000, "system": "http://unitsofmeasure.org", "code": "us" } ] } ] }

That is what is generated by HAPI. The IG validator will generate an error as that is an unknown element. If you want to actually see that in action, you will need to build the PHD IG guide and edit the example "nonin-hdp-1542718631721.json" so it is back to a valueQuanity instead of valueQuantity.

That's a real pain-in-the-butt to do, so as long as the fix generates a Property.valueQuantity one should be good to go.

Brian


From: Ricardo Estevez notifications@github.com Sent: Wednesday, December 5, 2018 3:57 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

@brianreinholdhttps://github.com/brianreinhold i'd like to be able to help. i'm familiar with FHIR and now hoping to be able to contribute back by looking at the issue list.

i definitely see those spelling errors. they are spread across several files.

I would like to see the IG validate error that you see. Can you provide some steps that I can follow to duplicate the error.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-444644758, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Alg3e9lRVwOs3pEwnTjJ2YWjivHOo5TXks5u2DNAgaJpZM4YxnWZ.

restevez-chs commented 5 years ago

Thanks for sharing more details.

@brianreinhold i have a couple questions for you below

Looks like I will need to learn more on the IG validator to dive in further. I'm looking at this link: http://wiki.hl7.org/index.php?title=Using_the_FHIR_Validator.

Question 1 Is this what you're running?

I did however submit a pretty simple PR to update the naming on several files in the repo. Locally, I get a clean build, but I'm not sure if there is more to do. I am a new contributor so still learning the contributing process.

PR: https://github.com/jamesagnew/hapi-fhir/pull/1134 PR branch: https://github.com/restevez-chs/hapi-fhir/tree/issue-1124-valueQuanity-to-valueQuantity

Question 2 If you were to clone my PR branch:

  1. git clone https://github.com/restevez-chs/hapi-fhir.git
  2. git checkout issue-1124-valueQuanity-to-valueQuantity

Could you do anything to verify the fix?

brianreinhold commented 5 years ago

Ricardo,

I am not using the validator directly; it's built in to the IG publisher when one has examples and runs when you build the guide. I just look at the output (or the build should it fail). I am sure they are the same one, but I have not looked into the tool as a stand-alone. But if you are generating Device.property elements correctly, I am sure you have succeeded!

Brian


From: Ricardo Estevez notifications@github.com Sent: Wednesday, December 5, 2018 6:15 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Thanks for sharing more details.

@brianreinholdhttps://github.com/brianreinhold i have a couple questions for you below

Looks like I will need to learn more on the IG validator to dive in further. I'm looking at this link: http://wiki.hl7.org/index.php?title=Using_the_FHIR_Validator.

Question #1https://github.com/jamesagnew/hapi-fhir/issues/1 Is this what you're running?

I did however submit a pretty simple PR to update the naming on several files in the repo. Locally, I get a clean build, but I'm not sure if there is more to do. I am a new contributor so still learning the contributing process.

PR: #1134https://github.com/jamesagnew/hapi-fhir/pull/1134 PR branch: https://github.com/restevez-chs/hapi-fhir/tree/issue-1124-valueQuanity-to-valueQuantity

Question #2https://github.com/jamesagnew/hapi-fhir/issues/2 If you were to clone my PR branch:

  1. git clone https://github.com/restevez-chs/hapi-fhir.git
  2. git checkout issue-1124-valueQuanity-to-valueQuantity

Could you do anything to verify the fix?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-444688143, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Alg3e7eu9x0eTSvnt4BVdXsd6TGRbANLks5u2FOtgaJpZM4YxnWZ.

brianreinhold commented 5 years ago

James,

I messed up on your 3.8.0 snapshot server http://fhirtest.uhn.ca. I am doing conditional creates and I escaped the identifier wrong and upload the same Patient and Device four times. Now I can't upload without changing the Patient (which I can do) and the Device (which I can't do; the device is what it is). Is there a way I can delete these resources?

HAPI FHIR - University Health Networkhttp://fhirtest.uhn.ca/ fhirtest.uhn.ca You are accessing the public FHIR server UHN/HAPI Server (STU3 FHIR).This server is hosted elsewhere on the internet but is being accessed using the HAPI client implementation.

I would like to test subscriptions which I think I have working but I can't upload unless I change devices. I don't like four copies of these resources on the server either.

Thanks,

Brian

brianreinhold commented 5 years ago

Hi Brian,

You should be able to to a standard FHIR delete for the resources you don't want- Just do

DELETE http://hapi.fhir.org/BaseDstu3/Device/XXX

Cheers, James

On Sat, Apr 27, 2019 at 12:31 PM Brian Reinhold BrianReinhold@lnihealth.com wrote:

James,

I messed up on your 3.8.0 snapshot server http://fhirtest.uhn.ca. I am doing conditional creates and I escaped the identifier wrong and upload the same Patient and Device four times. Now I can't upload without changing the Patient (which I can do) and the Device (which I can't do; the device is what it is). Is there a way I can delete these resources? HAPI FHIR - University Health Network http://fhirtest.uhn.ca/ fhirtest.uhn.ca You are accessing the public FHIR server UHN/HAPI Server (STU3 FHIR).This server is hosted elsewhere on the internet but is being accessed using the HAPI client implementation.

I would like to test subscriptions which I think I have working but I can't upload unless I change devices. I don't like four copies of these resources on the server either.

Thanks,

Brian

brianreinhold commented 5 years ago

James,

I didn't see the option of the server GUI so I thought the delete might be blocked.

Brian


From: James Agnew jamesagnew@gmail.com Sent: Saturday, April 27, 2019 6:47 PM To: Brian Reinhold Cc: jamesagnew/hapi-fhir Subject: Re: I messed up on your server

Hi Brian,

You should be able to to a standard FHIR delete for the resources you don't want- Just do

DELETE http://hapi.fhir.org/BaseDstu3/Device/XXX

Cheers, James

On Sat, Apr 27, 2019 at 12:31 PM Brian Reinhold BrianReinhold@lnihealth.com<mailto:BrianReinhold@lnihealth.com> wrote:

James,

I messed up on your 3.8.0 snapshot server http://fhirtest.uhn.ca. I am doing conditional creates and I escaped the identifier wrong and upload the same Patient and Device four times. Now I can't upload without changing the Patient (which I can do) and the Device (which I can't do; the device is what it is). Is there a way I can delete these resources?

HAPI FHIR - University Health Networkhttp://fhirtest.uhn.ca/ fhirtest.uhn.cahttp://fhirtest.uhn.ca You are accessing the public FHIR server UHN/HAPI Server (STU3 FHIR).This server is hosted elsewhere on the internet but is being accessed using the HAPI client implementation.

I would like to test subscriptions which I think I have working but I can't upload unless I change devices. I don't like four copies of these resources on the server either.

Thanks,

Brian

brianreinhold commented 5 years ago

James,

I have created a server socket on my machine with endpoint http://24.62.171.28:8080 . That is my public IP and I have configured the router to map 8080 to my local machine. When I use a browser on my machine and type in http://24.62.171.28:8080http://24.62.171.28:8080/ my app gets signaled (it say a subscription event was received as that is what it is expecting.

In the subscription the endpoint is http://24.62.171.28:8080http://24.62.171.28:8080/ and I see in the Subscription resource. However, when I send an upload , I get no notification.

I see the Observation with the desired subject on the server and the Subscription

{ "resourceType": "Subscription", "id": "16268", "meta": { "versionId": "1", "lastUpdated": "2019-04-28T21:22:38.001+00:00" }, "status": "requested", "end": "2019-04-28T17:32:37.715-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?subject=Patient/15299", "channel": { "type": "rest-hook", "endpoint": "http://24.62.171.28:8080"http://24.62.171.28:8080/, "payload": "application/fhir+json" } }

What am I missing?

Thanks,

Brian

fil512 commented 5 years ago

The subscription is in requested mode which tells me you haven’t enabled subscriptions on the server. Add rest-hook to the enabled subscription types and the subscription should get activated.

On Sun, Apr 28, 2019 at 6:00 PM brianreinhold notifications@github.com wrote:

James,

I have created a server socket on my machine with endpoint http://24.62.171.28:8080 . That is my public IP and I have configured the router to map 8080 to my local machine. When I use a browser on my machine and type in http://24.62.171.28:8080http://24.62.171.28:8080/ my app gets signaled (it say a subscription event was received as that is what it is expecting.

In the subscription the endpoint is http://24.62.171.28:8080< http://24.62.171.28:8080/> and I see in the Subscription resource. However, when I send an upload , I get no notification.

I see the Observation with the desired subject on the server and the Subscription

{ "resourceType": "Subscription", "id": "16268", "meta": { "versionId": "1", "lastUpdated": "2019-04-28T21:22:38.001+00:00" }, "status": "requested", "end": "2019-04-28T17:32:37.715-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?subject=Patient/15299", "channel": { "type": "rest-hook", "endpoint": "http://24.62.171.28:8080"http://24.62.171.28:8080/, "payload": "application/fhir+json" } }

What am I missing?

Thanks,

Brian

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487419176, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORVTAQO3RASH3EUFTNDPSYM7XANCNFSM4GGGOWMQ .

fil512 commented 5 years ago

You enable rest-hook subscriptions on the server by adding RESTHOOK to the supported subscription types in DaoConfig:

daoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType. RESTHOOK)

On Sun, Apr 28, 2019 at 6:08 PM Ken Stevens ken@simpatico.ai wrote:

The subscription is in requested mode which tells me you haven’t enabled subscriptions on the server. Add rest-hook to the enabled subscription types and the subscription should get activated.

On Sun, Apr 28, 2019 at 6:00 PM brianreinhold notifications@github.com wrote:

James,

I have created a server socket on my machine with endpoint http://24.62.171.28:8080 . That is my public IP and I have configured the router to map 8080 to my local machine. When I use a browser on my machine and type in http://24.62.171.28:8080http://24.62.171.28:8080/ my app gets signaled (it say a subscription event was received as that is what it is expecting.

In the subscription the endpoint is http://24.62.171.28:8080< http://24.62.171.28:8080/> and I see in the Subscription resource. However, when I send an upload , I get no notification.

I see the Observation with the desired subject on the server and the Subscription

{ "resourceType": "Subscription", "id": "16268", "meta": { "versionId": "1", "lastUpdated": "2019-04-28T21:22:38.001+00:00" }, "status": "requested", "end": "2019-04-28T17:32:37.715-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?subject=Patient/15299", "channel": { "type": "rest-hook", "endpoint": "http://24.62.171.28:8080"http://24.62.171.28:8080/, "payload": "application/fhir+json" } }

What am I missing?

Thanks,

Brian

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487419176, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORVTAQO3RASH3EUFTNDPSYM7XANCNFSM4GGGOWMQ .

brianreinhold commented 5 years ago

Ken,

Thanks for the help ... But I think I am doing that:

Using HAPI FHIR I create the subsscription as follows:

Subscription subscription = new Subscription(); subscription.setStatus(SubscriptionStatus.OFF); subscription.setId(subscriptionLogicalId); subscription.setCriteria(criteria); subscription.setReason("Notified of patient measurement"); SubscriptionChannelComponent channel = new SubscriptionChannelComponent(); channel.setType(Subscription.SubscriptionChannelType.RESTHOOK); channel.setEndpoint(fhirUrl + "/Subscription/" + subscriptionLogicalId); channel.setPayload("application/fhir+json"); subscription.setChannel(channel); try { doPUT(fhirUrl + "/Subscription/" + subscriptionLogicalId, fhirContext.newJsonParser().encodeResourceToString(subscription)); }

This has worked when I used the local HAPI server which can be run on the same system as the client.

Brian


From: Ken Stevens notifications@github.com Sent: Sunday, April 28, 2019 6:37 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

You enable rest-hook subscriptions on the server by adding RESTHOOK to the supported subscription types in DaoConfig:

daoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType. RESTHOOK)

On Sun, Apr 28, 2019 at 6:08 PM Ken Stevens ken@simpatico.ai wrote:

The subscription is in requested mode which tells me you haven’t enabled subscriptions on the server. Add rest-hook to the enabled subscription types and the subscription should get activated.

On Sun, Apr 28, 2019 at 6:00 PM brianreinhold notifications@github.com wrote:

James,

I have created a server socket on my machine with endpoint http://24.62.171.28:8080 . That is my public IP and I have configured the router to map 8080 to my local machine. When I use a browser on my machine and type in http://24.62.171.28:8080http://24.62.171.28:8080/ my app gets signaled (it say a subscription event was received as that is what it is expecting.

In the subscription the endpoint is http://24.62.171.28:8080< http://24.62.171.28:8080/> and I see in the Subscription resource. However, when I send an upload , I get no notification.

I see the Observation with the desired subject on the server and the Subscription

{ "resourceType": "Subscription", "id": "16268", "meta": { "versionId": "1", "lastUpdated": "2019-04-28T21:22:38.001+00:00" }, "status": "requested", "end": "2019-04-28T17:32:37.715-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?subject=Patient/15299", "channel": { "type": "rest-hook", "endpoint": "http://24.62.171.28:8080"http://24.62.171.28:8080/, "payload": "application/fhir+json" } }

What am I missing?

Thanks,

Brian

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487419176, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORVTAQO3RASH3EUFTNDPSYM7XANCNFSM4GGGOWMQ .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487421353, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO6Y3IXUA4CR4IOX6B23PSYRKJANCNFSM4GGGOWMQ.

fil512 commented 5 years ago

Brian,

That's not quite enough. You also need to configure your server to process subscriptions. How are you running the server? If you're using hapi-fhir-jpaserver-starter, then you need to edit hapi.properties and set subscription.resthook.enabled=true

On Sun, Apr 28, 2019 at 7:42 PM brianreinhold notifications@github.com wrote:

Ken,

Thanks for the help ... But I think I am doing that:

Using HAPI FHIR I create the subsscription as follows:

Subscription subscription = new Subscription(); subscription.setStatus(SubscriptionStatus.OFF); subscription.setId(subscriptionLogicalId); subscription.setCriteria(criteria); subscription.setReason("Notified of patient measurement"); SubscriptionChannelComponent channel = new SubscriptionChannelComponent(); channel.setType(Subscription.SubscriptionChannelType.RESTHOOK); channel.setEndpoint(fhirUrl + "/Subscription/" + subscriptionLogicalId); channel.setPayload("application/fhir+json"); subscription.setChannel(channel); try { doPUT(fhirUrl + "/Subscription/" + subscriptionLogicalId, fhirContext.newJsonParser().encodeResourceToString(subscription)); }

This has worked when I used the local HAPI server which can be run on the same system as the client.

Brian


From: Ken Stevens notifications@github.com Sent: Sunday, April 28, 2019 6:37 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

You enable rest-hook subscriptions on the server by adding RESTHOOK to the supported subscription types in DaoConfig:

daoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType. RESTHOOK)

On Sun, Apr 28, 2019 at 6:08 PM Ken Stevens ken@simpatico.ai wrote:

The subscription is in requested mode which tells me you haven’t enabled subscriptions on the server. Add rest-hook to the enabled subscription types and the subscription should get activated.

On Sun, Apr 28, 2019 at 6:00 PM brianreinhold notifications@github.com wrote:

James,

I have created a server socket on my machine with endpoint http://24.62.171.28:8080 . That is my public IP and I have configured the router to map 8080 to my local machine. When I use a browser on my machine and type in http://24.62.171.28:8080http://24.62.171.28:8080/ my app gets signaled (it say a subscription event was received as that is what it is expecting.

In the subscription the endpoint is http://24.62.171.28:8080< http://24.62.171.28:8080/> and I see in the Subscription resource. However, when I send an upload , I get no notification.

I see the Observation with the desired subject on the server and the Subscription

{ "resourceType": "Subscription", "id": "16268", "meta": { "versionId": "1", "lastUpdated": "2019-04-28T21:22:38.001+00:00" }, "status": "requested", "end": "2019-04-28T17:32:37.715-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?subject=Patient/15299", "channel": { "type": "rest-hook", "endpoint": "http://24.62.171.28:8080"http://24.62.171.28:8080/, "payload": "application/fhir+json" } }

What am I missing?

Thanks,

Brian

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487419176 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AANBORVTAQO3RASH3EUFTNDPSYM7XANCNFSM4GGGOWMQ

.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487421353>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AJMDO6Y3IXUA4CR4IOX6B23PSYRKJANCNFSM4GGGOWMQ

.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487425328, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORWU2ARNBNP7FEG5OSTPSYY5FANCNFSM4GGGOWMQ .

brianreinhold commented 5 years ago

Ken,

I am subscribing to the public server http://fhirtest.uhn.ca/baseR4

My app has a simple Java ServerSocket where the big challenge appears to be setting up my system to be exposed to the outside world. I think I have it correct because online test programs are able to signal my server but I am not getting anything from http://fhirtest.uhn.ca/baseR4 when I upload data. The code I displayed was the client attempting to configure http://fhirtest.uhn.ca/baseR4 with a subscription. When I used the local HAPI FHIR server on my system (no worries about firewalls and stuff) this did work. At least at last septemeber's connectathon. I don't recall exactly how I set that up (I had James's help there) so I have not tried that. But I really want to interoperate with multiple servers. That's the end idea of the connectathon.

Brian


From: Ken Stevens notifications@github.com Sent: Sunday, April 28, 2019 8:21 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

That's not quite enough. You also need to configure your server to process subscriptions. How are you running the server? If you're using hapi-fhir-jpaserver-starter, then you need to edit hapi.properties and set subscription.resthook.enabled=true

On Sun, Apr 28, 2019 at 7:42 PM brianreinhold notifications@github.com wrote:

Ken,

Thanks for the help ... But I think I am doing that:

Using HAPI FHIR I create the subsscription as follows:

Subscription subscription = new Subscription(); subscription.setStatus(SubscriptionStatus.OFF); subscription.setId(subscriptionLogicalId); subscription.setCriteria(criteria); subscription.setReason("Notified of patient measurement"); SubscriptionChannelComponent channel = new SubscriptionChannelComponent(); channel.setType(Subscription.SubscriptionChannelType.RESTHOOK); channel.setEndpoint(fhirUrl + "/Subscription/" + subscriptionLogicalId); channel.setPayload("application/fhir+json"); subscription.setChannel(channel); try { doPUT(fhirUrl + "/Subscription/" + subscriptionLogicalId, fhirContext.newJsonParser().encodeResourceToString(subscription)); }

This has worked when I used the local HAPI server which can be run on the same system as the client.

Brian


From: Ken Stevens notifications@github.com Sent: Sunday, April 28, 2019 6:37 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

You enable rest-hook subscriptions on the server by adding RESTHOOK to the supported subscription types in DaoConfig:

daoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType. RESTHOOK)

On Sun, Apr 28, 2019 at 6:08 PM Ken Stevens ken@simpatico.ai wrote:

The subscription is in requested mode which tells me you haven’t enabled subscriptions on the server. Add rest-hook to the enabled subscription types and the subscription should get activated.

On Sun, Apr 28, 2019 at 6:00 PM brianreinhold notifications@github.com wrote:

James,

I have created a server socket on my machine with endpoint http://24.62.171.28:8080 . That is my public IP and I have configured the router to map 8080 to my local machine. When I use a browser on my machine and type in http://24.62.171.28:8080http://24.62.171.28:8080/ my app gets signaled (it say a subscription event was received as that is what it is expecting.

In the subscription the endpoint is http://24.62.171.28:8080< http://24.62.171.28:8080/> and I see in the Subscription resource. However, when I send an upload , I get no notification.

I see the Observation with the desired subject on the server and the Subscription

{ "resourceType": "Subscription", "id": "16268", "meta": { "versionId": "1", "lastUpdated": "2019-04-28T21:22:38.001+00:00" }, "status": "requested", "end": "2019-04-28T17:32:37.715-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?subject=Patient/15299", "channel": { "type": "rest-hook", "endpoint": "http://24.62.171.28:8080"http://24.62.171.28:8080/, "payload": "application/fhir+json" } }

What am I missing?

Thanks,

Brian

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487419176 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AANBORVTAQO3RASH3EUFTNDPSYM7XANCNFSM4GGGOWMQ

.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487421353>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AJMDO6Y3IXUA4CR4IOX6B23PSYRKJANCNFSM4GGGOWMQ

.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487425328, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORWU2ARNBNP7FEG5OSTPSYY5FANCNFSM4GGGOWMQ .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487427818, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO62FCC4CYBKDYBV53TLPSY5QLANCNFSM4GGGOWMQ.

fil512 commented 5 years ago

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

brianreinhold commented 5 years ago

Ken,

I still get nothing.

The endpoint I configure in the subscription is "http://24.62.171.28:8080"

I test thas I have properly given outside access to this port in my router using this site:

https://www.yougetsignal.com/tools/open-ports/ Open Port Check Tool - Test Port Forwarding on Your Routerhttps://www.yougetsignal.com/tools/open-ports/ www.yougetsignal.com The port forwarding tester is a utility used to identify your external IP address and detect open ports on your connection. This tool is useful for finding out if your port forwarding is setup correctly or if your server applications are being blocked by a firewall.

My app gets triggered when I perform the test, but I get nothing from HAPI even though the upload succeeds.

Being a total greenhorn with servers and the like, is endpoint this correct?

OR

should it be "http://24.62.171.28:8080/myApp" ?

Thanks,

Brian

PS: How is HAPI with web sockets? That should be at least generically easier to use!


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ.

brianreinhold commented 5 years ago

Ken,

It must not have happened. I found this tool


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ.

brianreinhold commented 5 years ago

Try again

Spontaneous send (I don't know how)

Something must not be set

I checked the endpoint http://24.62.171.28:8080

with this tool

https://www.infobyip.com/httpservertest.php

[https://www.infobyip.com/images/sharing-thumbnail3.jpeg]https://www.infobyip.com/httpservertest.php

HTTP server test - InfoByIp.comhttps://www.infobyip.com/httpservertest.php www.infobyip.com HTTP server tester (HTTP connection checker) is an online http client that tests http server connectivity and accessibility from the Internet by retrieving http ...

and it worked.

I got this:

-->Got something from the subscription! HEAD /GetFhirData HTTP/1.1 Host: 24.62.171.28:8080 Accept: / Send response!

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ.

brianreinhold commented 5 years ago

Ken,

I will ask another question; as a client app on a local machine it can be really difficult to run a server application because of all the configuring one has to do to beat firewalls and the like.

So I would like to try the websocket option. As far as I can tell the HAPI server does not support that option ... at least I do not see it in its capability statement. Is this true?

Thanks,

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ.

brianreinhold commented 5 years ago

Ken, James,

In case you do support websockets, what is the 'url' for a websocket subscription? I cannot find support for websockets in the caps statement, so maybe it is not supported...?

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ.

fil512 commented 5 years ago

Websockets aren't currently enabled on that server. If they were, the url would be

ws://fhirtest.uhn.ca/baseR4/websocket

On Tue, Apr 30, 2019 at 5:57 PM brianreinhold notifications@github.com wrote:

Ken, James,

In case you do support websockets, what is the 'url' for a websocket subscription? I cannot find support for websockets in the caps statement, so maybe it is not supported...?

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ

.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488130019, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORWWS6UIT4IBRNR4CL3PTC6FTANCNFSM4GGGOWMQ .

brianreinhold commented 5 years ago

Ken,

The reason for using websockets is that this app is being run on a PC and during the connectathon from a hotel. There is NO WAY I will be able to configure the hotel system to pass through ports to my machine. I can get away with that at home because the router is mine (its still a pain). Websockets avoid that issue.

Brian


From: Ken Stevens notifications@github.com Sent: Wednesday, May 1, 2019 7:58 AM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Websockets aren't currently enabled on that server. If they were, the url would be

ws://fhirtest.uhn.ca/baseR4/websocket

On Tue, Apr 30, 2019 at 5:57 PM brianreinhold notifications@github.com wrote:

Ken, James,

In case you do support websockets, what is the 'url' for a websocket subscription? I cannot find support for websockets in the caps statement, so maybe it is not supported...?

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ

.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488130019, or mute the thread https://github.com/notifications/unsubscribe-auth/AANBORWWS6UIT4IBRNR4CL3PTC6FTANCNFSM4GGGOWMQ .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488265396, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO64GTF4U72AIJQTI2RDPTGAUVANCNFSM4GGGOWMQ.

jamesagnew commented 5 years ago

Hi Brian,

You may want to check out the JPA starter project: https://github.com/hapifhir/hapi-fhir-jpaserver-starter

This allows for subscriptions to be run locally, including websocket and rest hook ones (although you need to enable them in configuration).

Cheers, James

On Wed, May 1, 2019 at 8:08 AM brianreinhold notifications@github.com wrote:

Ken,

The reason for using websockets is that this app is being run on a PC and during the connectathon from a hotel. There is NO WAY I will be able to configure the hotel system to pass through ports to my machine. I can get away with that at home because the router is mine (its still a pain). Websockets avoid that issue.

Brian


From: Ken Stevens notifications@github.com Sent: Wednesday, May 1, 2019 7:58 AM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Websockets aren't currently enabled on that server. If they were, the url would be

ws://fhirtest.uhn.ca/baseR4/websocket

On Tue, Apr 30, 2019 at 5:57 PM brianreinhold notifications@github.com wrote:

Ken, James,

In case you do support websockets, what is the 'url' for a websocket subscription? I cannot find support for websockets in the caps statement, so maybe it is not supported...?

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<

https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519 , or mute the thread<

https://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ

.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488130019 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AANBORWWS6UIT4IBRNR4CL3PTC6FTANCNFSM4GGGOWMQ

.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488265396>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AJMDO64GTF4U72AIJQTI2RDPTGAUVANCNFSM4GGGOWMQ

.

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488267265, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2N7HO7QZSBBGDQ5NWL3S3PTGB4TANCNFSM4GGGOWMQ .

brianreinhold commented 5 years ago

James,

Thanks. I had it running once. But what I really want to do is interoperate with remote servers. And as many as possible!

Brian


From: James Agnew notifications@github.com Sent: Thursday, May 2, 2019 6:19 AM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Hi Brian,

You may want to check out the JPA starter project: https://github.com/hapifhir/hapi-fhir-jpaserver-starter

This allows for subscriptions to be run locally, including websocket and rest hook ones (although you need to enable them in configuration).

Cheers, James

On Wed, May 1, 2019 at 8:08 AM brianreinhold notifications@github.com wrote:

Ken,

The reason for using websockets is that this app is being run on a PC and during the connectathon from a hotel. There is NO WAY I will be able to configure the hotel system to pass through ports to my machine. I can get away with that at home because the router is mine (its still a pain). Websockets avoid that issue.

Brian


From: Ken Stevens notifications@github.com Sent: Wednesday, May 1, 2019 7:58 AM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Websockets aren't currently enabled on that server. If they were, the url would be

ws://fhirtest.uhn.ca/baseR4/websocket

On Tue, Apr 30, 2019 at 5:57 PM brianreinhold notifications@github.com wrote:

Ken, James,

In case you do support websockets, what is the 'url' for a websocket subscription? I cannot find support for websockets in the caps statement, so maybe it is not supported...?

Brian


From: Ken Stevens notifications@github.com Sent: Monday, April 29, 2019 3:28 PM To: jamesagnew/hapi-fhir Cc: Brian Reinhold; Mention Subject: Re: [jamesagnew/hapi-fhir] Device.property.valueQuanity error (spelling) (#1124)

Brian,

Oh I'm sorry, I thought you were running your own server!

Subscriptions were accidentally disabled on fhirtest.uhn.ca http://fhirtest.uhn.ca/baseR4. I just re-enabled them now. Please try again and let me know if it works.

Sincerely, Ken

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<

https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-487711519 , or mute the thread<

https://github.com/notifications/unsubscribe-auth/AJMDO67LHQ3MGVL2SQHWMSDPS5D4LANCNFSM4GGGOWMQ

.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488130019 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AANBORWWS6UIT4IBRNR4CL3PTC6FTANCNFSM4GGGOWMQ

.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488265396>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AJMDO64GTF4U72AIJQTI2RDPTGAUVANCNFSM4GGGOWMQ

.

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488267265, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2N7HO7QZSBBGDQ5NWL3S3PTGB4TANCNFSM4GGGOWMQ .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jamesagnew/hapi-fhir/issues/1124#issuecomment-488622038, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO66QHOWVH7XNZUIAFB3PTK54PANCNFSM4GGGOWMQ.