{"action":"created","comment":{"url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/comments/34485000","id":34485000,"diff_hunk":"@@ -0,0 +1,696 @@\n+package gov.va.med.srcalc.web.view.admin;\n+\n+import gov.va.med.srcalc.domain.model.*;\n+import gov.va.med.srcalc.service.InvalidIdentifierException;\n+import gov.va.med.srcalc.service.ModelInspectionService;\n+import gov.va.med.srcalc.util.ValidationCodes;\n+import gov.va.med.srcalc.util.ValidationUtils2;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import org.springframework.validation.Errors;\n+import org.springframework.validation.Validator;\n+\n+import com.google.common.base.Strings;\n+import com.google.common.collect.ImmutableList;\n+\n+/**\n+ * A form-backing object for creating a {@link ModelTerm}.\n+ */\n+public class EditModelTerm\n+{\n+    private static final Logger fLogger = LoggerFactory.getLogger(EditModelTerm.class);\n+    \n+    /**\n+     * The overarching types of ModelTerms.\n+     */\n+    public enum TermType\n+    {\n+        /**\n+         * Represents a {@link ConstantTerm}.\n+         */\n+        CONSTANT,\n+        \n+        /**\n+         * Represents a {@link SingleVariableTerm}, depending on the Variable type.\n+         */\n+        VARIABLE,\n+\n+        /**\n+         * Represents a {@link DerivedTerm}.\n+         */\n+        RULE;\n+    }\n+    \n+    private final ImmutableList<TypeState> fTypeStates = ImmutableList.of(\n+            new ConstantTypeState(), new VariableTypeState(), new RuleTypeState());\n+    \n+    private TypeState fTypeState;\n+    private String fKey;\n+    private String fOptionValue;\n+    private float fCoefficient;\n+    \n+    /**\n+     * Constructs an instance with unspecified default values.\n+     */\n+    public EditModelTerm()\n+    {\n+        // Just pick an arbitrary TypeState.\n+        fTypeState = fTypeStates.get(0);\n+        fKey = \"\";\n+        fOptionValue = \"\";\n+        fCoefficient = 0.0f;\n+    }\n+    \n+    /**\n+     * Constructs an instance for a Constant-type term.\n+     * @param coefficient the term coefficient\n+     * @return a new instance\n+     */\n+    public static EditModelTerm forConstant(final float coefficient)\n+    {\n+        return new EditModelTerm()\n+            .setTermType(TermType.CONSTANT)\n+            .setCoefficient(coefficient);\n+    }\n+    \n+    /**\n+     * Constructs an instance for a Variable-type term. Initializes the option value to\n+     * an empty string.\n+     * @param variableKey the target variable's key\n+     * @param coefficient the term coefficient\n+     * @return a new instance\n+     */\n+    public static EditModelTerm forVariable(\n+            final String variableKey, final float coefficient)\n+    {\n+        return new EditModelTerm()\n+            .setTermType(TermType.VARIABLE)\n+            .setKey(variableKey)\n+            .setOptionValue(\"\")\n+            .setCoefficient(coefficient);\n+    }\n+    \n+    /**\n+     * Constructs an instance for a Rule-type term.\n+     * @param ruleName the target rule's display name\n+     * @param coefficient the term coefficient\n+     * @return a new instance\n+     */\n+    public static EditModelTerm forRule(\n+            final String ruleName, final float coefficient)\n+    {\n+        return new EditModelTerm()\n+            .setTermType(TermType.RULE)\n+            .setKey(ruleName)\n+            .setCoefficient(coefficient);\n+    }\n+    \n+    /**\n+     * Constructs an instance form a prototype ModelTerm. The properties are copied out\n+     * of the provided term, but a reference to it is not retained. Calling {@link\n+     * #build(ModelInspectionService)} should construct an identical term to the\n+     * prototype.\n+     * @param existingTerm the prototype term\n+     * @return a new instance\n+     */\n+    public static EditModelTerm fromExistingTerm(final ModelTerm existingTerm)\n+    {\n+        class ConstructionVisitor implements ModelTermVisitor\n+        {\n+            private EditModelTerm fConstructedEditTerm;\n+            \n+            private void visitVariableTerm(final SingleVariableTerm term)\n+            {\n+                fConstructedEditTerm = forVariable(\n+                        term.getVariable().getKey(), term.getCoefficient());\n+            }\n+            \n+            @Override\n+            public void visitProcedureTerm(final ProcedureTerm term)\n+            {\n+                visitVariableTerm(term);\n+            }\n+            \n+            @Override\n+            public void visitNumericalTerm(final NumericalTerm term)\n+            {\n+                visitVariableTerm(term);\n+            }\n+            \n+            @Override\n+            public void visitDiscreteTerm(final DiscreteTerm term)\n+            {\n+                visitVariableTerm(term);\n+                fConstructedEditTerm.setOptionValue(term.getOption().getValue());\n+            }\n+            \n+            @Override\n+            public void visitBooleanTerm(final BooleanTerm term)\n+            {\n+                visitVariableTerm(term);\n+            }\n+            \n+            @Override\n+            public void visitDerivedTerm(final DerivedTerm term)\n+            {\n+                fConstructedEditTerm = forRule(\n+                        term.getRule().getDisplayName(), term.getCoefficient());\n+            }\n+            \n+            @Override\n+            public void visitConstantTerm(final ConstantTerm term)\n+            {\n+                fConstructedEditTerm = forConstant(existingTerm.getCoefficient());\n+            }\n+            \n+            public EditModelTerm makeEditTerm(final ModelTerm term)\n+            {\n+                term.accept(this);\n+                return fConstructedEditTerm;\n+            }\n+        };\n+        \n+        return new ConstructionVisitor().makeEditTerm(existingTerm);\n+    }\n+    \n+    private TypeState getTypeState(final TermType termType)\n+    {\n+        // Since there are only 3 TypeStates, just do a brute-force search. A HashMap\n+        // would be less efficient.\n+        for (final TypeState state : fTypeStates)\n+        {\n+            if (state.getAssociatedType() == termType)\n+            {\n+                return state;\n+            }\n+        }\n+        \n+        throw new RuntimeException(\"Programming error: unsupported term type.\");\n+    }\n+\n+    /**\n+     * Returns the overarching type of {@link ModelTerm} that this object will create.\n+     */\n+    public TermType getTermType()\n+    {\n+        return fTypeState.getAssociatedType();\n+    }\n+\n+    /**\n+     * Sets the overarching type of {@link ModelTerm} that this object will create.\n+     * @return this object for convenience\n+     */\n+    public EditModelTerm setTermType(final TermType termType)\n+    {\n+        fTypeState = getTypeState(termType);\n+        return this;\n+    }\n+\n+    /**\n+     * Returns the associated variable or rule key. For constant terms, the returned value\n+     * is meaningless and unspecified.\n+     * @return not null\n+     */\n+    public String getKey()\n+    {\n+        return fKey;\n+    }\n+\n+    /**\n+     * Sets the associated variable or rule key. If the term type is {@link\n+     * TermType#CONSTANT}, this value is ignored.\n+     * @return this object for convenience\n+     * @see #getKey()\n+     */\n+    public EditModelTerm setKey(final String key)\n+    {\n+        fKey = key;\n+        return this;\n+    }\n+\n+    /**\n+     * If the term type is {@link TermType#VARIABLE} and the identified Variable is a\n+     * {@link DiscreteVariable}, then this method returns the term's associated option\n+     * value. Otherwise, the return value is meaningless and unspecified.\n+     * @return not null\n+     */\n+    public String getOptionValue()\n+    {\n+        return fOptionValue;\n+    }\n+\n+    /**\n+     * Sets the option value for a variable. Unless the term type is {@link\n+     * TermType#VARIABLE}, this value is ignored.\n+     * @return this object for convenience\n+     * @see #getOptionValue()\n+     */\n+    public EditModelTerm setOptionValue(final String optionValue)\n+    {\n+        fOptionValue = optionValue;\n+        return this;\n+    }\n+\n+    /**\n+     * Returns the coefficient for the term to construct.\n+     */\n+    public float getCoefficient()\n+    {\n+        return fCoefficient;\n+    }\n+\n+    /**\n+     * Sets the coefficient for the term.\n+     * @return this object for convenience\n+     */\n+    public EditModelTerm setCoefficient(final float coefficient)\n+    {\n+        fCoefficient = coefficient;\n+        return this;\n+    }\n+    \n+    /**\n+     * Returns a Validator suitable for validating the current term type.\n+     * @param modelService a ModelInspectionService for retrieving Variables and Rules\n+     * as necessary for validation.\n+     */\n+    public Validator getValidator(final ModelInspectionService modelService)\n+    {\n+        return fTypeState.getValidator(modelService);\n+    }\n+    \n+    /**\n+     * Creates a ModelTermSummary for this term. The returned summary actually contains\n+     * more information than this class (EditModelTerm), such as a Variable display name.\n+     * @param modelService for looking up Variable and Rule information\n+     */\n+    public ModelTermSummary makeSummary(final ModelInspectionService modelService)\n+    {\n+        return fTypeState.makeSummary(modelService);\n+    }\n+    \n+    /**\n+     * Builds a new ModelTerm of the proper type.\n+     * @param modelService for looking up variables and rules\n+     * @return a new ModelTerm instance\n+     * @throws InvalidIdentifierException if there is no variable with the set key\n+     */\n+    public ModelTerm build(final ModelInspectionService modelService)\n+        throws InvalidIdentifierException\n+    {\n+        return fTypeState.buildTerm(modelService);\n+    }\n+    \n+    /**\n+     * Gang-of-Four State Pattern. This interface defines the State type.\n+     */\n+    private interface TypeState\n+    {\n+        /**\n+         * Returns the {@link TermType} which this object supports.\n+         */\n+        public TermType getAssociatedType();\n+        \n+        public BaseValidator getValidator(final ModelInspectionService modelService);\n+        \n+        public ModelTermSummary makeSummary(final ModelInspectionService modelService);\n+\n+        /**\n+         * Builds a new ModelTerm of the correct type.\n+         * @param modelService for looking up variables\n+         * @throws InvalidIdentifierException if there is no variable with the set key\n+         */\n+        public ModelTerm buildTerm(final ModelInspectionService modelService)\n+            throws InvalidIdentifierException;\n+    }\n+    \n+    private class ConstantTypeState implements TypeState\n+    {\n+        @Override\n+        public TermType getAssociatedType()\n+        {\n+            return TermType.CONSTANT;\n+        }\n+        \n+        @Override\n+        public ModelTermSummary makeSummary(final ModelInspectionService modelService)\n+        {\n+            return new ModelTermSummary(\"Constant\", \"\", fCoefficient);\n+        }\n+        \n+        @Override\n+        public BaseValidator getValidator(final ModelInspectionService modelService)\n+        {\n+            return new ConstantTermValidator();\n+        }\n+\n+        @Override\n+        public ConstantTerm buildTerm(final ModelInspectionService modelService)\n+        {\n+            return new ConstantTerm(fCoefficient);\n+        }\n+    }\n+    \n+    private class VariableTypeState implements TypeState\n+    {\n+        private class TermBuilder extends ExceptionlessVariableVisitor\n+        {\n+            private SingleVariableTerm fBuiltTerm;\n+            \n+            public SingleVariableTerm getBuiltTerm()\n+            {\n+                return fBuiltTerm;\n+            }\n+\n+            @Override\n+            public void visitProcedure(final ProcedureVariable variable)\n+            {\n+                fBuiltTerm = new ProcedureTerm(variable, fCoefficient);\n+            }\n+            \n+            @Override\n+            public void visitNumerical(final NumericalVariable variable)\n+            {\n+                fBuiltTerm = new NumericalTerm(variable, fCoefficient);\n+            }\n+            \n+            private DiscreteTerm buildDiscreteTerm(final DiscreteVariable variable)\n+            {\n+                final int index = variable.getOptions().indexOf(\n+                        // Just construct an equivalent option to find the index.\n+                        new MultiSelectOption(fOptionValue));\n+\n+                if (index != -1)\n+                {\n+                    return new DiscreteTerm(variable, index, fCoefficient);\n+                }\n+                else\n+                {\n+                    throw new IllegalStateException(\n+                            \"no such option value in variable \" + variable);\n+                }\n+            }\n+            \n+            @Override\n+            public void visitMultiSelect(final MultiSelectVariable variable)\n+            {\n+                fBuiltTerm = buildDiscreteTerm(variable);\n+            }\n+            \n+            @Override\n+            public void visitDiscreteNumerical(final DiscreteNumericalVariable variable)\n+            {\n+                fBuiltTerm = buildDiscreteTerm(variable);\n+            }\n+            \n+            @Override\n+            public void visitBoolean(final BooleanVariable variable)\n+            {\n+                fBuiltTerm = new BooleanTerm(variable, fCoefficient);\n+            }\n+        };\n+        \n+        private class TermTypeTranslator extends ExceptionlessVariableVisitor","path":"srcalc/src/main/java/gov/va/med/srcalc/web/view/admin/EditModelTerm.java","position":414,"original_position":414,"commit_id":"00bccddcd865862d09d363bb8d51d4b7109b3e10","original_commit_id":"00bccddcd865862d09d363bb8d51d4b7109b3e10","user":{"login":"dgtombs","id":5116096,"avatar_url":"https://avatars.githubusercontent.com/u/5116096?v=3","gravatar_id":"","url":"https://api.github.com/users/dgtombs","html_url":"https://github.com/dgtombs","followers_url":"https://api.github.com/users/dgtombs/followers","following_url":"https://api.github.com/users/dgtombs/following{/other_user}","gists_url":"https://api.github.com/users/dgtombs/gists{/gist_id}","starred_url":"https://api.github.com/users/dgtombs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgtombs/subscriptions","organizations_url":"https://api.github.com/users/dgtombs/orgs","repos_url":"https://api.github.com/users/dgtombs/repos","events_url":"https://api.github.com/users/dgtombs/events{/privacy}","received_events_url":"https://api.github.com/users/dgtombs/received_events","type":"User","site_admin":false},"body":"That's true, but since it's in the scope of `VariableTypeState`, I think it is implied.","created_at":"2015-07-13T16:59:51Z","updated_at":"2015-07-13T16:59:51Z","html_url":"https://github.com/VHAINNOVATIONS/ASRCM/pull/101#discussion_r34485000","pull_request_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/comments/34485000"},"html":{"href":"https://github.com/VHAINNOVATIONS/ASRCM/pull/101#discussion_r34485000"},"pull_request":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101","id":39625062,"html_url":"https://github.com/VHAINNOVATIONS/ASRCM/pull/101","diff_url":"https://github.com/VHAINNOVATIONS/ASRCM/pull/101.diff","patch_url":"https://github.com/VHAINNOVATIONS/ASRCM/pull/101.patch","issue_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/101","number":101,"state":"open","locked":false,"title":"ASRC-4: support model term import","user":{"login":"dgtombs","id":5116096,"avatar_url":"https://avatars.githubusercontent.com/u/5116096?v=3","gravatar_id":"","url":"https://api.github.com/users/dgtombs","html_url":"https://github.com/dgtombs","followers_url":"https://api.github.com/users/dgtombs/followers","following_url":"https://api.github.com/users/dgtombs/following{/other_user}","gists_url":"https://api.github.com/users/dgtombs/gists{/gist_id}","starred_url":"https://api.github.com/users/dgtombs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgtombs/subscriptions","organizations_url":"https://api.github.com/users/dgtombs/orgs","repos_url":"https://api.github.com/users/dgtombs/repos","events_url":"https://api.github.com/users/dgtombs/events{/privacy}","received_events_url":"https://api.github.com/users/dgtombs/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-09T20:31:20Z","updated_at":"2015-07-13T16:59:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd9887197c14bbf8ca40da49f174e61bab3717c5","assignee":{"login":"jamesbigmac","id":10212113,"avatar_url":"https://avatars.githubusercontent.com/u/10212113?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesbigmac","html_url":"https://github.com/jamesbigmac","followers_url":"https://api.github.com/users/jamesbigmac/followers","following_url":"https://api.github.com/users/jamesbigmac/following{/other_user}","gists_url":"https://api.github.com/users/jamesbigmac/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesbigmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesbigmac/subscriptions","organizations_url":"https://api.github.com/users/jamesbigmac/orgs","repos_url":"https://api.github.com/users/jamesbigmac/repos","events_url":"https://api.github.com/users/jamesbigmac/events{/privacy}","received_events_url":"https://api.github.com/users/jamesbigmac/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101/commits","review_comments_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101/comments","review_comment_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/101/comments","statuses_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/statuses/00bccddcd865862d09d363bb8d51d4b7109b3e10","head":{"label":"VHAINNOVATIONS:ASRC-4","ref":"ASRC-4","sha":"00bccddcd865862d09d363bb8d51d4b7109b3e10","user":{"login":"VHAINNOVATIONS","id":1252476,"avatar_url":"https://avatars.githubusercontent.com/u/1252476?v=3","gravatar_id":"","url":"https://api.github.com/users/VHAINNOVATIONS","html_url":"https://github.com/VHAINNOVATIONS","followers_url":"https://api.github.com/users/VHAINNOVATIONS/followers","following_url":"https://api.github.com/users/VHAINNOVATIONS/following{/other_user}","gists_url":"https://api.github.com/users/VHAINNOVATIONS/gists{/gist_id}","starred_url":"https://api.github.com/users/VHAINNOVATIONS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VHAINNOVATIONS/subscriptions","organizations_url":"https://api.github.com/users/VHAINNOVATIONS/orgs","repos_url":"https://api.github.com/users/VHAINNOVATIONS/repos","events_url":"https://api.github.com/users/VHAINNOVATIONS/events{/privacy}","received_events_url":"https://api.github.com/users/VHAINNOVATIONS/received_events","type":"Organization","site_admin":false},"repo":{"id":26819438,"name":"ASRCM","full_name":"VHAINNOVATIONS/ASRCM","owner":{"login":"VHAINNOVATIONS","id":1252476,"avatar_url":"https://avatars.githubusercontent.com/u/1252476?v=3","gravatar_id":"","url":"https://api.github.com/users/VHAINNOVATIONS","html_url":"https://github.com/VHAINNOVATIONS","followers_url":"https://api.github.com/users/VHAINNOVATIONS/followers","following_url":"https://api.github.com/users/VHAINNOVATIONS/following{/other_user}","gists_url":"https://api.github.com/users/VHAINNOVATIONS/gists{/gist_id}","starred_url":"https://api.github.com/users/VHAINNOVATIONS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VHAINNOVATIONS/subscriptions","organizations_url":"https://api.github.com/users/VHAINNOVATIONS/orgs","repos_url":"https://api.github.com/users/VHAINNOVATIONS/repos","events_url":"https://api.github.com/users/VHAINNOVATIONS/events{/privacy}","received_events_url":"https://api.github.com/users/VHAINNOVATIONS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VHAINNOVATIONS/ASRCM","description":"The Automated Surgical Risk Calculator for Mortality Innovation is a project to develop a tool from CPRS through the “Tools” drop down that will auto-fill pertinent information into the developed risk calculator.  The Automated Risk Calculator will utilize the generated data and allow for the user to manually input required information to support clinical decision-making regarding perioperative risk.  The tool will then allow for information to be written back to the patients file in CPRS.  In addition, a secondary tool will be created to store and develop a repository for research of risk calculations developed.  ","fork":false,"url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM","forks_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/forks","keys_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/teams","hooks_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/hooks","issue_events_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/events{/number}","events_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/events","assignees_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/assignees{/user}","branches_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/branches{/branch}","tags_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/tags","blobs_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/refs{/sha}","trees_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/statuses/{sha}","languages_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/languages","stargazers_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/stargazers","contributors_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/contributors","subscribers_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/subscribers","subscription_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/subscription","commits_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/commits{/sha}","git_commits_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/commits{/sha}","comments_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/comments{/number}","issue_comment_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/comments{/number}","contents_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/contents/{+path}","compare_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/merges","archive_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/downloads","issues_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues{/number}","pulls_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls{/number}","milestones_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/milestones{/number}","notifications_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/labels{/name}","releases_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/releases{/id}","created_at":"2014-11-18T16:48:50Z","updated_at":"2015-05-08T20:09:42Z","pushed_at":"2015-07-13T13:39:44Z","git_url":"git://github.com/VHAINNOVATIONS/ASRCM.git","ssh_url":"git@github.com:VHAINNOVATIONS/ASRCM.git","clone_url":"https://github.com/VHAINNOVATIONS/ASRCM.git","svn_url":"https://github.com/VHAINNOVATIONS/ASRCM","homepage":null,"size":11044,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"VHAINNOVATIONS:master","ref":"master","sha":"0f79db56c720c0bfa241ccf38122b3a870d04feb","user":{"login":"VHAINNOVATIONS","id":1252476,"avatar_url":"https://avatars.githubusercontent.com/u/1252476?v=3","gravatar_id":"","url":"https://api.github.com/users/VHAINNOVATIONS","html_url":"https://github.com/VHAINNOVATIONS","followers_url":"https://api.github.com/users/VHAINNOVATIONS/followers","following_url":"https://api.github.com/users/VHAINNOVATIONS/following{/other_user}","gists_url":"https://api.github.com/users/VHAINNOVATIONS/gists{/gist_id}","starred_url":"https://api.github.com/users/VHAINNOVATIONS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VHAINNOVATIONS/subscriptions","organizations_url":"https://api.github.com/users/VHAINNOVATIONS/orgs","repos_url":"https://api.github.com/users/VHAINNOVATIONS/repos","events_url":"https://api.github.com/users/VHAINNOVATIONS/events{/privacy}","received_events_url":"https://api.github.com/users/VHAINNOVATIONS/received_events","type":"Organization","site_admin":false},"repo":{"id":26819438,"name":"ASRCM","full_name":"VHAINNOVATIONS/ASRCM","owner":{"login":"VHAINNOVATIONS","id":1252476,"avatar_url":"https://avatars.githubusercontent.com/u/1252476?v=3","gravatar_id":"","url":"https://api.github.com/users/VHAINNOVATIONS","html_url":"https://github.com/VHAINNOVATIONS","followers_url":"https://api.github.com/users/VHAINNOVATIONS/followers","following_url":"https://api.github.com/users/VHAINNOVATIONS/following{/other_user}","gists_url":"https://api.github.com/users/VHAINNOVATIONS/gists{/gist_id}","starred_url":"https://api.github.com/users/VHAINNOVATIONS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VHAINNOVATIONS/subscriptions","organizations_url":"https://api.github.com/users/VHAINNOVATIONS/orgs","repos_url":"https://api.github.com/users/VHAINNOVATIONS/repos","events_url":"https://api.github.com/users/VHAINNOVATIONS/events{/privacy}","received_events_url":"https://api.github.com/users/VHAINNOVATIONS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VHAINNOVATIONS/ASRCM","description":"The Automated Surgical Risk Calculator for Mortality Innovation is a project to develop a tool from CPRS through the “Tools” drop down that will auto-fill pertinent information into the developed risk calculator.  The Automated Risk Calculator will utilize the generated data and allow for the user to manually input required information to support clinical decision-making regarding perioperative risk.  The tool will then allow for information to be written back to the patients file in CPRS.  In addition, a secondary tool will be created to store and develop a repository for research of risk calculations developed.  ","fork":false,"url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM","forks_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/forks","keys_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/teams","hooks_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/hooks","issue_events_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/events{/number}","events_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/events","assignees_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/assignees{/user}","branches_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/branches{/branch}","tags_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/tags","blobs_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/refs{/sha}","trees_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/statuses/{sha}","languages_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/languages","stargazers_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/stargazers","contributors_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/contributors","subscribers_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/subscribers","subscription_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/subscription","commits_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/commits{/sha}","git_commits_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/git/commits{/sha}","comments_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/comments{/number}","issue_comment_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/comments{/number}","contents_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/contents/{+path}","compare_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/merges","archive_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/downloads","issues_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues{/number}","pulls_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls{/number}","milestones_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/milestones{/number}","notifications_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/labels{/name}","releases_url":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/releases{/id}","created_at":"2014-11-18T16:48:50Z","updated_at":"2015-05-08T20:09:42Z","pushed_at":"2015-07-13T13:39:44Z","git_url":"git://github.com/VHAINNOVATIONS/ASRCM.git","ssh_url":"git@github.com:VHAINNOVATIONS/ASRCM.git","clone_url":"https://github.com/VHAINNOVATIONS/ASRCM.git","svn_url":"https://github.com/VHAINNOVATIONS/ASRCM","homepage":null,"size":11044,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101"},"html":{"href":"https://github.com/VHAINNOVATIONS/ASRCM/pull/101"},"issue":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/101"},"comments":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/VHAINNOVATIONS/ASRCM/statuses/00bccddcd865862d09d363bb8d51d4b7109b3e10"}}}}