Add flag to CLI tool

This commit is contained in:
James Agnew 2016-09-16 13:16:46 -04:00
parent 4de0e38e01
commit e1b41d8bf5
2 changed files with 287 additions and 1 deletions

View File

@ -180,7 +180,9 @@ public class App {
try { try {
String[] args = Arrays.asList(theArgs).subList(1, theArgs.length).toArray(new String[theArgs.length - 1]); String[] args = Arrays.asList(theArgs).subList(1, theArgs.length).toArray(new String[theArgs.length - 1]);
parsedOptions = parser.parse(options, args, true); parsedOptions = parser.parse(options, args, true);
if (parsedOptions.getArgList().isEmpty()==false) {
throw new ParseException("Unrecognized argument: " + parsedOptions.getArgList().get(0).toString());
}
// Actually execute the command // Actually execute the command
command.run(parsedOptions); command.run(parsedOptions);

View File

@ -0,0 +1,284 @@
{
"resourceType": "Bundle",
"id": "2016-09-13T14:16:23.533-04:00",
"type": "transaction",
"entry": [
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/Patient/sisansarahId",
"resource": {
"resourceType": "Patient",
"id": "sisansarahId",
"identifier": [
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0203",
"code": "MR"
}
]
},
"system": "urn:oid:1.2.3.4.5.6.7.8.10",
"value": "sisansarahId"
}
],
"name": [
{
"family": [
"Sisansarah Lorianthah"
],
"given": [
"Piggy"
]
}
]
},
"request": {
"method": "PUT",
"url": "Patient/1-sisansarahId"
}
},
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/Device/ecde3d4e58532d31",
"resource": {
"resourceType": "Device",
"id": "ecde3d4e58532d31",
"identifier": [
{
"system": "urn:iso:std:iso:11073:10101",
"value": "ecde3d4e58532d31"
}
],
"type": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "531981",
"display": "MDC_MOC_VMS_MDS_AHD"
}
]
}
},
"request": {
"method": "PUT",
"url": "Device/1-ecde3d4e58532d31"
}
},
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/DeviceComponent/AHD-ecde3d4e58532d31",
"resource": {
"resourceType": "DeviceComponent",
"id": "AHD-ecde3d4e58532d31",
"type": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "531981",
"display": "MDC_MOC_VMS_MDS_AHD"
}
]
},
"identifier": {
"system": "urn:iso:std:iso:11073:10101",
"value": "ecde3d4e58532d31"
},
"lastSystemChange": "2016-09-13T14:16:23-04:00",
"source": {
"reference": "Device/ecde3d4e58532d31"
}
},
"request": {
"method": "PUT",
"url": "DeviceComponent/1-AHD-ecde3d4e58532d31"
}
},
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/Device/006019fffe31b743",
"resource": {
"resourceType": "Device",
"id": "006019fffe31b743",
"identifier": [
{
"use": "official",
"system": "urn:iso:std:iso:11073:10101",
"value": "006019fffe31b743",
"assigner": {
"reference": "IEEE"
}
},
{
"use": "official",
"system": "urn:iso:std:iso:11073:10101",
"value": "00:60:19:31:B7:43",
"assigner": {
"reference": "Bluetooth SIG"
}
}
],
"type": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "528401",
"display": "MDC_DEV_SPEC_PROFILE_GLUCOSE"
}
]
},
"manufacturer": "Roche",
"model": "502"
},
"request": {
"method": "PUT",
"url": "Device/1-006019fffe31b743"
}
},
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/DeviceComponent/Agent-006019fffe31b743",
"resource": {
"resourceType": "DeviceComponent",
"id": "Agent-006019fffe31b743",
"type": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "65573",
"display": "MDC_MOC_VMS_MDS_SIMP"
}
]
},
"identifier": {
"use": "official",
"system": "urn:iso:std:iso:11073:10101",
"value": "006019fffe31b743",
"assigner": {
"reference": "IEEE"
}
},
"lastSystemChange": "2016-09-13T14:16:23-04:00",
"source": {
"reference": "Device/006019fffe31b743"
},
"productionSpecification": [
{
"specType": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "531972",
"display": "MDC_ID_PROD_SPEC_SERIAL"
}
]
},
"productionSpec": "01161027"
},
{
"specType": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "531976",
"display": "MDC_ID_PROD_SPEC_FW"
}
]
},
"productionSpec": "5.87"
}
]
},
"request": {
"method": "PUT",
"url": "DeviceComponent/1-Agent-006019fffe31b743"
}
},
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/Observation/OBR_1:1.0.0.1",
"resource": {
"resourceType": "Observation",
"id": "OBR_1:1.0.0.1",
"status": "final",
"code": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "160368",
"display": "MDC_CONC_GLU_UNDETERMINED_PLASMA"
},
{
"system": "http://hl7.org/fhir/data-types",
"code": "Quantity",
"display": "Value is a Numeric Data Type integer"
}
]
},
"subject": {
"reference": "Patient/sisansarahId"
},
"effectiveDateTime": "2016-08-01T17:19:58-04:00",
"performer": [
{
"reference": "Patient/sisansarahId"
}
],
"valueQuantity": {
"value": 105,
"unit": "mg/dl",
"system": "urn:iso:std:iso:11073:10101",
"code": "264274"
},
"device": {
"reference": "Device/006019fffe31b743"
}
},
"request": {
"method": "POST",
"url": "Observation/1-OBR_1:1.0.0.1"
}
},
{
"fullUrl": "http://64.87.15.70:8087/server-web/baseDstu3/Observation/OBR_1:1.0.0.2",
"resource": {
"resourceType": "Observation",
"id": "OBR_1:1.0.0.2",
"status": "final",
"code": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "8417864",
"display": "MDC_CTXT_GLU_MEAL"
},
{
"code": "code",
"display": "Value is an MDC code"
}
]
},
"subject": {
"reference": "Patient/sisansarahId"
},
"effectiveDateTime": "2016-08-01T17:19:58-04:00",
"performer": [
{
"reference": "Patient/sisansarahId"
}
],
"valueCodeableConcept": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "62032",
"display": "MDC_CTXT_GLU_MEAL_POSTPRANDIAL"
}
]
},
"device": {
"reference": "Device/006019fffe31b743"
}
},
"request": {
"method": "POST",
"url": "Observation/1-OBR_1:1.0.0.2"
}
}
]
}