Skip to content

Commit

Permalink
raml init
Browse files Browse the repository at this point in the history
  • Loading branch information
p-mcgowan@homebot committed Nov 2, 2017
1 parent e42b785 commit c4678a8
Show file tree
Hide file tree
Showing 170 changed files with 10,937 additions and 36 deletions.
4 changes: 2 additions & 2 deletions api/controllers/patients_controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exports.root = (request, response) => {
return response.status(501).send('root unimplemented');
return response.status(501).send('patients / unimplemented');
};

exports.notroot = (request, response) => {
return response.status(501).send('not root unimplemented');
return response.status(501).send('patients /root unimplemented');
};
7 changes: 7 additions & 0 deletions api/controllers/questionairre_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exports.root = (request, response) => {
return response.status(501).send('root unimplemented');
};

exports.notroot = (request, response) => {
return response.status(501).send('not root unimplemented');
};
10 changes: 10 additions & 0 deletions api/router/patient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var router = require('express').Router();

// Pats controller
var patientsController = require('../controllers/patients_controller.js');


router.get('/', patientsController.root);
router.get('/root', patientsController.notroot);

module.exports = router;
13 changes: 0 additions & 13 deletions api/router/patients.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,5 @@ var patientsController = require('../controllers/patients_controller.js');

router.get('/', patientsController.root);
router.get('/root', patientsController.notroot);
// // Home page route
// router.get('/', function (req, res) {
// res.send('Wiki home page');
// })

// // About page route
// router.get('/about', function (req, res) {
// res.send('About this wiki');
// })

module.exports = router;
// var patients = require('../controllers/patients_controller.js');

// router.get('/', (r, q) => q.send(200));
// router.get('/:patId', patients.show);
10 changes: 10 additions & 0 deletions api/router/questionairre.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var router = require('express').Router();

var questionairreController = require('../controllers/questionairre_controller.js');


router.get('/', questionairreController.root);
router.get('/root', questionairreController.notroot);

module.exports = router;

15 changes: 10 additions & 5 deletions api/router/routes.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
var router = require('express').Router();

// patients sub route
var patientsRouter = require('./patients');

router.use((request, response, next) => {
console.log(request.method, request.originalUrl, request.body);
next();
});

// when pats, pats sub root
router.use('/patients', patientsRouter);
router.use('/patient', require('./patient'));
router.use('/questionairre', require('./questionairre'));

router.use((error, request, response, next) => {
console.trace(error);
if (!response.headerSent) {
response.status(500).json({ error: 'Internal server error' });
}
next();
});

module.exports = router;
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/AllergyIntoleranceBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/AllergyIntoleranceBundle.raml

type: Bundle
properties:
entry?: AllergyIntoleranceEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/AppointmentBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/AppointmentBundle.raml

type: Bundle
properties:
entry?: AppointmentEntry[]
20 changes: 20 additions & 0 deletions api/spec/dataTypes/bundles/Bundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/Bundle.raml

#not to be used directly - use more specific types: GeneralBundle or <resourceName>Bundle
type: Resource
properties:
resourceType?: string
type:
type: code
enum: [document, message, transaction, transaction-response, batch, batch-response, history, searchset, collection]
total?: unsignedInt
link?:
type: array
items:
type: BackboneElement
properties:
relation: string
url: uri
signature?: Signature
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/ConditionBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/ConditionBundle.raml

type: Bundle
properties:
entry?: ConditionEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/DeviceBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/DeviceBundle.raml

type: Bundle
properties:
entry?: DeviceEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/EncounterBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/EncounterBundle.raml

type: Bundle
properties:
entry?: EncounterEntry[]
45 changes: 45 additions & 0 deletions api/spec/dataTypes/bundles/GeneralBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/GeneralBundle.raml

type: Bundle
properties:
entry?:
type: array
items:
type: BackboneElement
properties:
link?:
type: array
items:
type: BackboneElement
properties:
relation: string
url: uri
fullUrl?: uri
resource?: Resource
search?:
type: BackboneElement
properties:
mode?:
type: code
enum: [match, include, outcome]
score?: decimal
request?:
type: BackboneElement
properties:
method:
type: code
enum: [GET, PUT, POST, DELETE]
url: uri
ifNoneMatch?: string
ifModifiedSince?: instant
ifMatch: string
ifNoneExist: string
response?:
type: BackboneElement
properties:
status: string
location?: uri
etag?: string
lastModified?: instant
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/MedicationBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/MedicationBundle.raml

