forked from chb/indivo_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixes chb#44
- Loading branch information
Travers Franckle
committed
Dec 31, 2012
1 parent
0288bba
commit 1e6b8eb
Showing
20 changed files
with
1,225 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Models xmlns="http://indivo.org/vocab/xml/documents#"> | ||
<Model name="LabPanel"> | ||
<Field name="lab_results"> | ||
<Models> | ||
<Model name="LabResult"> | ||
<Field name="date">2009-05-16T12:00:00Z</Field> | ||
|
||
<Field name="abnormal_interpretation_code_title">Normal</Field> | ||
<Field name="abnormal_interpretation_code_system">http://smartplatforms.org/terms/codes/LabResultInterpretation#</Field> | ||
<Field name="abnormal_interpretation_code_identifier">normal</Field> | ||
|
||
<Field name="accession_number">AC09205823577</Field> | ||
|
||
<Field name="name_title">Serum Sodium</Field> | ||
<Field name="name_code_title">Serum Sodium</Field> | ||
<Field name="name_code_system">http://purl.bioontology.org/ontology/LNC/</Field> | ||
<Field name="name_code_identifier">2951-2</Field> | ||
|
||
<Field name="status_code_title">Final results: complete and verified</Field> | ||
<Field name="status_code_system">http://smartplatforms.org/terms/codes/LabStatus#</Field> | ||
<Field name="status_code_identifier">final</Field> | ||
|
||
<Field name="notes">Blood sample appears to have hemolyzed</Field> | ||
|
||
<Field name="quantitative_result_non_critical_range_max_value">155</Field> | ||
<Field name="quantitative_result_non_critical_range_max_unit">mEq/L</Field> | ||
<Field name="quantitative_result_non_critical_range_min_value">120</Field> | ||
<Field name="quantitative_result_non_critical_range_min_unit">mEq/L</Field> | ||
|
||
<Field name="quantitative_result_normal_range_max_value">145</Field> | ||
<Field name="quantitative_result_normal_range_max_unit">mEq/L</Field> | ||
<Field name="quantitative_result_normal_range_min_value">135</Field> | ||
<Field name="quantitative_result_normal_range_min_unit">mEq/L</Field> | ||
|
||
<Field name="quantitative_result_value_value">140</Field> | ||
<Field name="quantitative_result_value_unit">mEq/L</Field> | ||
</Model> | ||
</Models> | ||
</Field> | ||
</Model> | ||
</Models> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from indivo.serializers import DataModelSerializers | ||
from indivo.validators import ValueInSetValidator, ExactValueValidator, NonNullValidator | ||
from indivo.data_models.options import DataModelOptions | ||
from indivo.lib.rdf import PatientGraph | ||
|
||
LOINC_URI="http://purl.bioontology.org/ontology/LNC/" | ||
|
||
class LabPanelSerializers(DataModelSerializers): | ||
def to_rdf(query, record=None, carenet=None): | ||
if not record: | ||
record = carenet.record | ||
graph = PatientGraph(record) | ||
resultOrder = graph.addLabPanelList(query.results.iterator(), True if query.limit else False) | ||
graph.addResponseSummary(query, resultOrder) | ||
return graph.toRDF() | ||
|
||
class LabPanelOptions(DataModelOptions): | ||
model_class_name = 'LabPanel' | ||
serializers = LabPanelSerializers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from indivo.models import Fact | ||
from django.db import models | ||
from indivo.fields import CodedValueField | ||
|
||
class LabPanel(Fact): | ||
name = CodedValueField() | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.