# Care Connect API Implementation Guide - Java (code) Examples **Category:** [FHIR](https://openhealthhub.org/c/fhir/31) **Created:** 2017-07-13 07:51 UTC **Views:** 2636 **Replies:** 1 **URL:** https://openhealthhub.org/t/care-connect-api-implementation-guide-java-code-examples/1090 --- ## Post #1 by @mayfield.g.kev Version 1.0.0-alpha of the API was released yesterday (the webex will be available soon). We had a few questions on test servers and JSON versions of the examples. **_Test Server_** We used a local version of the public HAPI server (http://fhirtest.uhn.ca/home?serverId=hapi_dev&pretty=false) for testing out the search parameters. The easiest way to explore CareConnectAPI/FHIR is to use the public site but this supports all the FHIR Search parameters not just the common core listed in the CareConnectAPI IG. The code for the local version is based on this post (https://www.openhealthhub.org/t/howto-build-a-health-database-and-fhir-api-server-in-15-mins-using-open-source/155 - current github https://github.com/KevinMayfield/Jorvik/tree/master/hapi-fhir-jpaserverDstu2) but is configured to run using maven and springboot. This can be found here: https://github.com/nhsconnect/careconnect-java-examples/tree/master/careconnect-hapi-jpa-dstu2-springboot This uses a embedded Apache Derby database but doesn't include the HAPI overlay which the main version uses but is useful for a developer. **_CareConnect Profiles Examples_** The XML examples were again built using HAPI (java libraries) the code can be found here https://github.com/nhsconnect/careconnect-java-examples/tree/master/ImplementationGuideExplore This is also a springboot app. When run the code will output FHIR resources in XML format to the console and post the resources to the standalone HAPI server. To change output to JSON and where the resources are sent, your will need to use a JSON parser and alter the serverBase string. These can be found in IGExplore.java ` IParser parser = ctxFHIR.newXmlParser(); // This is to base HAPI server not the CareConnectAPI String serverBase = "http://127.0.0.1:8080/FHIRServer/DSTU2/";` In the example below this line of code has been changed to use the public HAPI server and JSON Parser ` IParser parser = ctxFHIR.newJsonParser(); // This is to base HAPI server not the CareConnectAPI String serverBase = "http://fhirtest.uhn.ca/baseDstu2/";` --- ## Post #2 by @mayfield.g.kev Recording of webex https://contattafiles.s3-us-west-1.amazonaws.com/tnt373/cl_YDi32QUpswgS/CareConnect%2520Phase%25201%2520Update-20170712%25200958-1.mp4 --- **Canonical:** https://openhealthhub.org/t/care-connect-api-implementation-guide-java-code-examples/1090 **Original content:** https://openhealthhub.org/t/care-connect-api-implementation-guide-java-code-examples/1090