type: Bundle
properties:
entry?: MedicationEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/MedicationOrderBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/MedicationOrderBundle.raml

type: Bundle
properties:
entry?: MedicationOrderEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/ObservationBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/ObservationBundle.raml

type: Bundle
properties:
entry?: ObservationEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/PatientBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/PatientBundle.raml

type: Bundle
properties:
entry?: PatientEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/PractitionerBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/PractitionerBundle.raml

type: Bundle
properties:
entry?: PractitionerEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/ScheduleBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/ScheduleBundle.raml

type: Bundle
properties:
entry?: ScheduleEntry[]
7 changes: 7 additions & 0 deletions api/spec/dataTypes/bundles/SlotBundle.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/bundles/SlotBundle.raml

type: Bundle
properties:
entry?: SlotEntry[]
20 changes: 20 additions & 0 deletions api/spec/dataTypes/elements/Address.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Address.raml

type: Element
properties:
use?:
type: code
enum: [home, work, temp, old]
type?:
type: code
enum: [postal, physical, both]
text?: string
line?: string[]
city?: string
district?: string
state?: string
postalCode?: string
country?: string
period?: Period
9 changes: 9 additions & 0 deletions api/spec/dataTypes/elements/Annotation.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Annotation.raml

type: Element
properties:
/^author(Reference|String)$/?: Reference | string
time?: dateTime
text?: string
18 changes: 18 additions & 0 deletions api/spec/dataTypes/elements/Attachment.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Attachment.raml

type: Element
properties:
contentType?:
type: code
description: Mime type of the content, with charset etc.
language?:
type: code
description: Human language of the content (BCP-47)
data?: base64Binary
url?: uri
size?: unsignedInt
hash?: base64Binary
title?: string
creation?: dateTime
7 changes: 7 additions & 0 deletions api/spec/dataTypes/elements/BackboneElement.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/BackboneElement.raml

type: Element
properties:
modifierExtension?: Extension
8 changes: 8 additions & 0 deletions api/spec/dataTypes/elements/CodeableConcept.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/CodeableConcept.raml

type: Element
properties:
coding?: Coding[]
text?: string
10 changes: 10 additions & 0 deletions api/spec/dataTypes/elements/Coding.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Coding.raml

properties:
system?: uri
version?: string
code?: code
display?: string
userSelected?: boolean
13 changes: 13 additions & 0 deletions api/spec/dataTypes/elements/ContactPoint.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/ContactPoint.raml

type: Element
properties:
system?:
enum: [phone,fax,email,pager,other]
value?: string
use?: string
rank?:
type: positiveInt
period?: Period
6 changes: 6 additions & 0 deletions api/spec/dataTypes/elements/Duration.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Duration.raml

type: Quantity
description: a length of time
7 changes: 7 additions & 0 deletions api/spec/dataTypes/elements/Element.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Element.raml

properties:
id?: id
extension?: Extension[]
8 changes: 8 additions & 0 deletions api/spec/dataTypes/elements/Extension.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Extension.raml

properties:
url: uri
# Regex key below causes errors
# /^value(Integer|Decimal|DateTime|Date|Instant|String|Uri|Boolean|Code|Markdown|Base64Binary|Coding|CodeableConcept|Attachment|Identifier|Quantity|Range|Period|Ratio|HumanName|Address|ContactPoint|Timing|Signature|Reference)$/: integer | decimal | dateTime | date | instant | string | uri | boolean | code | markdown | base64Binary | Coding | CodeableConcept | Attachment | Identifier | Quantity | Range | Period | Ratio | HumanName | Address | ContactPoint | Timing | Signature | Reference
15 changes: 15 additions & 0 deletions api/spec/dataTypes/elements/HumanName.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/HumanName.raml

type: Element
properties:
use?:
type: code
enum: [usual, official ,temp, nickname, anonymous, old, maiden]
text?:
family?: string[]
given?: string[]
prefix?: string[]
suffix?: string[]
period?: Period
11 changes: 11 additions & 0 deletions api/spec/dataTypes/elements/Identifier.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#%RAML 1.0 DataType

#This file is located at dataTypes/elements/Identifier.raml

properties:
use?: code
type?: CodeableConcept
system?: uri
value?: string
period?: Period
assigner?: Reference
Loading

0 comments on commit c4678a8

Please sign in to comment.