POST a resource
curl -v -X POST --header "Content-Type: application/fhir+json" --data @resource.json <http://172.104.170.172:8080/sila-fhirserver/fhir/Resource/>
Resource - resource being used
resource.json - resource file to be submitted
GET a resource
curl -v GET [<http://172.104.170.172:8080/sila-fhirserver/fhir/>](<http://172.104.170.172:8080/sila-fhirserver/fhir/Patient/15152>)Resource/resource_id
POST Patient Resource
curl -v -X POST --header "Content-Type: application/fhir+json" --data @patient.json <http://172.104.170.172:8080/sila-fhirserver/fhir/Patient/>
Patient Resource Template:
{
"resourceType" : "Patient",
"identifier" : [{ Identifier }], // An identifier for this patient
"name" : [{ HumanName }], // A name associated with the patient
"telecom" : [{ ContactPoint }], // A contact detail for the individual
"gender" : "<code>", // male | female | other | unknown
"birthDate" : "<date>", // The date of birth for the individual
"address" : [{ Address }], // An address for the individual
"maritalStatus" : { CodeableConcept }, // Marital (civil) status of a patient
"nationality": { String },
"religion": {String},
"occupation": {String},
"occupationTitle":{String},
"workplaceName": {String},
"workplaceAddress":{String},
"workplaceTelecom": {String},
"link":[{"Other":{RelatedPerson/Patient}, "Link":{code}}]
}
Sample Patient File
{
"resourceType": "Patient",
"name": [
{
"use": "official",
"family": "Dela Cruz",
"given": [
"Juan",
"Pedro",
"Santos"
]
}
],
"telecom": [
{
"system": "phone",
"value": "(03) 5555 6473"
},
{
"system": "phone",
"value": "(0939) 929 3814",
"use": "mobile"
}
],
"gender": "male",
"birthDate": "1974-12-25",
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/religion>",
"valueString":"Catholic"
},
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/nationality>",
"valueString":"Filipino"
},
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/occupation>",
"valueString":"Nurse"
},
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/occupationTitle>",
"valueString":"Nurse"
},
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/workplaceName>",
"valueString":"Angeles General"
},
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/workplaceAddress>",
"valueString":"Anunas, Angeles City"
},
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/workplaceTelecom>",
"valueString":"0212010992"
},
"link": [
{
"other": ReferencePerson/1211,
"Link": "father"
},
"address": [
{
"use": "home",
"line": [
"139 Lily St"
],
"city": "Angeles City",
"district": "Pampanga",
"state": "Region 3",
"postalCode": "3999",
"extension": [
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/Barangay>",
"valueString":"Anunas"
},
{
"url": "<http://sil-asia.org/fhir/StructureDefinition/PSGC>",
"valueInteger":3400002
},
{
"url":"<http://hl7.org/fhir/StructureDefinition/geolocation>",
"extension":
[
{
"url": "latitude",
"valueDecimal" : 100.1
},
{
"url": "longitude",
"valueDecimal" : 100.1
}
]
}
]
}
]
}