Hello,
I am a newbie and want to learn FHIR. I would like to begin my learning by doing a SimpleRead by giving a patientID , and hope that I would receive back a patient record.
For example my SimpleRead would have the following code below. My question is what is a good patientID that I should use in order to get a patient record .
Thanks so much.
public class SimpleRead {
IGenericClient client = null;
public SimpleRead(String baseUrl) {
FhirContext ctx = FhirContext.forDstu3();
client = ctx.newRestfulGenericClient(baseUrl);
}
/**
* Find the patient with the given ID and return the full name as a
* single string.
*/
public String getNameByPatientID(String id) {
// Hint, there is a method that will return the full name including
// prefix, first, last, and suffix
//Place your code here
return "";//just so it will compile, return nothing
}
/**
* Find all the patients that have the provided name and return a list
* of the IDs for those patients. The search should include matches
* where any part of the patient name (family, given, prefix, etc.)
* matches the method 'name' parameter.
*/
public List<String> getIDByPatientName(String name) {
//Place your code here
return new ArrayList<String>();//just so it will compile, return nothing
}
}