Skip to content

Commit

Permalink
modified all test loaded testfiles to js files
Browse files Browse the repository at this point in the history
  • Loading branch information
byshiny committed Jun 24, 2014
1 parent d7ad886 commit 13d6ba7
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 108 deletions.
6 changes: 6 additions & 0 deletions docs/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ Results: Only result is required.
Encounters: Only encounter is required.

Vitals: Only vital is required.

Social History: At the moment, so field is required.

Procedures: procedure key is required, min items is 1.
status key is required.
For a provider object, only required field is address.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"regular":{
var testAddress = {
"regular":{
"streetLines": [
"1357 Amber Drive"
],
Expand All @@ -9,7 +9,7 @@
"country": "US",
"use": "primary home"
},
"missingAddr":{
"missingAddr":{
"streetLines": [
],
"city": "Beaverton",
Expand All @@ -18,15 +18,15 @@
"country": "US",
"use": "primary home"
},
"noCity":{
"noCity":{
"streetLines": [
],
"state": "OR",
"zip": "97867",
"country": "US",
"use": "primary home"
},
"noCityAddr":{
"noCityAddr":{
"streetLines": [
],
"state": "OR",
Expand All @@ -40,9 +40,10 @@
"streetLines": [
"1357 Amber Drive"
],
"city": "Beaverton"
"city": "Beaverton"
}
}
};
module.exports = testAddress;



Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testAllergy = {
"regular1": {
"date": [
{
Expand Down Expand Up @@ -218,4 +218,6 @@
]
}

}
};

module.exports = testAllergy;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testDemo = {
"regular": {
"name": {
"middle": [
Expand Down Expand Up @@ -264,6 +264,5 @@
}
]
}


}
};
module.exports = testDemo;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testEncounter = {
"regular": {
"encounter": {
"name": "Office outpatient visit 15 minutes",
Expand Down Expand Up @@ -234,4 +234,5 @@
}
]
}
}
};
module.exports = testEncounter;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testLocations = {
"regular1": {
"name": "Community Urgent Care Center",
"loc_type": {
Expand Down Expand Up @@ -124,6 +124,6 @@
"type": "primary home"
}
]
}

}
}
};
module.exports = testLocations;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testMedic = {
"regular": {
"date": [
{
Expand Down Expand Up @@ -192,9 +192,6 @@
}
}
}
};





}
module.exports = testMedic;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testProb = {
"regular1":{
"date":[
{
Expand Down Expand Up @@ -151,4 +151,5 @@
}
]
}
}
};
module.exports = testProb;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testResult = {
"regular": {
"identifiers": [
{
Expand Down Expand Up @@ -354,4 +354,6 @@
}
]
}
}
};

module.exports = testResult;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testSocial = {
"regular": {
"smoking_statuses": [
{
Expand Down Expand Up @@ -47,6 +47,5 @@
}
]
}


}
};
module.exports = testSocial;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
var testVital = {
"regular1": {
"identifiers": [
{
Expand Down Expand Up @@ -142,7 +142,7 @@
],
"value": 145,
"unit": "mm[Hg]"
},
},
"missingVitalField": {
"identifiers": [
{
Expand Down Expand Up @@ -257,11 +257,6 @@
"code_system_name": "LOINC"
}
}
};







}
module.exports = testVital;
92 changes: 92 additions & 0 deletions test/fixtures/validator/schemas/procedures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"properties": {
"body_sites": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_coded_entry"
},
"minItems": 1
},
"date": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_date"
},
"minItems": 1
},
"identifiers": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_id"
},
"minItems": 1
},
"procedure_type": {
"type": "string"
},
"procedure": {
"type": "object",
"properties": {
"$ref": "http://local.com/commonModels#/properties/cda_coded_entry"
}
},
"providers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"$ref": "http://local.com/commonModels#/properties/cda_address"
},
"identifiers": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_id"
}
},
"organization": {
"type": "object",
"properties": {
"address": {
"$ref": "http://local.com/commonModels#/properties/cda_address"
},
"identifiers": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_id"
}
},
"name": {
"type": "string"
},
"phone": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_phone"
}
}
}
},
"phone": {
"type": "array",
"items": {
"$ref": "http://local.com/commonModels#/properties/cda_phone"
}
}
},
"required": [
"address"
]
}
},
"status": {
"type": "string"
}
},
"required": [
"status",
"procedure"
]
}

0 comments on commit 13d6ba7

Please sign in to comment.