How can I use Std API in Swagger for AWS OPENEMR 7.0 Cloud express edition also how do I get the Authorization for the same

Hi All,

I am trying to use the Std API for Swagger for AWS Open EMR 7.0 Cloud express edition also how do I get the Authorization code for unlocking the the swagger.

Kindly assist with above.

I have tried couple of links for FHIR, but would like to explore and use the Standard API as I need the normal HL7 messages out from the Open EMR.

Regards,
Ayesha

Hi Experts,

I guess the Std does not work for Cloud Express.

Now I am trying to use FHIR. I can see 1 patient only at a time by clicking Authorization. Is there a way to view all the patients.

Please any light on my path would be much appreciated.

Thanks in Advance.
Ayesha

Wooooooowwwwww

I could retrieve All the patients !!! both in Swagger and postman :slight_smile:

1)Now my next target is to get the Auth token automated so I dont have to explicitly come each time to Swagger to get Bearer token and populate in my Postman.
2) Next would be connecting to Mirth Connect to fetch all the patient data.

If any ideas please pour on me !!!

Thank you !!
Ayesha

Hi All,

I could successfully view all patients both in Swagger and Postman.

Now I am trying to get Bearer token from postman rather than normal way of getting it done via Swagger.

I would not ask but will try hard as no one answers anywaz.

I am sharing above so others can get help in future than reinventing the wheel.

Regards,
Ayesha

1 Like

So swagger is using standard OAuth protocol specifically the authorization_code grant. There are countless tutorials on the internet for doing an OAuth2 authentication using the authorization_grant. Our own documentation shows how to do this via CURL (which you should be able to translate to Postman).

Have you reviewed our API documentation? It walks through registration of a client and getting a bearer token via the authorization_code grant…
openemr/API_README.md at master · openemr/openemr · GitHub

1 Like

Hi @adunsulag,

Thank you so much for your response.

I have been watching your video and this github faithfully but still struggling to get success. May be I can revisit with a fresh mind and retry the steps.

I get the below error when I do with Postman.

From postman when I do a click on get token after entering the admin2 credentials I get below url.

I have not configured this url at all in my set up, not sure from where does it pop and why this is the last step of Authorization via postman.

https:///oauth2/default/device/code

Look at your registration redirect_uri. Also make sure you have configured your FHIR base server address in the Globals/Config->Connectors configuration page.

Hi,

It should be my site address right in connectors like https://

Thanks in advance,

Regards,
Ayesha

Have you applied patch 1 for this install?

Turn on the api debug logging in config/globals->Logging and look at your php error logs.

If everything is setup correctly then perhaps you’ve discovered a bug on the server for a particular condition.

Hi Stephen,

I don’t think so the AWS Cloud Express gave me an option for installing a patch and I guess it is a complete whole working package unless I am wrong in that assumption.

I have turned it on, let me retry all steps and check the logs.

Regards,
Ayesha

hi @AyeshaMuss , this is the OpenEMR AWS patch guide that can be used as a template by switching out patch 4 for version 6 with patch 1 for version 7.

Hi @stephenwaite

Just to give a little background on my Open EMR 7.0 Cloud Express Edition Version.

I got it installed from AWS MarketPlace with Ubuntu 20.0 version.

I set the SSH port so I can hop in using the Putty.

Do you want me to run this patch in the Ubuntu ??? Is this applicable for my kind of set up ?

Please confirm before I kick start the patch process.

Kind Regards,
Ayesha

hi @AyeshaMuss , yes, if you’d like to wait while the guide is patched, will have it completed shortly.

Hi @stephenwaite ,

Do you mean I wait until I hear from you and start a new instance in AWS so this error would get rid ??

or

Do I install the above mentioned patch in my instance? If so can you guide me through it.

Regards,
Ayesha

Just an extra information so we are on same page.

I am using the highlighted version of cloud.

hi @AyeshaMuss , the guide is now updated and you run the patch on your installed instance.

Hi @stephenwaite ,

Thanks for the heads-up, I will read through and get going. In case I see any hiccups will seek your assistance.

Thank you !!!

Regards,
Ayesha

you’re welcome @AyeshaMuss , can you paste your about page here just to confirm you’re not running the patch already please?

Hi @stephenwaite, please find the “About Page”, No I did not start yet. As Step 1 I am backing my OpenEMR, while I saw your message in here.

Please confirm if I have to proceed.

Thank you so much I am so happy working with this team now :slight_smile:

Regards,
Ayesha