Detects cervix shift in one happy path; including test

This commit is contained in:
emelko
2018-07-25 15:50:41 +02:00
parent 6cf0a9820f
commit 60d6e21c57
2 changed files with 668 additions and 0 deletions
+8
View File
@@ -4,6 +4,14 @@ function convertToSymptoFormat(val) {
if (val.temperature) sympto.temperature = { value: val.temperature }
if (val.mucus) sympto.mucus = { value: val.mucus }
if (val.bleeding) sympto.bleeding = { value: val.bleeding }
if (val.cervix) {
sympto.cervix = {}
if (val.cervix === 'firm & closed') {
sympto.cervix.firmAndClosed = true
} else {
sympto.cervix.firmAndClosed = false
}
}
return sympto
}